Compare commits
621 Commits
Author | SHA1 | Date |
---|---|---|
Pavel Alexeev | af2b916f05 | |
Pavel Alexeev | 56974cf9ab | |
Justin M. Forbes | 94716073b3 | |
Peter Robinson | f94c0952d6 | |
Justin M. Forbes | d77dbf13d4 | |
Laura Abbott | 3b7c7907dd | |
Justin M. Forbes | 53943dcc5d | |
Justin M. Forbes | d3f81d044b | |
Justin M. Forbes | 1f56e8e9f5 | |
Justin M. Forbes | 053da0f7ce | |
Pavel Alexeev | 8d1e43c446 | |
Justin M. Forbes | d48f3a76cc | |
Justin M. Forbes | 8a936318a2 | |
Peter Robinson | bce07081d7 | |
Peter Robinson | b8be23d515 | |
Pavel Alexeev | e7868a73ce | |
Peter Robinson | 11ce6a972d | |
Justin M. Forbes | 1fb17f8293 | |
Pavel Alexeev | 7b5a956be9 | |
Justin M. Forbes | 4873da8171 | |
Justin M. Forbes | be9c9d232b | |
Justin M. Forbes | dafbaf8e9e | |
Peter Robinson | 08645910f6 | |
Peter Robinson | bb4f705986 | |
Justin M. Forbes | 7bb512ee31 | |
Pavel Alexeev | 2054a53783 | |
Pavel Alexeev | 4e2c9711d8 | |
Pavel Alexeev | 308188e85a | |
Justin M. Forbes | de79447876 | |
Justin M. Forbes | 513d3dd435 | |
Peter Robinson | 1ba3e6d797 | |
Peter Robinson | 724a6e88bd | |
Justin M. Forbes | 7f02b9bea4 | |
Peter Robinson | 3736ad1aa6 | |
Justin M. Forbes | 379946bd15 | |
Peter Robinson | 492cd8a435 | |
Pavel Alexeev | f6ff19d032 | |
Justin M. Forbes | 2abf3ad44c | |
Justin M. Forbes | 13a26fcad4 | |
Josh Boyer | 9510c81109 | |
Pavel Alexeev | abeb90e1d1 | |
Laura Abbott | f9f2d4777c | |
Laura Abbott | 1eab470c4d | |
Pavel Alexeev | 7c2765afb6 | |
Laura Abbott | 9471d32264 | |
Laura Abbott | 4a78ca839f | |
Pavel Alexeev | d4589dd2c8 | |
Pavel Alexeev | 5bd1dee7ea | |
Laura Abbott | 4b8d25bc3d | |
Peter Robinson | ab89142d25 | |
Laura Abbott | d984db4763 | |
Alec Leamas | 35b97b74a5 | |
Peter Robinson | 6b4a3f52ad | |
Peter Robinson | 506f0e7f2b | |
Laura Abbott | 9ff3c92f08 | |
Laura Abbott | 4e55c73613 | |
Jeffrey Bastian | 49699bdee7 | |
Laura Abbott | 92dea29ae5 | |
Justin M. Forbes | 593f0eedef | |
Laura Abbott | 0d249158e6 | |
Josh Boyer | 6c78eb7591 | |
Justin M. Forbes | a06df9a188 | |
Laura Abbott | 01bd738435 | |
Laura Abbott | 389254406e | |
Laura Abbott | c3c83b9427 | |
Laura Abbott | 1d48d18f7d | |
Josh Boyer | d6256ebfe7 | |
Hans de Goede | 80b44af41a | |
Josh Boyer | 0d42ed5eef | |
Peter Robinson | fec4950a89 | |
Josh Boyer | 967c228a71 | |
Josh Boyer | 02adf9a7d2 | |
Justin M. Forbes | 03de8d220c | |
Josh Boyer | e9ad699b52 | |
Josh Boyer | 16c334e595 | |
Josh Boyer | 2d70af5aca | |
Josh Boyer | 1e59d1ef83 | |
Josh Boyer | 1a08bebf8b | |
Josh Boyer | b819269231 | |
Josh Boyer | d62f5f70a6 | |
Josh Boyer | 9c68304452 | |
Josh Boyer | 813ae65d03 | |
Peter Robinson | 9434da4c69 | |
Josh Boyer | 97bff36da6 | |
Josh Boyer | 4cd01e9663 | |
Josh Boyer | a2e53c5e4a | |
Josh Boyer | 55efec4c97 | |
Laura Abbott | 9f800a78eb | |
Josh Boyer | 83d855a219 | |
Josh Boyer | 6de53e07b8 | |
Josh Boyer | 61eafba2ee | |
Josh Boyer | 2eb995b288 | |
Pavel Alexeev | c12b24e76c | |
Josh Boyer | f378ba7d56 | |
Josh Boyer | 1289dc4eb9 | |
Pavel Alexeev | 5ccb9a2341 | |
Pavel Alexeev | decfa719c1 | |
Justin M. Forbes | 60b0ac6b6a | |
Justin M. Forbes | 48656c00cb | |
Paul Bolle | 634a74ca7b | |
Peter Robinson | 1f3eef073f | |
Peter Robinson | 39074468e2 | |
Peter Robinson | 2a2179c747 | |
Peter Robinson | 0fcbdb2be7 | |
Peter Robinson | 767f0d5cef | |
Josh Boyer | c35316f9f7 | |
Josh Boyer | c2d53823de | |
Justin M. Forbes | 353ed7c540 | |
Josh Boyer | 6a9158e8f2 | |
Josh Boyer | 981658ddac | |
Josh Boyer | c2ddac6027 | |
Josh Boyer | fe50f1157a | |
Josh Boyer | d0d74143fe | |
Josh Boyer | 2b03673893 | |
Justin M. Forbes | c028c2f93b | |
Justin M. Forbes | 35e58915f0 | |
Josh Boyer | d79e1f5c54 | |
Josh Boyer | 4743d23c2c | |
Josh Boyer | bfbc6028ec | |
Josh Boyer | 35e0b810c1 | |
Peter Robinson | decdd1f910 | |
Justin M. Forbes | 399e5b04d1 | |
Justin M. Forbes | 8cbd263769 | |
Josh Boyer | a61e13195e | |
Josh Boyer | ed0df02784 | |
Josh Boyer | a7b0d91e02 | |
Josh Boyer | 8904e6558d | |
Justin M. Forbes | 168984b97b | |
Justin M. Forbes | 82c82b098d | |
Justin M. Forbes | 99d77bae9e | |
Josh Boyer | 91c15d7b53 | |
Josh Boyer | a8751b1bcf | |
Josh Boyer | b304d314dd | |
Josh Boyer | b4ebd48644 | |
Josh Boyer | 602ad30644 | |
Josh Boyer | 55e4593872 | |
Justin M. Forbes | 4d81848a2b | |
Laura Abbott | 3067805602 | |
Josh Boyer | f5752fc447 | |
Josh Boyer | d5b1540844 | |
Josh Boyer | 37e7d7b911 | |
Josh Boyer | e451ea92f0 | |
Josh Boyer | 05bf4c34e4 | |
Josh Boyer | 47ad3e2ae6 | |
Peter Robinson | 3820f9589b | |
Justin M. Forbes | b34d678196 | |
Josh Boyer | db52183a00 | |
Josh Boyer | 0d217e65ea | |
Josh Boyer | e137bc5a7e | |
Josh Boyer | 36fbeb0c14 | |
Peter Robinson | 0cdc3924ab | |
Lubomir Rintel | 7d082db715 | |
Lubomir Rintel | 10d8c0e755 | |
Lubomir Rintel | 292e197a03 | |
Lubomir Rintel | 0ffad22231 | |
Lubomir Rintel | 5f525a07f1 | |
Lubomir Rintel | bfeccd5029 | |
Justin M. Forbes | 1182fce9ed | |
Josh Boyer | af1de342a8 | |
Josh Boyer | a5f6e99b83 | |
Josh Boyer | e1041e2d13 | |
Josh Boyer | 944ecfe780 | |
Justin M. Forbes | 5e92138405 | |
Laura Abbott | 59c51515fb | |
Laura Abbott | 42f1b26d1a | |
Justin M. Forbes | a6422490d5 | |
Josh Boyer | 81f7b31b57 | |
Josh Boyer | 0afe5024db | |
Josh Boyer | da97aab847 | |
Josh Boyer | 17d2cdb99d | |
Laura Abbott | b7a3a7f459 | |
Laura Abbott | 7fc022462f | |
Justin M. Forbes | 74fed5240f | |
Laura Abbott | a2236debde | |
Justin M. Forbes | 5b87b4bfd9 | |
Josh Boyer | e2a6e6abc3 | |
Josh Boyer | c533308aa1 | |
Peter Robinson | df1a50892b | |
Josh Boyer | bf219073a5 | |
Josh Boyer | 5c8bd1fb1b | |
Peter Robinson | 1fd1a427cc | |
Peter Robinson | 0ef5eed437 | |
Justin M. Forbes | 3d917f4360 | |
Justin M. Forbes | 2b5ee7885a | |
Peter Robinson | 3ca6c4cf4d | |
Josh Boyer | bdf7d4b799 | |
Josh Boyer | 394fde4528 | |
Laura Abbott | c1afd21fe4 | |
Justin M. Forbes | b37954fced | |
Peter Robinson | 2463f3be22 | |
Josh Boyer | 1ad3ebd114 | |
Josh Boyer | ed12bfb0f6 | |
Justin M. Forbes | 713244c6fc | |
Josh Boyer | 4ea5b527c7 | |
Josh Boyer | 23a2b1c088 | |
Laura Abbott | 8c9e7e5551 | |
Peter Robinson | 2a0da84180 | |
Josh Boyer | aca4dab826 | |
Josh Boyer | c890f63971 | |
Josh Boyer | 6850d1eddf | |
Josh Boyer | 24bf1dfe04 | |
Josh Boyer | 0dde2962ab | |
Josh Boyer | 79df94781f | |
Laura Abbott | b77dc98b4a | |
Laura Abbott | 79552626be | |
Peter Robinson | 8cd8f7618f | |
Peter Robinson | c8706d96f4 | |
Peter Robinson | d35230fb5e | |
Josh Boyer | 65cfe57f36 | |
Josh Boyer | d90dec40f5 | |
Josh Boyer | 855e4071a2 | |
Josh Boyer | 246fe5f246 | |
Josh Boyer | e9295a6761 | |
Josh Boyer | 6e61315c13 | |
Josh Boyer | 7879141d18 | |
Josh Boyer | e4ce5f635a | |
Josh Boyer | 927ee75ff2 | |
Josh Boyer | 376f91eebe | |
Josh Boyer | b8f173e772 | |
Josh Boyer | 162a279603 | |
Josh Boyer | fdfe624e9a | |
Josh Boyer | 17ea4a1b30 | |
Josh Boyer | 06e2f0cee1 | |
Josh Boyer | 9dca68ea7b | |
Laura Abbott | 7b567d3db7 | |
Laura Abbott | ba408bfa98 | |
Josh Boyer | bb4d01ec08 | |
Josh Boyer | f1e9fcace5 | |
Justin M. Forbes | 2e7e84333e | |
Justin M. Forbes | 1fe0d24720 | |
Josh Boyer | 291d5c505c | |
Josh Boyer | d960d841dc | |
Josh Boyer | f721d46cf6 | |
Josh Boyer | 207186fa3f | |
Josh Boyer | 45ab0ced85 | |
Josh Boyer | 8e3740c04d | |
Laura Abbott | a0db662f75 | |
Justin M. Forbes | 598f041c32 | |
Laura Abbott | 51f51bfbf9 | |
Justin M. Forbes | f704286d26 | |
Pavel Alexeev | e9d41e13d7 | |
Justin M. Forbes | 577f25efd7 | |
Justin M. Forbes | d761b8935d | |
Pavel Alexeev | 86710f8b8c | |
Peter Robinson | aa7ced39ea | |
Justin M. Forbes | da4b67545d | |
Peter Robinson | 36894caab5 | |
Justin M. Forbes | 52f552f772 | |
Laura Abbott | 134c40fe0a | |
Laura Abbott | 2c2812839b | |
Laura Abbott | a7237117c4 | |
Justin M. Forbes | 90bead45c8 | |
Josh Boyer | e273f3d0ea | |
Laura Abbott | 06de599fc1 | |
Laura Abbott | 6de8ee9a4c | |
Justin M. Forbes | e99b41c4b9 | |
Josh Boyer | 30529d1691 | |
Justin M. Forbes | 0fa0ab31c9 | |
Pavel Alexeev | f28d83846e | |
Pavel Alexeev | 92535193ae | |
Laura Abbott | 046b8e2419 | |
Peter Robinson | 9c7527faa4 | |
Josh Boyer | 5738ea674f | |
Laura Abbott | 339b74a5b2 | |
Pavel Alexeev | 535381265e | |
Peter Robinson | 770ddfba09 | |
Peter Robinson | 90a32bc286 | |
Laura Abbott | ebc7bd5b5a | |
Laura Abbott | 75d449adbd | |
Josh Boyer | 4f912db3d9 | |
Josh Boyer | 9f8ff56698 | |
Josh Boyer | f10f6ff523 | |
Josh Boyer | f20248aafb | |
Josh Boyer | 0afe1074ca | |
Josh Boyer | 95029167aa | |
Josh Boyer | 234b894702 | |
Josh Boyer | d7e32c1692 | |
Josh Boyer | 3cf9b07e55 | |
Josh Boyer | df43314a82 | |
Josh Boyer | f27e33202f | |
Josh Boyer | 785c5f074a | |
Pavel Alexeev | 82785a31c4 | |
Josh Boyer | 059e5105d9 | |
Josh Boyer | 47af8d1c51 | |
Pavel Alexeev | 8d785071f7 | |
Pavel Alexeev | 06bc18e2d3 | |
Pavel Alexeev | 5b23d4a884 | |
Josh Boyer | 92c1f2edcf | |
Josh Boyer | a544825313 | |
Josh Boyer | 1fee669884 | |
Josh Boyer | 3f2b1e4ad6 | |
Josh Boyer | 0a3b62c4d4 | |
Josh Boyer | bbaaf5e408 | |
Josh Boyer | fa6e115cc1 | |
Josh Boyer | 0de6807a9e | |
Josh Boyer | 4c23aa3656 | |
Josh Boyer | a319c5cce5 | |
Josh Boyer | f86650b158 | |
Josh Boyer | b23324436e | |
Josh Boyer | 4b48e2b551 | |
Josh Boyer | 0097241294 | |
Josh Boyer | 84d4752085 | |
Josh Boyer | f0bf733bf0 | |
Pavel Alexeev | 9b3a0cf909 | |
Josh Boyer | ee1deda33b | |
Josh Boyer | 3a54c6ece5 | |
Josh Boyer | 9ab3e93b20 | |
Josh Boyer | 099dace0e1 | |
Josh Boyer | 16a4b5b5ca | |
Josh Boyer | 94b69c1cf2 | |
Josh Boyer | 5e3141a50f | |
Josh Boyer | a86f9a6012 | |
Josh Boyer | 7ca18ea937 | |
Pavel Alexeev | 85a113be81 | |
Josh Boyer | c996788da5 | |
Josh Boyer | c7ce3af191 | |
Pavel Alexeev | 338e57dc54 | |
Josh Boyer | af632165dd | |
Josh Boyer | 48f65f65ce | |
Josh Boyer | 44ce1614d8 | |
Josh Boyer | 6cd517bb35 | |
Justin M. Forbes | 82ccff23e0 | |
Josh Boyer | ef41a556b6 | |
Josh Boyer | 6831904de4 | |
Josh Boyer | 9652a1eb83 | |
Josh Boyer | 96b069e0a9 | |
Josh Boyer | 8b27eba25e | |
Justin M. Forbes | 827b8d0864 | |
Josh Boyer | 98ef9c89a3 | |
Josh Boyer | 0897fc4b19 | |
Josh Boyer | ac2ee52537 | |
Josh Boyer | 6ba2a2ca01 | |
Justin M. Forbes | 3bb9b28cd9 | |
Josh Boyer | c1385c8a26 | |
Josh Boyer | 013ffed657 | |
Justin M. Forbes | 72aba9054a | |
Justin M. Forbes | 6064addb62 | |
Justin M. Forbes | 135f0cf497 | |
Josh Boyer | f4cab3b760 | |
Josh Boyer | d72641382b | |
Justin M. Forbes | e5132530e1 | |
Josh Boyer | 86635eb9e7 | |
Josh Boyer | 11dc6a09a2 | |
Josh Boyer | 2aa4795a8c | |
Hubbitus | 65e6c77904 | |
Hubbitus | ef315bf18e | |
Hubbitus | ab18e601e2 | |
Peter Robinson | 4133a4ad92 | |
Josh Boyer | ab175c9e16 | |
Hubbitus | 548fa6279b | |
Peter Robinson | 8b2cbe9390 | |
Peter Robinson | 68cad982d8 | |
Josh Boyer | 32d5ef70d9 | |
Josh Boyer | cfeeaf8ab4 | |
Justin M. Forbes | a60da7ba9b | |
Laura Abbott | 8d6c8d30e6 | |
Laura Abbott | ff777690d5 | |
Josh Boyer | e9a2e1b318 | |
Josh Boyer | 499c15bd39 | |
Josh Boyer | 78b4108a2c | |
Justin M. Forbes | c7efbfc05a | |
Peter Robinson | 7cd3b19b62 | |
Peter Robinson | f2e9ef393c | |
Peter Robinson | 158ef88409 | |
Justin M. Forbes | d02ac5524a | |
Justin M. Forbes | 7592c0e70c | |
Justin M. Forbes | 0687abbd86 | |
Justin M. Forbes | 847f3e26fa | |
Josh Boyer | 2087088084 | |
Josh Boyer | 935ebb46f1 | |
Josh Boyer | aad96621dd | |
Josh Boyer | 2f8a1d5042 | |
Justin M. Forbes | e91c77849f | |
Justin M. Forbes | b457470c65 | |
Hubbitus | d20bdc573c | |
Hubbitus | 2a1a51453b | |
Hubbitus | bb43c377dd | |
Justin M. Forbes | 688415ec75 | |
Justin M. Forbes | f6be211527 | |
Josh Boyer | 811909dff8 | |
Justin M. Forbes | e4b08f9d5b | |
Laura Abbott | 5ef74389eb | |
Laura Abbott | 135b2dddfb | |
Laura Abbott | cc35985a8e | |
Laura Abbott | 96e3605239 | |
Justin M. Forbes | 15d3266c8e | |
Josh Boyer | a2857988cd | |
Josh Boyer | 9bcce03e3b | |
Justin M. Forbes | 45f16ba1d6 | |
Peter Robinson | 88f941a2d8 | |
Josh Boyer | 3e698d2170 | |
Josh Boyer | 294b7665e6 | |
Josh Boyer | 520b64102d | |
Josh Boyer | c341a2b166 | |
Justin M. Forbes | f721a8bcb9 | |
Josh Boyer | 9048afa42f | |
Peter Robinson | 350ef09c77 | |
Josh Boyer | 2d163a9e3b | |
Josh Boyer | 88590d8e68 | |
Josh Boyer | 75d0a6790f | |
Justin M. Forbes | 1dedebfc98 | |
Josh Boyer | 4ce89244f2 | |
Josh Boyer | 58effb543e | |
Josh Boyer | b41dc6059e | |
Josh Boyer | d5a54511bc | |
Laura Abbott | a5ca183ab8 | |
Peter Robinson | e04c3b3d52 | |
Hubbitus | 9ed63c6baf | |
Peter Robinson | 636d59f53e | |
Peter Robinson | 8c3602790d | |
Hubbitus | 17824a13af | |
Hubbitus | 24711d1e3a | |
Josh Boyer | 1f47cdc28b | |
Laura Abbott | 8c3e7bb56a | |
Justin M. Forbes | d4f3280318 | |
Justin M. Forbes | 3f8cf8598b | |
Justin M. Forbes | 29a9106f74 | |
Josh Boyer | f2944e91a4 | |
Josh Boyer | 48b606f139 | |
Josh Boyer | 5a0ae23444 | |
Josh Boyer | ff70199bbc | |
Josh Boyer | 69bc0f7394 | |
Josh Boyer | cdde999383 | |
Josh Boyer | cad6950313 | |
Josh Boyer | 4882915094 | |
Josh Boyer | c63ef61e3a | |
Josh Boyer | 03d88d96f1 | |
Josh Boyer | 0fbdada190 | |
Josh Boyer | 62192204d8 | |
Josh Boyer | 0ef23dbdee | |
Peter Robinson | 4eb0822a21 | |
Josh Boyer | 01154dc723 | |
Laura Abbott | ff41e301d5 | |
Laura Abbott | 5962555108 | |
Laura Abbott | 069ff128af | |
Josh Boyer | f67ba724c4 | |
Peter Robinson | 083a8070f2 | |
Josh Boyer | 7dade23b3a | |
Josh Boyer | 426bedbe25 | |
Josh Boyer | ac1fd7ae77 | |
Josh Boyer | 387fb50cf0 | |
Josh Boyer | 4aa12267f1 | |
Peter Robinson | fb3db29b57 | |
Josh Boyer | b941a15414 | |
Josh Boyer | 487a038755 | |
Josh Boyer | 10f9e21128 | |
Josh Boyer | 729201316c | |
Laura Abbott | ce2ed4aeb9 | |
Josh Boyer | e4c9072a88 | |
Josh Boyer | 339e1da5ba | |
Josh Boyer | 05e7825881 | |
Josh Boyer | f97bc32a29 | |
Josh Boyer | 7494151fcf | |
Josh Boyer | 413e27ddd9 | |
Josh Boyer | b239a7b860 | |
Peter Robinson | faabafc572 | |
Peter Robinson | b1366c14df | |
Josh Boyer | 9689f6ae51 | |
Peter Robinson | 24d23bb3c9 | |
Peter Robinson | a44c6dbe5b | |
Laura Abbott | 394616b0b3 | |
Laura Abbott | 9d542d8c1d | |
Josh Boyer | 6e9cf33df0 | |
Josh Boyer | 30b56bf3e2 | |
Dave Young | e099b6b083 | |
Josh Boyer | 74f6de1a31 | |
Josh Boyer | a851a5725c | |
Josh Boyer | 6552be4e52 | |
Josh Boyer | d3c241c499 | |
Hans de Goede | c1abd2e802 | |
Hans de Goede | 391017c00d | |
Peter Robinson | 7fec258a2a | |
Josh Boyer | 32143ec3b0 | |
Josh Boyer | 6075fa24e0 | |
Josh Boyer | 046478eb76 | |
Josh Boyer | e7a2da13e8 | |
Josh Boyer | 9c05b38062 | |
Josh Boyer | 70723e9277 | |
Hubbitus | ad11731841 | |
Josh Boyer | 3b237aa6c4 | |
Josh Boyer | 5718f82f15 | |
Peter Robinson | 6ffeb85052 | |
Laura Abbott | 359ba4a5a5 | |
Josh Boyer | 07264566ce | |
Josh Boyer | e3ed546de8 | |
Josh Boyer | 31ac9aaba9 | |
Laura Abbott | 61b3efdaf3 | |
Josh Boyer | 829cdb4122 | |
Josh Boyer | ad7e6384f2 | |
Josh Boyer | 8bac7ffd2e | |
Josh Boyer | a5365bada3 | |
Josh Boyer | b46cbb7a08 | |
Laura Abbott | 241d0ebaa0 | |
Josh Boyer | b455fb7efb | |
Josh Boyer | aa51b0f157 | |
Josh Boyer | cfea5d0ea3 | |
Laura Abbott | aeb4869c0c | |
Laura Abbott | 740bc085d1 | |
Josh Boyer | 8e9fb8b225 | |
Peter Robinson | 91a0e4e802 | |
Peter Robinson | 263692cb0a | |
Josh Boyer | ce3e329885 | |
Peter Robinson | b768c592b5 | |
Peter Robinson | ff5d79335a | |
Josh Boyer | a142882824 | |
Hubbitus | aca23cecd8 | |
Hubbitus | 2298949b7b | |
Hubbitus | e9c582ccda | |
Josh Boyer | 249df778d4 | |
Peter Robinson | 6960a00a85 | |
Peter Robinson | 375d47d148 | |
Laura Abbott | 925196e8fe | |
Josh Boyer | 02a0561a6f | |
Josh Boyer | 9795bb7cf4 | |
Laura Abbott | feac13ee0f | |
Josh Boyer | a5c804ea10 | |
Hubbitus | 8d24eb8e8d | |
Laura Abbott | 6c73a14ffa | |
Josh Boyer | 5ec2628b48 | |
Justin M. Forbes | 4a994122a0 | |
Josh Boyer | 82e1eb9643 | |
Hubbitus | 4a1b040bba | |
Josh Boyer | f7efdbdd4d | |
Josh Boyer | 8cd63a28c3 | |
Josh Boyer | c2ec7052e3 | |
Josh Boyer | 591c381e9c | |
Josh Boyer | 5f515ca357 | |
Josh Boyer | 6624109f08 | |
Josh Boyer | 2cfc982d50 | |
Josh Boyer | b9c19eabc6 | |
Josh Boyer | 045cecf6bb | |
Josh Boyer | 436b9d9276 | |
Laura Abbott | c3ca63419d | |
Laura Abbott | 58d0ff256e | |
Laura Abbott | ecd9c7101b | |
Josh Boyer | c61722aea2 | |
Laura Abbott | 1bb8c9a4d3 | |
Josh Boyer | 352b9ec984 | |
Josh Boyer | 385343afb7 | |
Josh Boyer | eb78e8c3fd | |
Josh Boyer | b93f7c471b | |
Justin M. Forbes | 1c0ec5c8f1 | |
Josh Boyer | 62747f0602 | |
Justin M. Forbes | 6b922b61b8 | |
Josh Boyer | d7c3b932a4 | |
Josh Boyer | a1fddda2ea | |
Laura Abbott | d10c790687 | |
Josh Boyer | 765bd47756 | |
Justin M. Forbes | ad7eac2abb | |
Josh Boyer | 2cd82cc364 | |
Josh Boyer | 4adbe9df49 | |
Josh Boyer | 3c33bbf8a1 | |
Laura Abbott | 5eea87c8fa | |
Josh Boyer | 2aaba31e49 | |
Justin M. Forbes | 40fce7a9f9 | |
Laura Abbott | 2f009030cb | |
Josh Boyer | a8e97b2402 | |
Justin M. Forbes | 1b0edc7d9b | |
Josh Boyer | 3d3df60dcd | |
Laura Abbott | 11ed0f9770 | |
Justin M. Forbes | c22ccffa80 | |
Josh Boyer | 14c000747b | |
Peter Robinson | 197b945cff | |
Justin M. Forbes | b61107922c | |
Justin M. Forbes | df7af79594 | |
Josh Boyer | 5448a3eac2 | |
Justin M. Forbes | 8211a26005 | |
Josh Boyer | fa801da62f | |
Josh Boyer | ee54dc10fd | |
Justin M. Forbes | 41237e1e4b | |
Josh Boyer | 8f12f4a6b4 | |
Justin M. Forbes | 0f7105e9bc | |
Josh Boyer | 90c43481e7 | |
Justin M. Forbes | 8db85be13f | |
Josh Boyer | fa59ce88af | |
Josh Boyer | eff5420f79 | |
Josh Boyer | cbb8a694bd | |
Peter Robinson | 6aa9b21f87 | |
Peter Robinson | 9ed4e5a6ac | |
Laura Abbott | b9992ba31f | |
Josh Boyer | 6bb1eb088b | |
Josh Boyer | 92d6f6219a | |
Josh Boyer | 721969bbbe | |
Josh Boyer | 097f49cf7d | |
Josh Boyer | 8f3ea8efc7 | |
Peter Jones | ff699b3898 | |
Josh Boyer | ab147f2e64 | |
Josh Boyer | 498055861e | |
Josh Boyer | d97032bf4d | |
Josh Boyer | 1a6df1b900 | |
Josh Boyer | f3285df6ad | |
Josh Boyer | a86ca716e6 | |
Peter Jones | 571a39e572 | |
Josh Boyer | ba969407f8 | |
Josh Boyer | 69e62930fa | |
Josh Boyer | 83d70862f3 | |
Josh Boyer | 6b80640f60 | |
Josh Boyer | b3cc05f52f | |
Peter Robinson | d2357b5286 | |
Josh Boyer | 069780434c | |
Josh Boyer | ef873954a5 | |
Josh Boyer | abd32ea61a | |
Josh Boyer | 1654466ce9 | |
Peter Robinson | 2464bd0900 | |
Josh Boyer | 57da8c8042 | |
Josh Boyer | 5d1d60df95 | |
Josh Boyer | 51ab767c6f | |
Josh Boyer | 5c419be2ac | |
Josh Boyer | 57574e5ee3 | |
Josh Boyer | d7ac01aa2c | |
Josh Boyer | 53cebab302 | |
Peter Robinson | 32901ddb89 | |
Jarod Wilson | f079072cc5 | |
Josh Boyer | f407480a26 | |
Jarod Wilson | 1a7a65b477 | |
Jarod Wilson | debc07551f | |
Jarod Wilson | cfabbc3496 | |
Kyle McMartin | 32b7aa0cb5 | |
Kyle McMartin | b932f950c0 | |
Kyle McMartin | 3cfa813c24 | |
Jarod Wilson | f8e9640c2b |
|
@ -1,2 +1,2 @@
|
|||
*.xz
|
||||
*.bz2
|
||||
/_tmp/
|
||||
/.build-*.log
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
From 1989dada7ce07848196991c9ebf25ff9c5f14d4e Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Date: Tue, 13 Sep 2016 11:52:37 +0200
|
||||
Subject: [PATCH] HID: input: ignore System Control application usages if not
|
||||
System Controls
|
||||
|
||||
Microsoft is reusing its report descriptor again and again, and part of it
|
||||
looks like this:
|
||||
|
||||
0x05, 0x01, // Usage Page (Generic Desktop) 299
|
||||
0x09, 0x80, // Usage (System Control) 301
|
||||
0xa1, 0x01, // Collection (Application) 303
|
||||
0x85, 0x03, // Report ID (3) 305
|
||||
0x19, 0x00, // Usage Minimum (0) 307
|
||||
0x29, 0xff, // Usage Maximum (255) 309
|
||||
0x15, 0x00, // Logical Minimum (0) 311
|
||||
0x26, 0xff, 0x00, // Logical Maximum (255) 313
|
||||
0x81, 0x00, // Input (Data,Arr,Abs) 316
|
||||
0xc0, // End Collection 318
|
||||
|
||||
While there is nothing wrong in term of processing, we do however blindly
|
||||
map the full usage range (it's an array) from 0x00 to 0xff, which creates
|
||||
some interesting axis, like ABS_X|Y, and a bunch of ABS_MISC + n.
|
||||
|
||||
While libinput and other stacks don't care that much (we can detect them),
|
||||
joydev is very happy and attaches itself to the mouse or keyboard.
|
||||
|
||||
The problem is that joydev now handles the device as a joystick, but given
|
||||
that we have a HID array, it sets all the ABS_* values to 0. And in its
|
||||
world, 0 means -32767 (minimum value), which sends spurious events to games
|
||||
(think Steam).
|
||||
|
||||
It looks like hid-microsoft tries to tackle the very same problem with its
|
||||
.report_fixup callback. But fixing the report descriptor is an endless task
|
||||
and is quite obfuscated.
|
||||
|
||||
So take the hammer, and decide that if the application is meant to be
|
||||
System Control, any other usage not in the System Control range should
|
||||
be ignored.
|
||||
|
||||
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1325354
|
||||
Link: https://bugzilla.kernel.org/show_bug.cgi?id=28912
|
||||
Link: https://github.com/ValveSoftware/steam-for-linux/issues/3384
|
||||
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1325354
|
||||
Link: https://bugzilla.kernel.org/show_bug.cgi?id=37982
|
||||
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
drivers/hid/hid-input.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
|
||||
index bcfaf32..058919d 100644
|
||||
--- a/drivers/hid/hid-input.c
|
||||
+++ b/drivers/hid/hid-input.c
|
||||
@@ -604,6 +604,15 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
|
||||
break;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Some lazy vendors declare 255 usages for System Control,
|
||||
+ * leading to the creation of ABS_X|Y axis and too many others.
|
||||
+ * It wouldn't be a problem if joydev doesn't consider the
|
||||
+ * device as a joystick then.
|
||||
+ */
|
||||
+ if (field->application == HID_GD_SYSTEM_CONTROL)
|
||||
+ goto ignore;
|
||||
+
|
||||
if ((usage->hid & 0xf0) == 0x90) { /* D-pad */
|
||||
switch (usage->hid) {
|
||||
case HID_GD_UP: usage->hat_dir = 1; break;
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
From a7f80308bac4013728e33e2bcb9b60eee78f60fb Mon Sep 17 00:00:00 2001
|
||||
From: Michal Hocko <mhocko@kernel.org>
|
||||
Date: Mon, 22 Aug 2016 11:32:49 +0200
|
||||
Subject: [PATCH] OOM detection regressions since 4.7
|
||||
|
||||
Hi,
|
||||
there have been multiple reports [1][2][3][4][5] about pre-mature OOM
|
||||
killer invocations since 4.7 which contains oom detection rework. All of
|
||||
them were for order-2 (kernel stack) alloaction requests failing because
|
||||
of a high fragmentation and compaction failing to make any forward
|
||||
progress. While investigating this we have found out that the compaction
|
||||
just gives up too early. Vlastimil has been working on compaction
|
||||
improvement for quite some time and his series [6] is already sitting
|
||||
in mmotm tree. This already helps a lot because it drops some heuristics
|
||||
which are more aimed at lower latencies for high orders rather than
|
||||
reliability. Joonsoo has then identified further problem with too many
|
||||
blocks being marked as unmovable [7] and Vlastimil has prepared a patch
|
||||
on top of his series [8] which is also in the mmotm tree now.
|
||||
|
||||
That being said, the regression is real and should be fixed for 4.7
|
||||
stable users. [6][8] was reported to help and ooms are no longer
|
||||
reproducible. I know we are quite late (rc3) in 4.8 but I would vote
|
||||
for mergeing those patches and have them in 4.8. For 4.7 I would go
|
||||
with a partial revert of the detection rework for high order requests
|
||||
(see patch below). This patch is really trivial. If those compaction
|
||||
improvements are just too large for 4.8 then we can use the same patch
|
||||
as for 4.7 stable for now and revert it in 4.9 after compaction changes
|
||||
are merged.
|
||||
|
||||
Thoughts?
|
||||
|
||||
[1] http://lkml.kernel.org/r/20160731051121.GB307@x4
|
||||
[2] http://lkml.kernel.org/r/201608120901.41463.a.miskiewicz@gmail.com
|
||||
[3] http://lkml.kernel.org/r/20160801192620.GD31957@dhcp22.suse.cz
|
||||
[4] https://lists.opensuse.org/opensuse-kernel/2016-08/msg00021.html
|
||||
[5] https://bugzilla.opensuse.org/show_bug.cgi?id=994066
|
||||
[6] http://lkml.kernel.org/r/20160810091226.6709-1-vbabka@suse.cz
|
||||
[7] http://lkml.kernel.org/r/20160816031222.GC16913@js1304-P5Q-DELUXE
|
||||
[8] http://lkml.kernel.org/r/f7a9ea9d-bb88-bfd6-e340-3a933559305a@suse.cz
|
||||
---
|
||||
mm/page_alloc.c | 50 ++------------------------------------------------
|
||||
1 file changed, 2 insertions(+), 48 deletions(-)
|
||||
|
||||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
|
||||
index 8b3e134..6e35419 100644
|
||||
--- a/mm/page_alloc.c
|
||||
+++ b/mm/page_alloc.c
|
||||
@@ -3254,53 +3254,6 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-static inline bool
|
||||
-should_compact_retry(struct alloc_context *ac, int order, int alloc_flags,
|
||||
- enum compact_result compact_result, enum migrate_mode *migrate_mode,
|
||||
- int compaction_retries)
|
||||
-{
|
||||
- int max_retries = MAX_COMPACT_RETRIES;
|
||||
-
|
||||
- if (!order)
|
||||
- return false;
|
||||
-
|
||||
- /*
|
||||
- * compaction considers all the zone as desperately out of memory
|
||||
- * so it doesn't really make much sense to retry except when the
|
||||
- * failure could be caused by weak migration mode.
|
||||
- */
|
||||
- if (compaction_failed(compact_result)) {
|
||||
- if (*migrate_mode == MIGRATE_ASYNC) {
|
||||
- *migrate_mode = MIGRATE_SYNC_LIGHT;
|
||||
- return true;
|
||||
- }
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * make sure the compaction wasn't deferred or didn't bail out early
|
||||
- * due to locks contention before we declare that we should give up.
|
||||
- * But do not retry if the given zonelist is not suitable for
|
||||
- * compaction.
|
||||
- */
|
||||
- if (compaction_withdrawn(compact_result))
|
||||
- return compaction_zonelist_suitable(ac, order, alloc_flags);
|
||||
-
|
||||
- /*
|
||||
- * !costly requests are much more important than __GFP_REPEAT
|
||||
- * costly ones because they are de facto nofail and invoke OOM
|
||||
- * killer to move on while costly can fail and users are ready
|
||||
- * to cope with that. 1/4 retries is rather arbitrary but we
|
||||
- * would need much more detailed feedback from compaction to
|
||||
- * make a better decision.
|
||||
- */
|
||||
- if (order > PAGE_ALLOC_COSTLY_ORDER)
|
||||
- max_retries /= 4;
|
||||
- if (compaction_retries <= max_retries)
|
||||
- return true;
|
||||
-
|
||||
- return false;
|
||||
-}
|
||||
#else
|
||||
static inline struct page *
|
||||
__alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
|
||||
@@ -3311,6 +3264,8 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+#endif /* CONFIG_COMPACTION */
|
||||
+
|
||||
static inline bool
|
||||
should_compact_retry(struct alloc_context *ac, unsigned int order, int alloc_flags,
|
||||
enum compact_result compact_result,
|
||||
@@ -3337,7 +3292,6 @@ should_compact_retry(struct alloc_context *ac, unsigned int order, int alloc_fla
|
||||
}
|
||||
return false;
|
||||
}
|
||||
-#endif /* CONFIG_COMPACTION */
|
||||
|
||||
/* Perform direct synchronous page reclaim */
|
||||
static int
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
From 1aab956c7b8872fb6976328316bfad62c6e67cf8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
|
||||
Date: Fri, 21 Oct 2016 16:44:38 +0300
|
||||
Subject: [PATCH] drm/i915: Refresh that status of MST capable connectors in
|
||||
->detect()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Once we've determined that the sink is MST capable we never end up
|
||||
running through the full detect cycle again, despite getting HPDs.
|
||||
Fix tht by ripping out the incorrect piece of code responsible.
|
||||
|
||||
This got broken when I moved the long HPD handling to the ->detect()
|
||||
hook, but failed to remove the leftover code.
|
||||
|
||||
Cc: Ander Conselvan de Oliveira <conselvan2@gmail.com>
|
||||
Cc: drm-intel-fixes@lists.freedesktop.org
|
||||
Cc: Rui Tiago Matos <tiagomatos@gmail.com>
|
||||
Tested-by: Rui Tiago Matos <tiagomatos@gmail.com>
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98323
|
||||
Cc: Kirill A. Shutemov <kirill@shutemov.name>
|
||||
Tested-by: Kirill A. Shutemov <kirill@shutemov.name>
|
||||
References: https://bugs.freedesktop.org/show_bug.cgi?id=98306
|
||||
Fixes: 27d4efc5591a ("drm/i915: Move long hpd handling into the hotplug work")
|
||||
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1477057478-29328-1-git-send-email-ville.syrjala@linux.intel.com
|
||||
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_dp.c | 10 ----------
|
||||
1 file changed, 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
|
||||
index f30db8f..80db8a3 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_dp.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_dp.c
|
||||
@@ -4492,21 +4492,11 @@ static enum drm_connector_status
|
||||
intel_dp_detect(struct drm_connector *connector, bool force)
|
||||
{
|
||||
struct intel_dp *intel_dp = intel_attached_dp(connector);
|
||||
- struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
|
||||
- struct intel_encoder *intel_encoder = &intel_dig_port->base;
|
||||
enum drm_connector_status status = connector->status;
|
||||
|
||||
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
|
||||
connector->base.id, connector->name);
|
||||
|
||||
- if (intel_dp->is_mst) {
|
||||
- /* MST devices are disconnected from a monitor POV */
|
||||
- intel_dp_unset_edid(intel_dp);
|
||||
- if (intel_encoder->type != INTEL_OUTPUT_EDP)
|
||||
- intel_encoder->type = INTEL_OUTPUT_DP;
|
||||
- return connector_status_disconnected;
|
||||
- }
|
||||
-
|
||||
/* If full detect is not performed yet, do a full detect */
|
||||
if (!intel_dp->detect_done)
|
||||
status = intel_dp_long_pulse(intel_dp->attached_connector);
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,227 @@
|
|||
From 0042e1e7a03a2fb5d6c464c03ce84d55b31add11 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Roper <matthew.d.roper@intel.com>
|
||||
Date: Thu, 12 May 2016 07:05:55 -0700
|
||||
Subject: [PATCH 01/17] drm/i915: Reorganize WM structs/unions in CRTC state
|
||||
|
||||
Reorganize the nested structures and unions we have for pipe watermark
|
||||
data in intel_crtc_state so that platform-specific data can be added in
|
||||
a more sensible manner (and save a bit of memory at the same time).
|
||||
|
||||
The change basically changes the organization from:
|
||||
|
||||
union {
|
||||
struct intel_pipe_wm ilk;
|
||||
struct intel_pipe_wm skl;
|
||||
} optimal;
|
||||
|
||||
struct intel_pipe_wm intermediate /* ILK-only */
|
||||
|
||||
to
|
||||
|
||||
union {
|
||||
struct {
|
||||
struct intel_pipe_wm intermediate;
|
||||
struct intel_pipe_wm optimal;
|
||||
} ilk;
|
||||
|
||||
struct {
|
||||
struct intel_pipe_wm optimal;
|
||||
} skl;
|
||||
}
|
||||
|
||||
There should be no functional change here, but it will allow us to add
|
||||
more platform-specific fields going forward (and more easily extend to
|
||||
other platform types like VLV).
|
||||
|
||||
While we're at it, let's move the entire watermark substructure out to
|
||||
its own structure definition to make the code slightly more readable.
|
||||
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-2-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_display.c | 2 +-
|
||||
drivers/gpu/drm/i915/intel_drv.h | 61 +++++++++++++++++++++---------------
|
||||
drivers/gpu/drm/i915/intel_pm.c | 18 +++++------
|
||||
3 files changed, 45 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index d19b392..4633aec 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -12027,7 +12027,7 @@ static int intel_crtc_atomic_check(struct drm_crtc *crtc,
|
||||
}
|
||||
} else if (dev_priv->display.compute_intermediate_wm) {
|
||||
if (HAS_PCH_SPLIT(dev_priv) && INTEL_GEN(dev_priv) < 9)
|
||||
- pipe_config->wm.intermediate = pipe_config->wm.optimal.ilk;
|
||||
+ pipe_config->wm.ilk.intermediate = pipe_config->wm.ilk.optimal;
|
||||
}
|
||||
|
||||
if (INTEL_INFO(dev)->gen >= 9) {
|
||||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||
index 4a24b00..5a186bf 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||
@@ -405,6 +405,40 @@ struct skl_pipe_wm {
|
||||
uint32_t linetime;
|
||||
};
|
||||
|
||||
+struct intel_crtc_wm_state {
|
||||
+ union {
|
||||
+ struct {
|
||||
+ /*
|
||||
+ * Intermediate watermarks; these can be
|
||||
+ * programmed immediately since they satisfy
|
||||
+ * both the current configuration we're
|
||||
+ * switching away from and the new
|
||||
+ * configuration we're switching to.
|
||||
+ */
|
||||
+ struct intel_pipe_wm intermediate;
|
||||
+
|
||||
+ /*
|
||||
+ * Optimal watermarks, programmed post-vblank
|
||||
+ * when this state is committed.
|
||||
+ */
|
||||
+ struct intel_pipe_wm optimal;
|
||||
+ } ilk;
|
||||
+
|
||||
+ struct {
|
||||
+ /* gen9+ only needs 1-step wm programming */
|
||||
+ struct skl_pipe_wm optimal;
|
||||
+ } skl;
|
||||
+ };
|
||||
+
|
||||
+ /*
|
||||
+ * Platforms with two-step watermark programming will need to
|
||||
+ * update watermark programming post-vblank to switch from the
|
||||
+ * safe intermediate watermarks to the optimal final
|
||||
+ * watermarks.
|
||||
+ */
|
||||
+ bool need_postvbl_update;
|
||||
+};
|
||||
+
|
||||
struct intel_crtc_state {
|
||||
struct drm_crtc_state base;
|
||||
|
||||
@@ -558,32 +592,7 @@ struct intel_crtc_state {
|
||||
/* IVB sprite scaling w/a (WaCxSRDisabledForSpriteScaling:ivb) */
|
||||
bool disable_lp_wm;
|
||||
|
||||
- struct {
|
||||
- /*
|
||||
- * Optimal watermarks, programmed post-vblank when this state
|
||||
- * is committed.
|
||||
- */
|
||||
- union {
|
||||
- struct intel_pipe_wm ilk;
|
||||
- struct skl_pipe_wm skl;
|
||||
- } optimal;
|
||||
-
|
||||
- /*
|
||||
- * Intermediate watermarks; these can be programmed immediately
|
||||
- * since they satisfy both the current configuration we're
|
||||
- * switching away from and the new configuration we're switching
|
||||
- * to.
|
||||
- */
|
||||
- struct intel_pipe_wm intermediate;
|
||||
-
|
||||
- /*
|
||||
- * Platforms with two-step watermark programming will need to
|
||||
- * update watermark programming post-vblank to switch from the
|
||||
- * safe intermediate watermarks to the optimal final
|
||||
- * watermarks.
|
||||
- */
|
||||
- bool need_postvbl_update;
|
||||
- } wm;
|
||||
+ struct intel_crtc_wm_state wm;
|
||||
|
||||
/* Gamma mode programmed on the pipe */
|
||||
uint32_t gamma_mode;
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index a7ef45d..4353fec 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -2309,7 +2309,7 @@ static int ilk_compute_pipe_wm(struct intel_crtc_state *cstate)
|
||||
int level, max_level = ilk_wm_max_level(dev), usable_level;
|
||||
struct ilk_wm_maximums max;
|
||||
|
||||
- pipe_wm = &cstate->wm.optimal.ilk;
|
||||
+ pipe_wm = &cstate->wm.ilk.optimal;
|
||||
|
||||
for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
struct intel_plane_state *ps;
|
||||
@@ -2391,7 +2391,7 @@ static int ilk_compute_intermediate_wm(struct drm_device *dev,
|
||||
struct intel_crtc *intel_crtc,
|
||||
struct intel_crtc_state *newstate)
|
||||
{
|
||||
- struct intel_pipe_wm *a = &newstate->wm.intermediate;
|
||||
+ struct intel_pipe_wm *a = &newstate->wm.ilk.intermediate;
|
||||
struct intel_pipe_wm *b = &intel_crtc->wm.active.ilk;
|
||||
int level, max_level = ilk_wm_max_level(dev);
|
||||
|
||||
@@ -2400,7 +2400,7 @@ static int ilk_compute_intermediate_wm(struct drm_device *dev,
|
||||
* currently active watermarks to get values that are safe both before
|
||||
* and after the vblank.
|
||||
*/
|
||||
- *a = newstate->wm.optimal.ilk;
|
||||
+ *a = newstate->wm.ilk.optimal;
|
||||
a->pipe_enabled |= b->pipe_enabled;
|
||||
a->sprites_enabled |= b->sprites_enabled;
|
||||
a->sprites_scaled |= b->sprites_scaled;
|
||||
@@ -2429,7 +2429,7 @@ static int ilk_compute_intermediate_wm(struct drm_device *dev,
|
||||
* If our intermediate WM are identical to the final WM, then we can
|
||||
* omit the post-vblank programming; only update if it's different.
|
||||
*/
|
||||
- if (memcmp(a, &newstate->wm.optimal.ilk, sizeof(*a)) == 0)
|
||||
+ if (memcmp(a, &newstate->wm.ilk.optimal, sizeof(*a)) == 0)
|
||||
newstate->wm.need_postvbl_update = false;
|
||||
|
||||
return 0;
|
||||
@@ -3678,7 +3678,7 @@ static void skl_update_wm(struct drm_crtc *crtc)
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
struct skl_wm_values *results = &dev_priv->wm.skl_results;
|
||||
struct intel_crtc_state *cstate = to_intel_crtc_state(crtc->state);
|
||||
- struct skl_pipe_wm *pipe_wm = &cstate->wm.optimal.skl;
|
||||
+ struct skl_pipe_wm *pipe_wm = &cstate->wm.skl.optimal;
|
||||
|
||||
|
||||
/* Clear all dirty flags */
|
||||
@@ -3757,7 +3757,7 @@ static void ilk_initial_watermarks(struct intel_crtc_state *cstate)
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(cstate->base.crtc);
|
||||
|
||||
mutex_lock(&dev_priv->wm.wm_mutex);
|
||||
- intel_crtc->wm.active.ilk = cstate->wm.intermediate;
|
||||
+ intel_crtc->wm.active.ilk = cstate->wm.ilk.intermediate;
|
||||
ilk_program_watermarks(dev_priv);
|
||||
mutex_unlock(&dev_priv->wm.wm_mutex);
|
||||
}
|
||||
@@ -3769,7 +3769,7 @@ static void ilk_optimize_watermarks(struct intel_crtc_state *cstate)
|
||||
|
||||
mutex_lock(&dev_priv->wm.wm_mutex);
|
||||
if (cstate->wm.need_postvbl_update) {
|
||||
- intel_crtc->wm.active.ilk = cstate->wm.optimal.ilk;
|
||||
+ intel_crtc->wm.active.ilk = cstate->wm.ilk.optimal;
|
||||
ilk_program_watermarks(dev_priv);
|
||||
}
|
||||
mutex_unlock(&dev_priv->wm.wm_mutex);
|
||||
@@ -3826,7 +3826,7 @@ static void skl_pipe_wm_get_hw_state(struct drm_crtc *crtc)
|
||||
struct skl_wm_values *hw = &dev_priv->wm.skl_hw;
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||
struct intel_crtc_state *cstate = to_intel_crtc_state(crtc->state);
|
||||
- struct skl_pipe_wm *active = &cstate->wm.optimal.skl;
|
||||
+ struct skl_pipe_wm *active = &cstate->wm.skl.optimal;
|
||||
enum pipe pipe = intel_crtc->pipe;
|
||||
int level, i, max_level;
|
||||
uint32_t temp;
|
||||
@@ -3892,7 +3892,7 @@ static void ilk_pipe_wm_get_hw_state(struct drm_crtc *crtc)
|
||||
struct ilk_wm_values *hw = &dev_priv->wm.hw;
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||
struct intel_crtc_state *cstate = to_intel_crtc_state(crtc->state);
|
||||
- struct intel_pipe_wm *active = &cstate->wm.optimal.ilk;
|
||||
+ struct intel_pipe_wm *active = &cstate->wm.ilk.optimal;
|
||||
enum pipe pipe = intel_crtc->pipe;
|
||||
static const i915_reg_t wm0_pipe_reg[] = {
|
||||
[PIPE_A] = WM0_PIPEA_ILK,
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
From 0eadbb65c0026fb4eec89c54f6b48a0febd87f92 Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Fri, 9 Sep 2016 08:19:17 -0700
|
||||
Subject: [PATCH] iio: Use type header from kernel tree
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
To: Jonathan Cameron <jic23@kernel.org>
|
||||
To: Hartmut Knaack <knaack.h@gmx.de>
|
||||
To: Lars-Peter Clausen <lars@metafoo.de>
|
||||
To: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
|
||||
Cc: linux-iio@vger.kernel.org
|
||||
Cc: linux-kernel@vger.kernel.org
|
||||
|
||||
|
||||
The iio tools have been updated as new event types have been added to
|
||||
the kernel. The tools currently use the standard system headers which
|
||||
means that the system may not have the newest defintitions. This leads
|
||||
to build failures when building newer tools on older hosts:
|
||||
|
||||
gcc -Wall -g -D_GNU_SOURCE -c -o iio_event_monitor.o
|
||||
iio_event_monitor.c
|
||||
iio_event_monitor.c:59:3: error: ‘IIO_UVINDEX’ undeclared here (not in a
|
||||
function)
|
||||
[IIO_UVINDEX] = "uvindex",
|
||||
^~~~~~~~~~~
|
||||
iio_event_monitor.c:59:3: error: array index in initializer not of
|
||||
integer type
|
||||
iio_event_monitor.c:59:3: note: (near initialization for
|
||||
‘iio_chan_type_name_spec’)
|
||||
iio_event_monitor.c:97:3: error: ‘IIO_MOD_LIGHT_UV’ undeclared here (not
|
||||
in a function)
|
||||
[IIO_MOD_LIGHT_UV] = "uv",
|
||||
^~~~~~~~~~~~~~~~
|
||||
iio_event_monitor.c:97:3: error: array index in initializer not of
|
||||
integer type
|
||||
iio_event_monitor.c:97:3: note: (near initialization for
|
||||
‘iio_modifier_names’)
|
||||
<builtin>: recipe for target 'iio_event_monitor.o' failed
|
||||
|
||||
Switch to using the header from the kernel tree to ensure the newest
|
||||
defintions are always picked up.
|
||||
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
tools/iio/iio_event_monitor.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
|
||||
index d9b7e0f..f02523d 100644
|
||||
--- a/tools/iio/iio_event_monitor.c
|
||||
+++ b/tools/iio/iio_event_monitor.c
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include "iio_utils.h"
|
||||
#include <linux/iio/events.h>
|
||||
-#include <linux/iio/types.h>
|
||||
+#include "../../include/uapi/linux/iio/types.h"
|
||||
|
||||
static const char * const iio_chan_type_name_spec[] = {
|
||||
[IIO_VOLTAGE] = "voltage",
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
From 0d3f6d297bfb7af24d0508460fdb3d1ec4903fa3 Mon Sep 17 00:00:00 2001
|
||||
From: Martin KaFai Lau <kafai@fb.com>
|
||||
Date: Wed, 11 Nov 2015 11:51:06 -0800
|
||||
Subject: [PATCH] ipv6: Avoid creating RTF_CACHE from a rt that is not managed
|
||||
by fib6 tree
|
||||
|
||||
The original bug report:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1272571
|
||||
|
||||
The setup has a IPv4 GRE tunnel running in a IPSec. The bug
|
||||
happens when ndisc starts sending router solicitation at the gre
|
||||
interface. The simplified oops stack is like:
|
||||
|
||||
__lock_acquire+0x1b2/0x1c30
|
||||
lock_acquire+0xb9/0x140
|
||||
_raw_write_lock_bh+0x3f/0x50
|
||||
__ip6_ins_rt+0x2e/0x60
|
||||
ip6_ins_rt+0x49/0x50
|
||||
~~~~~~~~
|
||||
__ip6_rt_update_pmtu.part.54+0x145/0x250
|
||||
ip6_rt_update_pmtu+0x2e/0x40
|
||||
~~~~~~~~
|
||||
ip_tunnel_xmit+0x1f1/0xf40
|
||||
__gre_xmit+0x7a/0x90
|
||||
ipgre_xmit+0x15a/0x220
|
||||
dev_hard_start_xmit+0x2bd/0x480
|
||||
__dev_queue_xmit+0x696/0x730
|
||||
dev_queue_xmit+0x10/0x20
|
||||
neigh_direct_output+0x11/0x20
|
||||
ip6_finish_output2+0x21f/0x770
|
||||
ip6_finish_output+0xa7/0x1d0
|
||||
ip6_output+0x56/0x190
|
||||
~~~~~~~~
|
||||
ndisc_send_skb+0x1d9/0x400
|
||||
ndisc_send_rs+0x88/0xc0
|
||||
~~~~~~~~
|
||||
|
||||
The rt passed to ip6_rt_update_pmtu() is created by
|
||||
icmp6_dst_alloc() and it is not managed by the fib6 tree,
|
||||
so its rt6i_table == NULL. When __ip6_rt_update_pmtu() creates
|
||||
a RTF_CACHE clone, the newly created clone also has rt6i_table == NULL
|
||||
and it causes the ip6_ins_rt() oops.
|
||||
|
||||
During pmtu update, we only want to create a RTF_CACHE clone
|
||||
from a rt which is currently managed (or owned) by the
|
||||
fib6 tree. It means either rt->rt6i_node != NULL or
|
||||
rt is a RTF_PCPU clone.
|
||||
|
||||
It is worth to note that rt6i_table may not be NULL even it is
|
||||
not (yet) managed by the fib6 tree (e.g. addrconf_dst_alloc()).
|
||||
Hence, rt6i_node is a better check instead of rt6i_table.
|
||||
|
||||
Fixes: 45e4fd26683c ("ipv6: Only create RTF_CACHE routes after encountering pmtu")
|
||||
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
|
||||
Reported-by: Chris Siebenmann <cks-rhbugzilla@cs.toronto.edu>
|
||||
Cc: Chris Siebenmann <cks-rhbugzilla@cs.toronto.edu>
|
||||
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
net/ipv6/route.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
|
||||
index c8bc9b4..74907c5 100644
|
||||
--- a/net/ipv6/route.c
|
||||
+++ b/net/ipv6/route.c
|
||||
@@ -1322,6 +1322,12 @@ static void rt6_do_update_pmtu(struct rt6_info *rt, u32 mtu)
|
||||
rt6_update_expires(rt, net->ipv6.sysctl.ip6_rt_mtu_expires);
|
||||
}
|
||||
|
||||
+static bool rt6_cache_allowed_for_pmtu(const struct rt6_info *rt)
|
||||
+{
|
||||
+ return !(rt->rt6i_flags & RTF_CACHE) &&
|
||||
+ (rt->rt6i_flags & RTF_PCPU || rt->rt6i_node);
|
||||
+}
|
||||
+
|
||||
static void __ip6_rt_update_pmtu(struct dst_entry *dst, const struct sock *sk,
|
||||
const struct ipv6hdr *iph, u32 mtu)
|
||||
{
|
||||
@@ -1335,7 +1341,7 @@ static void __ip6_rt_update_pmtu(struct dst_entry *dst, const struct sock *sk,
|
||||
if (mtu >= dst_mtu(dst))
|
||||
return;
|
||||
|
||||
- if (rt6->rt6i_flags & RTF_CACHE) {
|
||||
+ if (!rt6_cache_allowed_for_pmtu(rt6)) {
|
||||
rt6_do_update_pmtu(rt6, mtu);
|
||||
} else {
|
||||
const struct in6_addr *daddr, *saddr;
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
From 4d1b08a69350d40e0aa14baba4797ef175295718 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 30 Mar 2016 12:40:54 +0100
|
||||
Subject: [PATCH 1/2] net: dsa: mv88e6xxx: Introduce
|
||||
_mv88e6xxx_phy_page_{read,write}
|
||||
|
||||
Add versions of the phy_page_read and _write functions to
|
||||
be used in a context where the SMI mutex is held.
|
||||
|
||||
Tested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
|
||||
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
|
||||
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
|
||||
---
|
||||
drivers/net/dsa/mv88e6xxx.c | 49 +++++++++++++++++++++++++++++++++------------
|
||||
1 file changed, 36 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
|
||||
index 512c8c0..3dcfe13 100644
|
||||
--- a/drivers/net/dsa/mv88e6xxx.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx.c
|
||||
@@ -1929,6 +1929,38 @@ static void mv88e6xxx_bridge_work(struct work_struct *work)
|
||||
}
|
||||
}
|
||||
|
||||
+static int _mv88e6xxx_phy_page_write(struct dsa_switch *ds, int port, int page,
|
||||
+ int reg, int val)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = _mv88e6xxx_phy_write_indirect(ds, port, 0x16, page);
|
||||
+ if (ret < 0)
|
||||
+ goto restore_page_0;
|
||||
+
|
||||
+ ret = _mv88e6xxx_phy_write_indirect(ds, port, reg, val);
|
||||
+restore_page_0:
|
||||
+ _mv88e6xxx_phy_write_indirect(ds, port, 0x16, 0x0);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int _mv88e6xxx_phy_page_read(struct dsa_switch *ds, int port, int page,
|
||||
+ int reg)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = _mv88e6xxx_phy_write_indirect(ds, port, 0x16, page);
|
||||
+ if (ret < 0)
|
||||
+ goto restore_page_0;
|
||||
+
|
||||
+ ret = _mv88e6xxx_phy_read_indirect(ds, port, reg);
|
||||
+restore_page_0:
|
||||
+ _mv88e6xxx_phy_write_indirect(ds, port, 0x16, 0x0);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port)
|
||||
{
|
||||
struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
|
||||
@@ -2383,13 +2415,9 @@ int mv88e6xxx_phy_page_read(struct dsa_switch *ds, int port, int page, int reg)
|
||||
int ret;
|
||||
|
||||
mutex_lock(&ps->smi_mutex);
|
||||
- ret = _mv88e6xxx_phy_write_indirect(ds, port, 0x16, page);
|
||||
- if (ret < 0)
|
||||
- goto error;
|
||||
- ret = _mv88e6xxx_phy_read_indirect(ds, port, reg);
|
||||
-error:
|
||||
- _mv88e6xxx_phy_write_indirect(ds, port, 0x16, 0x0);
|
||||
+ ret = _mv88e6xxx_phy_page_read(ds, port, page, reg);
|
||||
mutex_unlock(&ps->smi_mutex);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2400,14 +2428,9 @@ int mv88e6xxx_phy_page_write(struct dsa_switch *ds, int port, int page,
|
||||
int ret;
|
||||
|
||||
mutex_lock(&ps->smi_mutex);
|
||||
- ret = _mv88e6xxx_phy_write_indirect(ds, port, 0x16, page);
|
||||
- if (ret < 0)
|
||||
- goto error;
|
||||
-
|
||||
- ret = _mv88e6xxx_phy_write_indirect(ds, port, reg, val);
|
||||
-error:
|
||||
- _mv88e6xxx_phy_write_indirect(ds, port, 0x16, 0x0);
|
||||
+ ret = _mv88e6xxx_phy_page_write(ds, port, page, reg, val);
|
||||
mutex_unlock(&ps->smi_mutex);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
--
|
||||
2.7.3
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
From 40c30bbf3377babc4d6bb16b699184236a8bfa27 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Masney <masneyb@onstation.org>
|
||||
Date: Tue, 11 Oct 2016 19:28:02 -0400
|
||||
Subject: [PATCH] platform/x86: ideapad-laptop: Add Lenovo Yoga 910-13IKB to
|
||||
no_hw_rfkill dmi list
|
||||
|
||||
The Lenovo Yoga 910-13IKB does not have a hw rfkill switch, and trying
|
||||
to read the hw rfkill switch through the ideapad module causes it to
|
||||
always report as blocked.
|
||||
|
||||
This commit adds the Lenovo Yoga 910-13IKB to the no_hw_rfkill dmi list,
|
||||
fixing the WiFI breakage.
|
||||
|
||||
Signed-off-by: Brian Masney <masneyb@onstation.org>
|
||||
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
|
||||
---
|
||||
drivers/platform/x86/ideapad-laptop.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
|
||||
index d1a091b..a232394 100644
|
||||
--- a/drivers/platform/x86/ideapad-laptop.c
|
||||
+++ b/drivers/platform/x86/ideapad-laptop.c
|
||||
@@ -933,6 +933,13 @@ static const struct dmi_system_id no_hw_rfkill_list[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 900"),
|
||||
},
|
||||
},
|
||||
+ {
|
||||
+ .ident = "Lenovo YOGA 910-13IKB",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo YOGA 910-13IKB"),
|
||||
+ },
|
||||
+ },
|
||||
{}
|
||||
};
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,203 @@
|
|||
From 7ea59202db8d20806d9ae552acd1875c3a978bcc Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
Date: Mon, 23 May 2016 10:54:11 -0400
|
||||
Subject: [PATCH] selinux: Only apply bounds checking to source types
|
||||
|
||||
The current bounds checking of both source and target types
|
||||
requires allowing any domain that has access to the child
|
||||
domain to also have the same permissions to the parent, which
|
||||
is undesirable. Drop the target bounds checking.
|
||||
|
||||
KaiGai Kohei originally removed all use of target bounds in
|
||||
commit 7d52a155e38d ("selinux: remove dead code in
|
||||
type_attribute_bounds_av()") but this was reverted in
|
||||
commit 2ae3ba39389b ("selinux: libsepol: remove dead code in
|
||||
check_avtab_hierarchy_callback()") because it would have
|
||||
required explicitly allowing the parent any permissions
|
||||
to the child that the child is allowed to itself.
|
||||
|
||||
This change in contrast retains the logic for the case where both
|
||||
source and target types are bounded, thereby allowing access
|
||||
if the parent of the source is allowed the corresponding
|
||||
permissions to the parent of the target. Further, this change
|
||||
reworks the logic such that we only perform a single computation
|
||||
for each case and there is no ambiguity as to how to resolve
|
||||
a bounds violation.
|
||||
|
||||
Under the new logic, if the source type and target types are both
|
||||
bounded, then the parent of the source type must be allowed the same
|
||||
permissions to the parent of the target type. If only the source
|
||||
type is bounded, then the parent of the source type must be allowed
|
||||
the same permissions to the target type.
|
||||
|
||||
Examples of the new logic and comparisons with the old logic:
|
||||
1. If we have:
|
||||
typebounds A B;
|
||||
then:
|
||||
allow B self:process <permissions>;
|
||||
will satisfy the bounds constraint iff:
|
||||
allow A self:process <permissions>;
|
||||
is also allowed in policy.
|
||||
|
||||
Under the old logic, the allow rule on B satisfies the
|
||||
bounds constraint if any of the following three are allowed:
|
||||
allow A B:process <permissions>; or
|
||||
allow B A:process <permissions>; or
|
||||
allow A self:process <permissions>;
|
||||
However, either of the first two ultimately require the third to
|
||||
satisfy the bounds constraint under the old logic, and therefore
|
||||
this degenerates to the same result (but is more efficient - we only
|
||||
need to perform one compute_av call).
|
||||
|
||||
2. If we have:
|
||||
typebounds A B;
|
||||
typebounds A_exec B_exec;
|
||||
then:
|
||||
allow B B_exec:file <permissions>;
|
||||
will satisfy the bounds constraint iff:
|
||||
allow A A_exec:file <permissions>;
|
||||
is also allowed in policy.
|
||||
|
||||
This is essentially the same as #1; it is merely included as
|
||||
an example of dealing with object types related to a bounded domain
|
||||
in a manner that satisfies the bounds relationship. Note that
|
||||
this approach is preferable to leaving B_exec unbounded and having:
|
||||
allow A B_exec:file <permissions>;
|
||||
in policy because that would allow B's entrypoints to be used to
|
||||
enter A. Similarly for _tmp or other related types.
|
||||
|
||||
3. If we have:
|
||||
typebounds A B;
|
||||
and an unbounded type T, then:
|
||||
allow B T:file <permissions>;
|
||||
will satisfy the bounds constraint iff:
|
||||
allow A T:file <permissions>;
|
||||
is allowed in policy.
|
||||
|
||||
The old logic would have been identical for this example.
|
||||
|
||||
4. If we have:
|
||||
typebounds A B;
|
||||
and an unbounded domain D, then:
|
||||
allow D B:unix_stream_socket <permissions>;
|
||||
is not subject to any bounds constraints under the new logic
|
||||
because D is not bounded. This is desirable so that we can
|
||||
allow a domain to e.g. connectto a child domain without having
|
||||
to allow it to do the same to its parent.
|
||||
|
||||
The old logic would have required:
|
||||
allow D A:unix_stream_socket <permissions>;
|
||||
to also be allowed in policy.
|
||||
|
||||
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
[PM: re-wrapped description to appease checkpatch.pl]
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
security/selinux/ss/services.c | 70 +++++++++++++-----------------------------
|
||||
1 file changed, 22 insertions(+), 48 deletions(-)
|
||||
|
||||
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
|
||||
index 89df646..082b20c 100644
|
||||
--- a/security/selinux/ss/services.c
|
||||
+++ b/security/selinux/ss/services.c
|
||||
@@ -543,7 +543,7 @@ static void type_attribute_bounds_av(struct context *scontext,
|
||||
struct av_decision *avd)
|
||||
{
|
||||
struct context lo_scontext;
|
||||
- struct context lo_tcontext;
|
||||
+ struct context lo_tcontext, *tcontextp = tcontext;
|
||||
struct av_decision lo_avd;
|
||||
struct type_datum *source;
|
||||
struct type_datum *target;
|
||||
@@ -553,67 +553,41 @@ static void type_attribute_bounds_av(struct context *scontext,
|
||||
scontext->type - 1);
|
||||
BUG_ON(!source);
|
||||
|
||||
+ if (!source->bounds)
|
||||
+ return;
|
||||
+
|
||||
target = flex_array_get_ptr(policydb.type_val_to_struct_array,
|
||||
tcontext->type - 1);
|
||||
BUG_ON(!target);
|
||||
|
||||
- if (source->bounds) {
|
||||
- memset(&lo_avd, 0, sizeof(lo_avd));
|
||||
-
|
||||
- memcpy(&lo_scontext, scontext, sizeof(lo_scontext));
|
||||
- lo_scontext.type = source->bounds;
|
||||
+ memset(&lo_avd, 0, sizeof(lo_avd));
|
||||
|
||||
- context_struct_compute_av(&lo_scontext,
|
||||
- tcontext,
|
||||
- tclass,
|
||||
- &lo_avd,
|
||||
- NULL);
|
||||
- if ((lo_avd.allowed & avd->allowed) == avd->allowed)
|
||||
- return; /* no masked permission */
|
||||
- masked = ~lo_avd.allowed & avd->allowed;
|
||||
- }
|
||||
+ memcpy(&lo_scontext, scontext, sizeof(lo_scontext));
|
||||
+ lo_scontext.type = source->bounds;
|
||||
|
||||
if (target->bounds) {
|
||||
- memset(&lo_avd, 0, sizeof(lo_avd));
|
||||
-
|
||||
memcpy(&lo_tcontext, tcontext, sizeof(lo_tcontext));
|
||||
lo_tcontext.type = target->bounds;
|
||||
-
|
||||
- context_struct_compute_av(scontext,
|
||||
- &lo_tcontext,
|
||||
- tclass,
|
||||
- &lo_avd,
|
||||
- NULL);
|
||||
- if ((lo_avd.allowed & avd->allowed) == avd->allowed)
|
||||
- return; /* no masked permission */
|
||||
- masked = ~lo_avd.allowed & avd->allowed;
|
||||
+ tcontextp = &lo_tcontext;
|
||||
}
|
||||
|
||||
- if (source->bounds && target->bounds) {
|
||||
- memset(&lo_avd, 0, sizeof(lo_avd));
|
||||
- /*
|
||||
- * lo_scontext and lo_tcontext are already
|
||||
- * set up.
|
||||
- */
|
||||
+ context_struct_compute_av(&lo_scontext,
|
||||
+ tcontextp,
|
||||
+ tclass,
|
||||
+ &lo_avd,
|
||||
+ NULL);
|
||||
|
||||
- context_struct_compute_av(&lo_scontext,
|
||||
- &lo_tcontext,
|
||||
- tclass,
|
||||
- &lo_avd,
|
||||
- NULL);
|
||||
- if ((lo_avd.allowed & avd->allowed) == avd->allowed)
|
||||
- return; /* no masked permission */
|
||||
- masked = ~lo_avd.allowed & avd->allowed;
|
||||
- }
|
||||
+ masked = ~lo_avd.allowed & avd->allowed;
|
||||
|
||||
- if (masked) {
|
||||
- /* mask violated permissions */
|
||||
- avd->allowed &= ~masked;
|
||||
+ if (likely(!masked))
|
||||
+ return; /* no masked permission */
|
||||
|
||||
- /* audit masked permissions */
|
||||
- security_dump_masked_av(scontext, tcontext,
|
||||
- tclass, masked, "bounds");
|
||||
- }
|
||||
+ /* mask violated permissions */
|
||||
+ avd->allowed &= ~masked;
|
||||
+
|
||||
+ /* audit masked permissions */
|
||||
+ security_dump_masked_av(scontext, tcontext,
|
||||
+ tclass, masked, "bounds");
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
From 9f30f83eb6347afa6b1d1df1065608c2b4485e2b Mon Sep 17 00:00:00 2001
|
||||
From: Eric Dumazet <edumazet@google.com>
|
||||
Date: Tue, 23 Aug 2016 13:59:33 -0700
|
||||
Subject: [PATCH] udp: fix poll() issue with zero sized packets
|
||||
|
||||
Laura tracked poll() [and friends] regression caused by commit
|
||||
e6afc8ace6dd ("udp: remove headers from UDP packets before queueing")
|
||||
|
||||
udp_poll() needs to know if there is a valid packet in receive queue,
|
||||
even if its payload length is 0.
|
||||
|
||||
Change first_packet_length() to return an signed int, and use -1
|
||||
as the indication of an empty queue.
|
||||
|
||||
Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing")
|
||||
Reported-by: Laura Abbott <labbott@redhat.com>
|
||||
Signed-off-by: Eric Dumazet <edumazet@google.com>
|
||||
Tested-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
net/ipv4/udp.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
|
||||
index e61f7cd..00d18c5 100644
|
||||
--- a/net/ipv4/udp.c
|
||||
+++ b/net/ipv4/udp.c
|
||||
@@ -1182,13 +1182,13 @@ out:
|
||||
* @sk: socket
|
||||
*
|
||||
* Drops all bad checksum frames, until a valid one is found.
|
||||
- * Returns the length of found skb, or 0 if none is found.
|
||||
+ * Returns the length of found skb, or -1 if none is found.
|
||||
*/
|
||||
-static unsigned int first_packet_length(struct sock *sk)
|
||||
+static int first_packet_length(struct sock *sk)
|
||||
{
|
||||
struct sk_buff_head list_kill, *rcvq = &sk->sk_receive_queue;
|
||||
struct sk_buff *skb;
|
||||
- unsigned int res;
|
||||
+ int res;
|
||||
|
||||
__skb_queue_head_init(&list_kill);
|
||||
|
||||
@@ -1203,7 +1203,7 @@ static unsigned int first_packet_length(struct sock *sk)
|
||||
__skb_unlink(skb, rcvq);
|
||||
__skb_queue_tail(&list_kill, skb);
|
||||
}
|
||||
- res = skb ? skb->len : 0;
|
||||
+ res = skb ? skb->len : -1;
|
||||
spin_unlock_bh(&rcvq->lock);
|
||||
|
||||
if (!skb_queue_empty(&list_kill)) {
|
||||
@@ -1232,7 +1232,7 @@ int udp_ioctl(struct sock *sk, int cmd, unsigned long arg)
|
||||
|
||||
case SIOCINQ:
|
||||
{
|
||||
- unsigned int amount = first_packet_length(sk);
|
||||
+ int amount = max_t(int, 0, first_packet_length(sk));
|
||||
|
||||
return put_user(amount, (int __user *)arg);
|
||||
}
|
||||
@@ -2184,7 +2184,7 @@ unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait)
|
||||
|
||||
/* Check for false positives due to checksum errors */
|
||||
if ((mask & POLLRDNORM) && !(file->f_flags & O_NONBLOCK) &&
|
||||
- !(sk->sk_shutdown & RCV_SHUTDOWN) && !first_packet_length(sk))
|
||||
+ !(sk->sk_shutdown & RCV_SHUTDOWN) && first_packet_length(sk) == -1)
|
||||
mask &= ~(POLLIN | POLLRDNORM);
|
||||
|
||||
return mask;
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
From 680ac028240f8747f31c03986fbcf18b2b521e93 Mon Sep 17 00:00:00 2001
|
||||
From: Borislav Petkov <bp@suse.de>
|
||||
Date: Mon, 27 Jul 2015 09:58:05 +0200
|
||||
Subject: [PATCH] x86/cpu/cacheinfo: Fix teardown path
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Philip Müller reported a hang when booting 32-bit 4.1 kernel on
|
||||
an AMD box. A fragment of the splat was enough to pinpoint the
|
||||
issue:
|
||||
|
||||
task: f58e0000 ti: f58e8000 task.ti: f58e800
|
||||
EIP: 0060:[<c135a903>] EFLAGS: 00010206 CPU: 0
|
||||
EIP is at free_cache_attributes+0x83/0xd0
|
||||
EAX: 00000001 EBX: f589d46c ECX: 00000090 EDX: 360c2000
|
||||
ESI: 00000000 EDI: c1724a80 EBP: f58e9ec0 ESP: f58e9ea0
|
||||
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
|
||||
CR0: 8005003b CR2: 000000ac CR3: 01731000 CR4: 000006d0
|
||||
|
||||
cache_shared_cpu_map_setup() did check sibling CPUs cacheinfo
|
||||
descriptor while the respective teardown path
|
||||
cache_shared_cpu_map_remove() didn't. Fix that.
|
||||
|
||||
From tglx's version: to be on the safe side, move the cacheinfo
|
||||
descriptor check to free_cache_attributes(), thus cleaning up
|
||||
the hotplug path a little and making this even more robust.
|
||||
|
||||
Reported-by: Philip Müller <philm@manjaro.org>
|
||||
Signed-off-by: Borislav Petkov <bp@suse.de>
|
||||
Cc: <stable@vger.kernel.org> # v4.1+
|
||||
Cc: Andre Przywara <andre.przywara@arm.com>
|
||||
Cc: Guenter Roeck <linux@roeck-us.net>
|
||||
Cc: H. Peter Anvin <hpa@zytor.com>
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Cc: Peter Zijlstra <peterz@infradead.org>
|
||||
Cc: Sudeep Holla <sudeep.holla@arm.com>
|
||||
Cc: Thomas Gleixner <tglx@linutronix.de>
|
||||
Cc: linux-kernel@vger.kernel.org
|
||||
Cc: manjaro-dev@manjaro.org
|
||||
Link: http://lkml.kernel.org/r/20150727075805.GA20416@nazgul.tnic
|
||||
Link: https://lkml.kernel.org/r/55B47BB8.6080202@manjaro.org
|
||||
Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
||||
---
|
||||
drivers/base/cacheinfo.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
|
||||
index 764280a91776..e9fd32e91668 100644
|
||||
--- a/drivers/base/cacheinfo.c
|
||||
+++ b/drivers/base/cacheinfo.c
|
||||
@@ -148,7 +148,11 @@ static void cache_shared_cpu_map_remove(unsigned int cpu)
|
||||
|
||||
if (sibling == cpu) /* skip itself */
|
||||
continue;
|
||||
+
|
||||
sib_cpu_ci = get_cpu_cacheinfo(sibling);
|
||||
+ if (!sib_cpu_ci->info_list)
|
||||
+ continue;
|
||||
+
|
||||
sib_leaf = sib_cpu_ci->info_list + index;
|
||||
cpumask_clear_cpu(cpu, &sib_leaf->shared_cpu_map);
|
||||
cpumask_clear_cpu(sibling, &this_leaf->shared_cpu_map);
|
||||
@@ -159,6 +163,9 @@ static void cache_shared_cpu_map_remove(unsigned int cpu)
|
||||
|
||||
static void free_cache_attributes(unsigned int cpu)
|
||||
{
|
||||
+ if (!per_cpu_cacheinfo(cpu))
|
||||
+ return;
|
||||
+
|
||||
cache_shared_cpu_map_remove(cpu);
|
||||
|
||||
kfree(per_cpu_cacheinfo(cpu));
|
||||
@@ -514,8 +521,7 @@ static int cacheinfo_cpu_callback(struct notifier_block *nfb,
|
||||
break;
|
||||
case CPU_DEAD:
|
||||
cache_remove_dev(cpu);
|
||||
- if (per_cpu_cacheinfo(cpu))
|
||||
- free_cache_attributes(cpu);
|
||||
+ free_cache_attributes(cpu);
|
||||
break;
|
||||
}
|
||||
return notifier_from_errno(rc);
|
||||
--
|
||||
2.4.3
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
From 4d428f0fd6aaaa75382885d897900f619b2dad35 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Mon, 20 Jun 2016 11:12:56 +0200
|
||||
Subject: [PATCH 02/17] drm/i915: Rename
|
||||
s/skl_compute_pipe_wm/skl_build_pipe_wm/
|
||||
|
||||
Upstream: since drm-intel-next-2016-05-22
|
||||
commit e7649b54777ba6491204acbe1f1a34fce78637d5
|
||||
|
||||
Author: Matt Roper <matthew.d.roper@intel.com>
|
||||
AuthorDate: Thu May 12 07:05:56 2016 -0700
|
||||
Commit: Matt Roper <matthew.d.roper@intel.com>
|
||||
CommitDate: Fri May 13 07:32:27 2016 -0700
|
||||
|
||||
drm/i915: Rename s/skl_compute_pipe_wm/skl_build_pipe_wm/
|
||||
|
||||
When we added atomic watermarks, we added a new display vfunc
|
||||
'compute_pipe_wm' that is used to compute any pipe-specific watermark
|
||||
information that we can at atomic check time. This was a somewhat poor
|
||||
naming choice since we already had a 'skl_compute_pipe_wm' function that
|
||||
doesn't quite fit this model --- the existing SKL function is something
|
||||
that gets used at atomic commit time, after the DDB allocation has been
|
||||
determined. Let's rename the existing SKL function to avoid confusion.
|
||||
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-3-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_pm.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index 0da1d60..8f081b2 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -3266,9 +3266,9 @@ static void skl_compute_transition_wm(struct intel_crtc_state *cstate,
|
||||
}
|
||||
}
|
||||
|
||||
-static void skl_compute_pipe_wm(struct intel_crtc_state *cstate,
|
||||
- struct skl_ddb_allocation *ddb,
|
||||
- struct skl_pipe_wm *pipe_wm)
|
||||
+static void skl_build_pipe_wm(struct intel_crtc_state *cstate,
|
||||
+ struct skl_ddb_allocation *ddb,
|
||||
+ struct skl_pipe_wm *pipe_wm)
|
||||
{
|
||||
struct drm_device *dev = cstate->base.crtc->dev;
|
||||
const struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
@@ -3535,7 +3535,7 @@ static bool skl_update_pipe_wm(struct drm_crtc *crtc,
|
||||
struct intel_crtc_state *cstate = to_intel_crtc_state(crtc->state);
|
||||
|
||||
skl_allocate_pipe_ddb(cstate, ddb);
|
||||
- skl_compute_pipe_wm(cstate, ddb, pipe_wm);
|
||||
+ skl_build_pipe_wm(cstate, ddb, pipe_wm);
|
||||
|
||||
if (!memcmp(&intel_crtc->wm.active.skl, pipe_wm, sizeof(*pipe_wm)))
|
||||
return false;
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
From a878e3fa9657646ff85468075823870fbbd5745f Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 30 Mar 2016 12:41:22 +0100
|
||||
Subject: [PATCH 2/2] net: dsa: mv88e6xxx: Clear the PDOWN bit on setup
|
||||
|
||||
Some of the vendor-specific bootloaders set up this part
|
||||
of the initialization for us, so this was never added.
|
||||
However, since upstream bootloaders don't initialize the
|
||||
chip specifically, they leave the fiber MII's PDOWN flag
|
||||
set, which means that the CPU port doesn't connect.
|
||||
|
||||
This patch checks whether this flag has been clear prior
|
||||
by something else, and if not make us clear it.
|
||||
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
|
||||
---
|
||||
drivers/net/dsa/mv88e6xxx.c | 36 ++++++++++++++++++++++++++++++++++++
|
||||
drivers/net/dsa/mv88e6xxx.h | 8 ++++++++
|
||||
2 files changed, 44 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
|
||||
index 3dcfe13..a4e3750 100644
|
||||
--- a/drivers/net/dsa/mv88e6xxx.c
|
||||
+++ b/drivers/net/dsa/mv88e6xxx.c
|
||||
@@ -1961,6 +1961,25 @@ restore_page_0:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static int mv88e6xxx_power_on_serdes(struct dsa_switch *ds)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = _mv88e6xxx_phy_page_read(ds, REG_FIBER_SERDES, PAGE_FIBER_SERDES,
|
||||
+ MII_BMCR);
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (ret & BMCR_PDOWN) {
|
||||
+ ret &= ~BMCR_PDOWN;
|
||||
+ ret = _mv88e6xxx_phy_page_write(ds, REG_FIBER_SERDES,
|
||||
+ PAGE_FIBER_SERDES, MII_BMCR,
|
||||
+ ret);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port)
|
||||
{
|
||||
struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
|
||||
@@ -2064,6 +2083,23 @@ static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port)
|
||||
goto abort;
|
||||
}
|
||||
|
||||
+ /* If this port is connected to a SerDes, make sure the SerDes is not
|
||||
+ * powered down.
|
||||
+ */
|
||||
+ if (mv88e6xxx_6352_family(ds)) {
|
||||
+ ret = _mv88e6xxx_reg_read(ds, REG_PORT(port), PORT_STATUS);
|
||||
+ if (ret < 0)
|
||||
+ goto abort;
|
||||
+ ret &= PORT_STATUS_CMODE_MASK;
|
||||
+ if ((ret == PORT_STATUS_CMODE_100BASE_X) ||
|
||||
+ (ret == PORT_STATUS_CMODE_1000BASE_X) ||
|
||||
+ (ret == PORT_STATUS_CMODE_SGMII)) {
|
||||
+ ret = mv88e6xxx_power_on_serdes(ds);
|
||||
+ if (ret < 0)
|
||||
+ goto abort;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Port Control 2: don't force a good FCS, set the maximum frame size to
|
||||
* 10240 bytes, enable secure 802.1q tags, don't discard tagged or
|
||||
* untagged frames on this port, do a destination address lookup on all
|
||||
diff --git a/drivers/net/dsa/mv88e6xxx.h b/drivers/net/dsa/mv88e6xxx.h
|
||||
index ca08f91..adc7f0d 100644
|
||||
--- a/drivers/net/dsa/mv88e6xxx.h
|
||||
+++ b/drivers/net/dsa/mv88e6xxx.h
|
||||
@@ -28,6 +28,10 @@
|
||||
#define SMI_CMD_OP_45_READ_DATA_INC ((3 << 10) | SMI_CMD_BUSY)
|
||||
#define SMI_DATA 0x01
|
||||
|
||||
+/* Fiber/SERDES Registers are located at SMI address F, page 1 */
|
||||
+#define REG_FIBER_SERDES 0x0f
|
||||
+#define PAGE_FIBER_SERDES 0x01
|
||||
+
|
||||
#define REG_PORT(p) (0x10 + (p))
|
||||
#define PORT_STATUS 0x00
|
||||
#define PORT_STATUS_PAUSE_EN BIT(15)
|
||||
@@ -45,6 +49,10 @@
|
||||
#define PORT_STATUS_MGMII BIT(6) /* 6185 */
|
||||
#define PORT_STATUS_TX_PAUSED BIT(5)
|
||||
#define PORT_STATUS_FLOW_CTRL BIT(4)
|
||||
+#define PORT_STATUS_CMODE_MASK 0x0f
|
||||
+#define PORT_STATUS_CMODE_100BASE_X 0x8
|
||||
+#define PORT_STATUS_CMODE_1000BASE_X 0x9
|
||||
+#define PORT_STATUS_CMODE_SGMII 0xa
|
||||
#define PORT_PCS_CTRL 0x01
|
||||
#define PORT_PCS_CTRL_RGMII_DELAY_RXCLK BIT(15)
|
||||
#define PORT_PCS_CTRL_RGMII_DELAY_TXCLK BIT(14)
|
||||
--
|
||||
2.7.3
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
From 0206aec944641c69815562407b73b6f9df22f041 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Mon, 20 Jun 2016 11:13:09 +0200
|
||||
Subject: [PATCH 03/17] drm/i915/gen9: Cache plane data rates in CRTC state
|
||||
|
||||
Upstream: since drm-intel-next-2016-05-22
|
||||
commit a1de91e5f3039dfc32ac2b77ffb280a68646cbc7
|
||||
|
||||
Author: Matt Roper <matthew.d.roper@intel.com>
|
||||
AuthorDate: Thu May 12 07:05:57 2016 -0700
|
||||
Commit: Matt Roper <matthew.d.roper@intel.com>
|
||||
CommitDate: Fri May 13 07:32:35 2016 -0700
|
||||
|
||||
drm/i915/gen9: Cache plane data rates in CRTC state
|
||||
|
||||
This will be important when we start calculating CRTC data rates for
|
||||
in-flight CRTC states since it will allow us to calculate the total data
|
||||
rate without needing to grab the plane state for any planes that aren't
|
||||
updated by the transaction.
|
||||
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-4-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_drv.h | 4 ++
|
||||
drivers/gpu/drm/i915/intel_pm.c | 92 ++++++++++++++++++++++++++--------------
|
||||
2 files changed, 63 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||
index 7d19baf..7c00ab6 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||
@@ -385,6 +385,10 @@ struct intel_crtc_wm_state {
|
||||
struct {
|
||||
/* gen9+ only needs 1-step wm programming */
|
||||
struct skl_pipe_wm optimal;
|
||||
+
|
||||
+ /* cached plane data rate */
|
||||
+ unsigned plane_data_rate[I915_MAX_PLANES];
|
||||
+ unsigned plane_y_data_rate[I915_MAX_PLANES];
|
||||
} skl;
|
||||
};
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index 8f081b2..854f0a4 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -2879,6 +2879,14 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate,
|
||||
struct intel_plane_state *intel_pstate = to_intel_plane_state(pstate);
|
||||
struct drm_framebuffer *fb = pstate->fb;
|
||||
uint32_t width = 0, height = 0;
|
||||
+ unsigned format = fb ? fb->pixel_format : DRM_FORMAT_XRGB8888;
|
||||
+
|
||||
+ if (!intel_pstate->visible)
|
||||
+ return 0;
|
||||
+ if (pstate->plane->type == DRM_PLANE_TYPE_CURSOR)
|
||||
+ return 0;
|
||||
+ if (y && format != DRM_FORMAT_NV12)
|
||||
+ return 0;
|
||||
|
||||
width = drm_rect_width(&intel_pstate->src) >> 16;
|
||||
height = drm_rect_height(&intel_pstate->src) >> 16;
|
||||
@@ -2887,17 +2895,17 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate,
|
||||
swap(width, height);
|
||||
|
||||
/* for planar format */
|
||||
- if (fb->pixel_format == DRM_FORMAT_NV12) {
|
||||
+ if (format == DRM_FORMAT_NV12) {
|
||||
if (y) /* y-plane data rate */
|
||||
return width * height *
|
||||
- drm_format_plane_cpp(fb->pixel_format, 0);
|
||||
+ drm_format_plane_cpp(format, 0);
|
||||
else /* uv-plane data rate */
|
||||
return (width / 2) * (height / 2) *
|
||||
- drm_format_plane_cpp(fb->pixel_format, 1);
|
||||
+ drm_format_plane_cpp(format, 1);
|
||||
}
|
||||
|
||||
/* for packed formats */
|
||||
- return width * height * drm_format_plane_cpp(fb->pixel_format, 0);
|
||||
+ return width * height * drm_format_plane_cpp(format, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2906,32 +2914,34 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate,
|
||||
* 3 * 4096 * 8192 * 4 < 2^32
|
||||
*/
|
||||
static unsigned int
|
||||
-skl_get_total_relative_data_rate(const struct intel_crtc_state *cstate)
|
||||
+skl_get_total_relative_data_rate(struct intel_crtc_state *cstate)
|
||||
{
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(cstate->base.crtc);
|
||||
struct drm_device *dev = intel_crtc->base.dev;
|
||||
const struct intel_plane *intel_plane;
|
||||
- unsigned int total_data_rate = 0;
|
||||
+ unsigned int rate, total_data_rate = 0;
|
||||
|
||||
+ /* Calculate and cache data rate for each plane */
|
||||
for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
const struct drm_plane_state *pstate = intel_plane->base.state;
|
||||
+ int id = skl_wm_plane_id(intel_plane);
|
||||
|
||||
- if (pstate->fb == NULL)
|
||||
- continue;
|
||||
+ /* packed/uv */
|
||||
+ rate = skl_plane_relative_data_rate(cstate, pstate, 0);
|
||||
+ cstate->wm.skl.plane_data_rate[id] = rate;
|
||||
|
||||
- if (intel_plane->base.type == DRM_PLANE_TYPE_CURSOR)
|
||||
- continue;
|
||||
+ /* y-plane */
|
||||
+ rate = skl_plane_relative_data_rate(cstate, pstate, 1);
|
||||
+ cstate->wm.skl.plane_y_data_rate[id] = rate;
|
||||
+ }
|
||||
|
||||
- /* packed/uv */
|
||||
- total_data_rate += skl_plane_relative_data_rate(cstate,
|
||||
- pstate,
|
||||
- 0);
|
||||
+ /* Calculate CRTC's total data rate from cached values */
|
||||
+ for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
+ int id = skl_wm_plane_id(intel_plane);
|
||||
|
||||
- if (pstate->fb->pixel_format == DRM_FORMAT_NV12)
|
||||
- /* y-plane */
|
||||
- total_data_rate += skl_plane_relative_data_rate(cstate,
|
||||
- pstate,
|
||||
- 1);
|
||||
+ /* packed/uv */
|
||||
+ total_data_rate += cstate->wm.skl.plane_data_rate[id];
|
||||
+ total_data_rate += cstate->wm.skl.plane_y_data_rate[id];
|
||||
}
|
||||
|
||||
return total_data_rate;
|
||||
@@ -2995,6 +3005,8 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
* FIXME: we may not allocate every single block here.
|
||||
*/
|
||||
total_data_rate = skl_get_total_relative_data_rate(cstate);
|
||||
+ if (total_data_rate == 0)
|
||||
+ return;
|
||||
|
||||
start = alloc->start;
|
||||
for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
@@ -3009,7 +3021,7 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
if (plane->type == DRM_PLANE_TYPE_CURSOR)
|
||||
continue;
|
||||
|
||||
- data_rate = skl_plane_relative_data_rate(cstate, pstate, 0);
|
||||
+ data_rate = cstate->wm.skl.plane_data_rate[id];
|
||||
|
||||
/*
|
||||
* allocation for (packed formats) or (uv-plane part of planar format):
|
||||
@@ -3028,20 +3040,16 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
/*
|
||||
* allocation for y_plane part of planar format:
|
||||
*/
|
||||
- if (pstate->fb->pixel_format == DRM_FORMAT_NV12) {
|
||||
- y_data_rate = skl_plane_relative_data_rate(cstate,
|
||||
- pstate,
|
||||
- 1);
|
||||
- y_plane_blocks = y_minimum[id];
|
||||
- y_plane_blocks += div_u64((uint64_t)alloc_size * y_data_rate,
|
||||
- total_data_rate);
|
||||
-
|
||||
- ddb->y_plane[pipe][id].start = start;
|
||||
- ddb->y_plane[pipe][id].end = start + y_plane_blocks;
|
||||
-
|
||||
- start += y_plane_blocks;
|
||||
- }
|
||||
+ y_data_rate = cstate->wm.skl.plane_y_data_rate[id];
|
||||
+
|
||||
+ y_plane_blocks = y_minimum[id];
|
||||
+ y_plane_blocks += div_u64((uint64_t)alloc_size * y_data_rate,
|
||||
+ total_data_rate);
|
||||
|
||||
+ ddb->y_plane[pipe][id].start = start;
|
||||
+ ddb->y_plane[pipe][id].end = start + y_plane_blocks;
|
||||
+
|
||||
+ start += y_plane_blocks;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3820,10 +3828,28 @@ void skl_wm_get_hw_state(struct drm_device *dev)
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
struct skl_ddb_allocation *ddb = &dev_priv->wm.skl_hw.ddb;
|
||||
struct drm_crtc *crtc;
|
||||
+ struct intel_crtc *intel_crtc;
|
||||
|
||||
skl_ddb_get_hw_state(dev_priv, ddb);
|
||||
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
|
||||
skl_pipe_wm_get_hw_state(crtc);
|
||||
+
|
||||
+ /* Calculate plane data rates */
|
||||
+ for_each_intel_crtc(dev, intel_crtc) {
|
||||
+ struct intel_crtc_state *cstate = intel_crtc->config;
|
||||
+ struct intel_plane *intel_plane;
|
||||
+
|
||||
+ for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
+ const struct drm_plane_state *pstate =
|
||||
+ intel_plane->base.state;
|
||||
+ int id = skl_wm_plane_id(intel_plane);
|
||||
+
|
||||
+ cstate->wm.skl.plane_data_rate[id] =
|
||||
+ skl_plane_relative_data_rate(cstate, pstate, 0);
|
||||
+ cstate->wm.skl.plane_y_data_rate[id] =
|
||||
+ skl_plane_relative_data_rate(cstate, pstate, 1);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
static void ilk_pipe_wm_get_hw_state(struct drm_crtc *crtc)
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
From a75a3c793e2cd3e7648597f2c77d87453f520f31 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Mon, 20 Jun 2016 11:13:23 +0200
|
||||
Subject: [PATCH 04/17] drm/i915/gen9: Allow calculation of data rate for
|
||||
in-flight state (v2)
|
||||
|
||||
Upstream: since drm-intel-next-2016-05-22
|
||||
commit 9c74d82621c553f0da1f41bd5d90f5eab5659fdb
|
||||
|
||||
Author: Matt Roper <matthew.d.roper@intel.com>
|
||||
AuthorDate: Thu May 12 07:05:58 2016 -0700
|
||||
Commit: Matt Roper <matthew.d.roper@intel.com>
|
||||
CommitDate: Fri May 13 07:32:49 2016 -0700
|
||||
|
||||
drm/i915/gen9: Allow calculation of data rate for in-flight state (v2)
|
||||
|
||||
Our skl_get_total_relative_data_rate() function gets passed a crtc state
|
||||
object to calculate the data rate for, but it currently always looks
|
||||
up the committed plane states that correspond to that CRTC. Let's
|
||||
check whether the CRTC state is an in-flight state (meaning
|
||||
cstate->state is non-NULL) and if so, use the corresponding in-flight
|
||||
plane states.
|
||||
|
||||
We'll soon be using this function exclusively for in-flight states; at
|
||||
that time we'll be able to simplify the function a bit, but for now we
|
||||
allow it to be used in either mode.
|
||||
|
||||
v2:
|
||||
- Rebase on top of changes to cache plane data rates.
|
||||
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-5-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_pm.c | 74 +++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 60 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index 854f0a4..b863bfc 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -2914,25 +2914,69 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate,
|
||||
* 3 * 4096 * 8192 * 4 < 2^32
|
||||
*/
|
||||
static unsigned int
|
||||
-skl_get_total_relative_data_rate(struct intel_crtc_state *cstate)
|
||||
+skl_get_total_relative_data_rate(struct intel_crtc_state *intel_cstate)
|
||||
{
|
||||
- struct intel_crtc *intel_crtc = to_intel_crtc(cstate->base.crtc);
|
||||
- struct drm_device *dev = intel_crtc->base.dev;
|
||||
+ struct drm_crtc_state *cstate = &intel_cstate->base;
|
||||
+ struct drm_atomic_state *state = cstate->state;
|
||||
+ struct drm_crtc *crtc = cstate->crtc;
|
||||
+ struct drm_device *dev = crtc->dev;
|
||||
+ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||
const struct intel_plane *intel_plane;
|
||||
unsigned int rate, total_data_rate = 0;
|
||||
+ int id;
|
||||
|
||||
/* Calculate and cache data rate for each plane */
|
||||
- for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
- const struct drm_plane_state *pstate = intel_plane->base.state;
|
||||
- int id = skl_wm_plane_id(intel_plane);
|
||||
+ /*
|
||||
+ * FIXME: At the moment this function can be called on either an
|
||||
+ * in-flight or a committed state object. If it's in-flight then we
|
||||
+ * only want to re-calculate the plane data rate for planes that are
|
||||
+ * part of the transaction (i.e., we don't want to grab any additional
|
||||
+ * plane states if we don't have to). If we're operating on committed
|
||||
+ * state, we'll just go ahead and recalculate the plane data rate for
|
||||
+ * all planes.
|
||||
+ *
|
||||
+ * Once we finish moving our DDB allocation to the atomic check phase,
|
||||
+ * we'll only be calling this function on in-flight state objects, so
|
||||
+ * the 'else' branch here will go away.
|
||||
+ */
|
||||
+ if (state) {
|
||||
+ struct drm_plane *plane;
|
||||
+ struct drm_plane_state *pstate;
|
||||
+ int i;
|
||||
+
|
||||
+ for_each_plane_in_state(state, plane, pstate, i) {
|
||||
+ intel_plane = to_intel_plane(plane);
|
||||
+ id = skl_wm_plane_id(intel_plane);
|
||||
+
|
||||
+ if (intel_plane->pipe != intel_crtc->pipe)
|
||||
+ continue;
|
||||
+
|
||||
+ /* packed/uv */
|
||||
+ rate = skl_plane_relative_data_rate(intel_cstate,
|
||||
+ pstate, 0);
|
||||
+ intel_cstate->wm.skl.plane_data_rate[id] = rate;
|
||||
+
|
||||
+ /* y-plane */
|
||||
+ rate = skl_plane_relative_data_rate(intel_cstate,
|
||||
+ pstate, 1);
|
||||
+ intel_cstate->wm.skl.plane_y_data_rate[id] = rate;
|
||||
+ }
|
||||
+ } else {
|
||||
+ for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
+ const struct drm_plane_state *pstate =
|
||||
+ intel_plane->base.state;
|
||||
+ int id = skl_wm_plane_id(intel_plane);
|
||||
|
||||
- /* packed/uv */
|
||||
- rate = skl_plane_relative_data_rate(cstate, pstate, 0);
|
||||
- cstate->wm.skl.plane_data_rate[id] = rate;
|
||||
+ /* packed/uv */
|
||||
+ rate = skl_plane_relative_data_rate(intel_cstate,
|
||||
+ pstate, 0);
|
||||
+ intel_cstate->wm.skl.plane_data_rate[id] = rate;
|
||||
|
||||
- /* y-plane */
|
||||
- rate = skl_plane_relative_data_rate(cstate, pstate, 1);
|
||||
- cstate->wm.skl.plane_y_data_rate[id] = rate;
|
||||
+ /* y-plane */
|
||||
+ rate = skl_plane_relative_data_rate(intel_cstate,
|
||||
+ pstate, 1);
|
||||
+ intel_cstate->wm.skl.plane_y_data_rate[id] = rate;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Calculate CRTC's total data rate from cached values */
|
||||
@@ -2940,10 +2984,12 @@ skl_get_total_relative_data_rate(struct intel_crtc_state *cstate)
|
||||
int id = skl_wm_plane_id(intel_plane);
|
||||
|
||||
/* packed/uv */
|
||||
- total_data_rate += cstate->wm.skl.plane_data_rate[id];
|
||||
- total_data_rate += cstate->wm.skl.plane_y_data_rate[id];
|
||||
+ total_data_rate += intel_cstate->wm.skl.plane_data_rate[id];
|
||||
+ total_data_rate += intel_cstate->wm.skl.plane_y_data_rate[id];
|
||||
}
|
||||
|
||||
+ WARN_ON(cstate->plane_mask && total_data_rate == 0);
|
||||
+
|
||||
return total_data_rate;
|
||||
}
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
From cd21ce996b94fd149b3487398e5250e9f0cc8811 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Mon, 20 Jun 2016 12:39:24 +0200
|
||||
Subject: [PATCH 05/17] drm/i915/gen9: Store plane minimum blocks in CRTC wm
|
||||
state (v2)
|
||||
|
||||
Upstream: since drm-intel-next-2016-05-22
|
||||
commit 86a2100a8b96594902bb59b90614377df4f64ce0
|
||||
|
||||
Author: Matt Roper <matthew.d.roper@intel.com>
|
||||
AuthorDate: Thu May 12 07:05:59 2016 -0700
|
||||
Commit: Matt Roper <matthew.d.roper@intel.com>
|
||||
CommitDate: Fri May 13 07:32:56 2016 -0700
|
||||
|
||||
drm/i915/gen9: Store plane minimum blocks in CRTC wm state (v2)
|
||||
|
||||
This will eventually allow us to re-use old values without
|
||||
re-calculating them for unchanged planes (which also helps us avoid
|
||||
re-grabbing extra plane states).
|
||||
|
||||
v2:
|
||||
- Drop unnecessary memset's; they were meant for a later patch (which
|
||||
got reworked anyway to not need them, but were mis-rebased into this
|
||||
one. (Maarten)
|
||||
|
||||
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-6-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_drv.h | 4 ++++
|
||||
drivers/gpu/drm/i915/intel_pm.c | 4 ++--
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||
index 7c00ab6..d246308 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||
@@ -389,6 +389,10 @@ struct intel_crtc_wm_state {
|
||||
/* cached plane data rate */
|
||||
unsigned plane_data_rate[I915_MAX_PLANES];
|
||||
unsigned plane_y_data_rate[I915_MAX_PLANES];
|
||||
+
|
||||
+ /* minimum block allocation */
|
||||
+ uint16_t minimum_blocks[I915_MAX_PLANES];
|
||||
+ uint16_t minimum_y_blocks[I915_MAX_PLANES];
|
||||
} skl;
|
||||
};
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index b863bfc..00db6e9 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -3006,8 +3006,8 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
enum pipe pipe = intel_crtc->pipe;
|
||||
struct skl_ddb_entry *alloc = &ddb->pipe[pipe];
|
||||
uint16_t alloc_size, start, cursor_blocks;
|
||||
- uint16_t minimum[I915_MAX_PLANES];
|
||||
- uint16_t y_minimum[I915_MAX_PLANES];
|
||||
+ uint16_t *minimum = cstate->wm.skl.minimum_blocks;
|
||||
+ uint16_t *y_minimum = cstate->wm.skl.minimum_y_blocks;
|
||||
unsigned int total_data_rate;
|
||||
|
||||
skl_ddb_get_pipe_allocation_limits(dev, cstate, config, alloc);
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
From 00edb23bcefa3ad6931f2a2855fe0801a55523f7 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Mon, 20 Jun 2016 12:39:40 +0200
|
||||
Subject: [PATCH 06/17] drm/i915: Track whether an atomic transaction changes
|
||||
the active CRTC's
|
||||
|
||||
Upstream: since drm-intel-next-2016-05-22
|
||||
commit 8b4a7d0597cd9910d7127ffae6ae91d21853a8a2
|
||||
|
||||
Author: Matt Roper <matthew.d.roper@intel.com>
|
||||
AuthorDate: Thu May 12 07:06:00 2016 -0700
|
||||
Commit: Matt Roper <matthew.d.roper@intel.com>
|
||||
CommitDate: Fri May 13 07:33:10 2016 -0700
|
||||
|
||||
drm/i915: Track whether an atomic transaction changes the active CRTC's
|
||||
|
||||
For the purposes of DDB re-allocation we need to know whether a
|
||||
transaction changes the list of CRTC's that are active. While
|
||||
state->modeset could be used for this purpose, that would be slightly
|
||||
too aggressive since it would lead us to re-allocate the DDB when a
|
||||
CRTC's mode changes, but not its final active state.
|
||||
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-7-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_display.c | 3 +++
|
||||
drivers/gpu/drm/i915/intel_drv.h | 10 ++++++++++
|
||||
2 files changed, 13 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index 7d855ba..f53df81 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -13183,6 +13183,9 @@ static int intel_modeset_checks(struct drm_atomic_state *state)
|
||||
intel_state->active_crtcs |= 1 << i;
|
||||
else
|
||||
intel_state->active_crtcs &= ~(1 << i);
|
||||
+
|
||||
+ if (crtc_state->active != crtc->state->active)
|
||||
+ intel_state->active_pipe_changes |= drm_crtc_mask(crtc);
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||
index d246308..672ca56 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||
@@ -256,6 +256,16 @@ struct intel_atomic_state {
|
||||
|
||||
bool dpll_set, modeset;
|
||||
|
||||
+ /*
|
||||
+ * Does this transaction change the pipes that are active? This mask
|
||||
+ * tracks which CRTC's have changed their active state at the end of
|
||||
+ * the transaction (not counting the temporary disable during modesets).
|
||||
+ * This mask should only be non-zero when intel_state->modeset is true,
|
||||
+ * but the converse is not necessarily true; simply changing a mode may
|
||||
+ * not flip the final active status of any CRTC's
|
||||
+ */
|
||||
+ unsigned int active_pipe_changes;
|
||||
+
|
||||
unsigned int active_crtcs;
|
||||
unsigned int min_pixclk[I915_MAX_PIPES];
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,352 @@
|
|||
From 99dd9c3733696d4a2536b21988c9b1b8f5195c5b Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Mon, 20 Jun 2016 12:40:00 +0200
|
||||
Subject: [PATCH 07/17] drm/i915/gen9: Allow skl_allocate_pipe_ddb() to operate
|
||||
on in-flight state (v3)
|
||||
|
||||
Upstream: since drm-intel-next-2016-05-22
|
||||
commit c107acfeb03187873657ccc8af4fc5c704b3626b
|
||||
|
||||
Author: Matt Roper <matthew.d.roper@intel.com>
|
||||
AuthorDate: Thu May 12 07:06:01 2016 -0700
|
||||
Commit: Matt Roper <matthew.d.roper@intel.com>
|
||||
CommitDate: Fri May 13 07:33:16 2016 -0700
|
||||
|
||||
drm/i915/gen9: Allow skl_allocate_pipe_ddb() to operate on in-flight state (v3)
|
||||
|
||||
We eventually want to calculate watermark values at atomic 'check' time
|
||||
instead of atomic 'commit' time so that any requested configurations
|
||||
that result in impossible watermark requirements are properly rejected.
|
||||
The first step along this path is to allocate the DDB at atomic 'check'
|
||||
time. As we perform this transition, allow the main allocation function
|
||||
to operate successfully on either an in-flight state or an
|
||||
already-commited state. Once we complete the transition in a future
|
||||
patch, we'll come back and remove the unnecessary logic for the
|
||||
already-committed case.
|
||||
|
||||
v2: Rebase/refactor; we should no longer need to grab extra plane states
|
||||
while allocating the DDB since we can pull cached data rates and
|
||||
minimum block counts from the CRTC state for any planes that aren't
|
||||
being modified by this transaction.
|
||||
|
||||
v3:
|
||||
- Simplify memsets to clear DDB plane entries. (Maarten)
|
||||
- Drop a redundant memset of plane[pipe][PLANE_CURSOR] that was added
|
||||
by an earlier Coccinelle patch. (Maarten)
|
||||
- Assign *num_active at the top of skl_ddb_get_pipe_allocation_limits()
|
||||
so that no code paths return without setting it. (kbuild robot)
|
||||
|
||||
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-8-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_drv.h | 6 ++
|
||||
drivers/gpu/drm/i915/intel_pm.c | 179 +++++++++++++++++++++++++++++-----------
|
||||
2 files changed, 139 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
|
||||
index daba7eb..804af6f 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
||||
@@ -281,6 +281,12 @@ struct i915_hotplug {
|
||||
&dev->mode_config.plane_list, \
|
||||
base.head)
|
||||
|
||||
+#define for_each_intel_plane_mask(dev, intel_plane, plane_mask) \
|
||||
+ list_for_each_entry(intel_plane, &dev->mode_config.plane_list, \
|
||||
+ base.head) \
|
||||
+ for_each_if ((plane_mask) & \
|
||||
+ (1 << drm_plane_index(&intel_plane->base)))
|
||||
+
|
||||
#define for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) \
|
||||
list_for_each_entry(intel_plane, \
|
||||
&(dev)->mode_config.plane_list, \
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index 00db6e9..ee82b1f 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -2788,13 +2788,25 @@ skl_wm_plane_id(const struct intel_plane *plane)
|
||||
static void
|
||||
skl_ddb_get_pipe_allocation_limits(struct drm_device *dev,
|
||||
const struct intel_crtc_state *cstate,
|
||||
- const struct intel_wm_config *config,
|
||||
- struct skl_ddb_entry *alloc /* out */)
|
||||
+ struct intel_wm_config *config,
|
||||
+ struct skl_ddb_entry *alloc, /* out */
|
||||
+ int *num_active /* out */)
|
||||
{
|
||||
+ struct drm_atomic_state *state = cstate->base.state;
|
||||
+ struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
|
||||
+ struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
struct drm_crtc *for_crtc = cstate->base.crtc;
|
||||
struct drm_crtc *crtc;
|
||||
unsigned int pipe_size, ddb_size;
|
||||
int nth_active_pipe;
|
||||
+ int pipe = to_intel_crtc(for_crtc)->pipe;
|
||||
+
|
||||
+ if (intel_state && intel_state->active_pipe_changes)
|
||||
+ *num_active = hweight32(intel_state->active_crtcs);
|
||||
+ else if (intel_state)
|
||||
+ *num_active = hweight32(dev_priv->active_crtcs);
|
||||
+ else
|
||||
+ *num_active = config->num_pipes_active;
|
||||
|
||||
if (!cstate->base.active) {
|
||||
alloc->start = 0;
|
||||
@@ -2809,25 +2821,56 @@ skl_ddb_get_pipe_allocation_limits(struct drm_device *dev,
|
||||
|
||||
ddb_size -= 4; /* 4 blocks for bypass path allocation */
|
||||
|
||||
- nth_active_pipe = 0;
|
||||
- for_each_crtc(dev, crtc) {
|
||||
- if (!to_intel_crtc(crtc)->active)
|
||||
- continue;
|
||||
+ /*
|
||||
+ * FIXME: At the moment we may be called on either in-flight or fully
|
||||
+ * committed cstate's. Once we fully move DDB allocation in the check
|
||||
+ * phase, we'll only be called on in-flight states and the 'else'
|
||||
+ * branch here will go away.
|
||||
+ *
|
||||
+ * The 'else' branch is slightly racy here, but it was racy to begin
|
||||
+ * with; since it's going away soon, no effort is made to address that.
|
||||
+ */
|
||||
+ if (state) {
|
||||
+ /*
|
||||
+ * If the state doesn't change the active CRTC's, then there's
|
||||
+ * no need to recalculate; the existing pipe allocation limits
|
||||
+ * should remain unchanged. Note that we're safe from racing
|
||||
+ * commits since any racing commit that changes the active CRTC
|
||||
+ * list would need to grab _all_ crtc locks, including the one
|
||||
+ * we currently hold.
|
||||
+ */
|
||||
+ if (!intel_state->active_pipe_changes) {
|
||||
+ *alloc = dev_priv->wm.skl_hw.ddb.pipe[pipe];
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
- if (crtc == for_crtc)
|
||||
- break;
|
||||
+ nth_active_pipe = hweight32(intel_state->active_crtcs &
|
||||
+ (drm_crtc_mask(for_crtc) - 1));
|
||||
+ pipe_size = ddb_size / hweight32(intel_state->active_crtcs);
|
||||
+ alloc->start = nth_active_pipe * ddb_size / *num_active;
|
||||
+ alloc->end = alloc->start + pipe_size;
|
||||
+ } else {
|
||||
+ nth_active_pipe = 0;
|
||||
+ for_each_crtc(dev, crtc) {
|
||||
+ if (!to_intel_crtc(crtc)->active)
|
||||
+ continue;
|
||||
|
||||
- nth_active_pipe++;
|
||||
- }
|
||||
+ if (crtc == for_crtc)
|
||||
+ break;
|
||||
+
|
||||
+ nth_active_pipe++;
|
||||
+ }
|
||||
|
||||
- pipe_size = ddb_size / config->num_pipes_active;
|
||||
- alloc->start = nth_active_pipe * ddb_size / config->num_pipes_active;
|
||||
- alloc->end = alloc->start + pipe_size;
|
||||
+ pipe_size = ddb_size / config->num_pipes_active;
|
||||
+ alloc->start = nth_active_pipe * ddb_size /
|
||||
+ config->num_pipes_active;
|
||||
+ alloc->end = alloc->start + pipe_size;
|
||||
+ }
|
||||
}
|
||||
|
||||
-static unsigned int skl_cursor_allocation(const struct intel_wm_config *config)
|
||||
+static unsigned int skl_cursor_allocation(int num_active)
|
||||
{
|
||||
- if (config->num_pipes_active == 1)
|
||||
+ if (num_active == 1)
|
||||
return 32;
|
||||
|
||||
return 8;
|
||||
@@ -2993,33 +3036,44 @@ skl_get_total_relative_data_rate(struct intel_crtc_state *intel_cstate)
|
||||
return total_data_rate;
|
||||
}
|
||||
|
||||
-static void
|
||||
+static int
|
||||
skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
struct skl_ddb_allocation *ddb /* out */)
|
||||
{
|
||||
+ struct drm_atomic_state *state = cstate->base.state;
|
||||
struct drm_crtc *crtc = cstate->base.crtc;
|
||||
struct drm_device *dev = crtc->dev;
|
||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
struct intel_wm_config *config = &dev_priv->wm.config;
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||
struct intel_plane *intel_plane;
|
||||
+ struct drm_plane *plane;
|
||||
+ struct drm_plane_state *pstate;
|
||||
enum pipe pipe = intel_crtc->pipe;
|
||||
struct skl_ddb_entry *alloc = &ddb->pipe[pipe];
|
||||
uint16_t alloc_size, start, cursor_blocks;
|
||||
uint16_t *minimum = cstate->wm.skl.minimum_blocks;
|
||||
uint16_t *y_minimum = cstate->wm.skl.minimum_y_blocks;
|
||||
unsigned int total_data_rate;
|
||||
+ int num_active;
|
||||
+ int id, i;
|
||||
+
|
||||
+ if (!cstate->base.active) {
|
||||
+ ddb->pipe[pipe].start = ddb->pipe[pipe].end = 0;
|
||||
+ memset(ddb->plane[pipe], 0, sizeof(ddb->plane[pipe]));
|
||||
+ memset(ddb->y_plane[pipe], 0, sizeof(ddb->y_plane[pipe]));
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
- skl_ddb_get_pipe_allocation_limits(dev, cstate, config, alloc);
|
||||
+ skl_ddb_get_pipe_allocation_limits(dev, cstate, config, alloc,
|
||||
+ &num_active);
|
||||
alloc_size = skl_ddb_entry_size(alloc);
|
||||
if (alloc_size == 0) {
|
||||
memset(ddb->plane[pipe], 0, sizeof(ddb->plane[pipe]));
|
||||
- memset(&ddb->plane[pipe][PLANE_CURSOR], 0,
|
||||
- sizeof(ddb->plane[pipe][PLANE_CURSOR]));
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
- cursor_blocks = skl_cursor_allocation(config);
|
||||
+ cursor_blocks = skl_cursor_allocation(num_active);
|
||||
ddb->plane[pipe][PLANE_CURSOR].start = alloc->end - cursor_blocks;
|
||||
ddb->plane[pipe][PLANE_CURSOR].end = alloc->end;
|
||||
|
||||
@@ -3027,21 +3081,55 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
alloc->end -= cursor_blocks;
|
||||
|
||||
/* 1. Allocate the mininum required blocks for each active plane */
|
||||
- for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
- struct drm_plane *plane = &intel_plane->base;
|
||||
- struct drm_framebuffer *fb = plane->state->fb;
|
||||
- int id = skl_wm_plane_id(intel_plane);
|
||||
+ /*
|
||||
+ * TODO: Remove support for already-committed state once we
|
||||
+ * only allocate DDB on in-flight states.
|
||||
+ */
|
||||
+ if (state) {
|
||||
+ for_each_plane_in_state(state, plane, pstate, i) {
|
||||
+ intel_plane = to_intel_plane(plane);
|
||||
+ id = skl_wm_plane_id(intel_plane);
|
||||
|
||||
- if (!to_intel_plane_state(plane->state)->visible)
|
||||
- continue;
|
||||
+ if (intel_plane->pipe != pipe)
|
||||
+ continue;
|
||||
|
||||
- if (plane->type == DRM_PLANE_TYPE_CURSOR)
|
||||
- continue;
|
||||
+ if (!to_intel_plane_state(pstate)->visible) {
|
||||
+ minimum[id] = 0;
|
||||
+ y_minimum[id] = 0;
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (plane->type == DRM_PLANE_TYPE_CURSOR) {
|
||||
+ minimum[id] = 0;
|
||||
+ y_minimum[id] = 0;
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
- minimum[id] = 8;
|
||||
- alloc_size -= minimum[id];
|
||||
- y_minimum[id] = (fb->pixel_format == DRM_FORMAT_NV12) ? 8 : 0;
|
||||
- alloc_size -= y_minimum[id];
|
||||
+ minimum[id] = 8;
|
||||
+ if (pstate->fb->pixel_format == DRM_FORMAT_NV12)
|
||||
+ y_minimum[id] = 8;
|
||||
+ else
|
||||
+ y_minimum[id] = 0;
|
||||
+ }
|
||||
+ } else {
|
||||
+ for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
+ struct drm_plane *plane = &intel_plane->base;
|
||||
+ struct drm_framebuffer *fb = plane->state->fb;
|
||||
+ int id = skl_wm_plane_id(intel_plane);
|
||||
+
|
||||
+ if (!to_intel_plane_state(plane->state)->visible)
|
||||
+ continue;
|
||||
+
|
||||
+ if (plane->type == DRM_PLANE_TYPE_CURSOR)
|
||||
+ continue;
|
||||
+
|
||||
+ minimum[id] = 8;
|
||||
+ y_minimum[id] = (fb->pixel_format == DRM_FORMAT_NV12) ? 8 : 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < PLANE_CURSOR; i++) {
|
||||
+ alloc_size -= minimum[i];
|
||||
+ alloc_size -= y_minimum[i];
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3052,21 +3140,14 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
*/
|
||||
total_data_rate = skl_get_total_relative_data_rate(cstate);
|
||||
if (total_data_rate == 0)
|
||||
- return;
|
||||
+ return 0;
|
||||
|
||||
start = alloc->start;
|
||||
for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
- struct drm_plane *plane = &intel_plane->base;
|
||||
- struct drm_plane_state *pstate = intel_plane->base.state;
|
||||
unsigned int data_rate, y_data_rate;
|
||||
uint16_t plane_blocks, y_plane_blocks = 0;
|
||||
int id = skl_wm_plane_id(intel_plane);
|
||||
|
||||
- if (!to_intel_plane_state(pstate)->visible)
|
||||
- continue;
|
||||
- if (plane->type == DRM_PLANE_TYPE_CURSOR)
|
||||
- continue;
|
||||
-
|
||||
data_rate = cstate->wm.skl.plane_data_rate[id];
|
||||
|
||||
/*
|
||||
@@ -3078,8 +3159,11 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
plane_blocks += div_u64((uint64_t)alloc_size * data_rate,
|
||||
total_data_rate);
|
||||
|
||||
- ddb->plane[pipe][id].start = start;
|
||||
- ddb->plane[pipe][id].end = start + plane_blocks;
|
||||
+ /* Leave disabled planes at (0,0) */
|
||||
+ if (data_rate) {
|
||||
+ ddb->plane[pipe][id].start = start;
|
||||
+ ddb->plane[pipe][id].end = start + plane_blocks;
|
||||
+ }
|
||||
|
||||
start += plane_blocks;
|
||||
|
||||
@@ -3092,12 +3176,15 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
y_plane_blocks += div_u64((uint64_t)alloc_size * y_data_rate,
|
||||
total_data_rate);
|
||||
|
||||
- ddb->y_plane[pipe][id].start = start;
|
||||
- ddb->y_plane[pipe][id].end = start + y_plane_blocks;
|
||||
+ if (y_data_rate) {
|
||||
+ ddb->y_plane[pipe][id].start = start;
|
||||
+ ddb->y_plane[pipe][id].end = start + y_plane_blocks;
|
||||
+ }
|
||||
|
||||
start += y_plane_blocks;
|
||||
}
|
||||
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static uint32_t skl_pipe_pixel_rate(const struct intel_crtc_state *config)
|
||||
@@ -3588,7 +3675,7 @@ static bool skl_update_pipe_wm(struct drm_crtc *crtc,
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||
struct intel_crtc_state *cstate = to_intel_crtc_state(crtc->state);
|
||||
|
||||
- skl_allocate_pipe_ddb(cstate, ddb);
|
||||
+ WARN_ON(skl_allocate_pipe_ddb(cstate, ddb) != 0);
|
||||
skl_build_pipe_wm(cstate, ddb, pipe_wm);
|
||||
|
||||
if (!memcmp(&intel_crtc->wm.active.skl, pipe_wm, sizeof(*pipe_wm)))
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
From 7207eecfcb3095442bce30227b551003edc7b908 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Roper <matthew.d.roper@intel.com>
|
||||
Date: Thu, 12 May 2016 07:06:02 -0700
|
||||
Subject: [PATCH 08/17] drm/i915: Add distrust_bios_wm flag to dev_priv (v2)
|
||||
|
||||
SKL-style platforms can't fully trust the watermark/DDB settings
|
||||
programmed by the BIOS and need to do extra sanitization on their first
|
||||
atomic update. Add a flag to dev_priv that is set during hardware
|
||||
readout and cleared at the end of the first commit.
|
||||
|
||||
Note that for the somewhat common case where everything is turned off
|
||||
when the driver starts up, we don't need to bother with a recompute...we
|
||||
know exactly what the DDB should be (all zero's) so just setup the DDB
|
||||
directly in that case.
|
||||
|
||||
v2:
|
||||
- Move clearing of distrust_bios_wm up below the swap_state call since
|
||||
it's a more natural / self-explanatory location. (Maarten)
|
||||
- Use dev_priv->active_crtcs to test whether any CRTC's are turned on
|
||||
during HW WM readout rather than trying to count the active CRTC's
|
||||
again ourselves. (Maarten)
|
||||
|
||||
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-9-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_drv.h | 7 +++++++
|
||||
drivers/gpu/drm/i915/intel_display.c | 1 +
|
||||
drivers/gpu/drm/i915/intel_pm.c | 8 ++++++++
|
||||
3 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
|
||||
index 611c128..e21960d 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
||||
@@ -1981,6 +1981,13 @@ struct drm_i915_private {
|
||||
* cstate->wm.need_postvbl_update.
|
||||
*/
|
||||
struct mutex wm_mutex;
|
||||
+
|
||||
+ /*
|
||||
+ * Set during HW readout of watermarks/DDB. Some platforms
|
||||
+ * need to know when we're still using BIOS-provided values
|
||||
+ * (which we don't fully trust).
|
||||
+ */
|
||||
+ bool distrust_bios_wm;
|
||||
} wm;
|
||||
|
||||
struct i915_runtime_pm pm;
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index f26d1c5..a9d2e30 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -13621,6 +13621,7 @@ static int intel_atomic_commit(struct drm_device *dev,
|
||||
|
||||
drm_atomic_helper_swap_state(dev, state);
|
||||
dev_priv->wm.config = intel_state->wm_config;
|
||||
+ dev_priv->wm.distrust_bios_wm = false;
|
||||
intel_shared_dpll_commit(state);
|
||||
|
||||
if (intel_state->modeset) {
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index f009d43..a49faa7 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -4026,6 +4026,14 @@ void skl_wm_get_hw_state(struct drm_device *dev)
|
||||
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
|
||||
skl_pipe_wm_get_hw_state(crtc);
|
||||
|
||||
+ if (dev_priv->active_crtcs) {
|
||||
+ /* Fully recompute DDB on first atomic commit */
|
||||
+ dev_priv->wm.distrust_bios_wm = true;
|
||||
+ } else {
|
||||
+ /* Easy/common case; just sanitize DDB now if everything off */
|
||||
+ memset(ddb, 0, sizeof(*ddb));
|
||||
+ }
|
||||
+
|
||||
/* Calculate plane data rates */
|
||||
for_each_intel_crtc(dev, intel_crtc) {
|
||||
struct intel_crtc_state *cstate = intel_crtc->config;
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,244 @@
|
|||
From fbf53d8f1b7d1bcea1411f1f2cd0df6a6cc95332 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Roper <matthew.d.roper@intel.com>
|
||||
Date: Thu, 12 May 2016 07:06:03 -0700
|
||||
Subject: [PATCH 09/17] drm/i915/gen9: Compute DDB allocation at atomic check
|
||||
time (v4)
|
||||
|
||||
Calculate the DDB blocks needed to satisfy the current atomic
|
||||
transaction at atomic check time. This is a prerequisite to calculating
|
||||
SKL watermarks during the 'check' phase and rejecting any configurations
|
||||
that we can't find valid watermarks for.
|
||||
|
||||
Due to the nature of DDB allocation, it's possible for the addition of a
|
||||
new CRTC to make the watermark configuration already in use on another,
|
||||
unchanged CRTC become invalid. A change in which CRTC's are active
|
||||
triggers a recompute of the entire DDB, which unfortunately means we
|
||||
need to disallow any other atomic commits from racing with such an
|
||||
update. If the active CRTC's change, we need to grab the lock on all
|
||||
CRTC's and run all CRTC's through their 'check' handler to recompute and
|
||||
re-check their per-CRTC DDB allocations.
|
||||
|
||||
Note that with this patch we only compute the DDB allocation but we
|
||||
don't actually use the computed values during watermark programming yet.
|
||||
For ease of review/testing/bisecting, we still recompute the DDB at
|
||||
watermark programming time and just WARN() if it doesn't match the
|
||||
precomputed values. A future patch will switch over to using the
|
||||
precomputed values once we're sure they're being properly computed.
|
||||
|
||||
Another clarifying note: DDB allocation itself shouldn't ever fail with
|
||||
the algorithm we use today (i.e., we have enough DDB blocks on BXT to
|
||||
support the minimum needs of the worst-case scenario of every pipe/plane
|
||||
enabled at full size). However the watermarks calculations based on the
|
||||
DDB may fail and we'll be moving those to the atomic check as well in
|
||||
future patches.
|
||||
|
||||
v2:
|
||||
- Skip DDB calculations in the rare case where our transaction doesn't
|
||||
actually touch any CRTC's at all. Assuming at least one CRTC state
|
||||
is present in our transaction, then it means we can't race with any
|
||||
transactions that would update dev_priv->active_crtcs (which requires
|
||||
_all_ CRTC locks).
|
||||
|
||||
v3:
|
||||
- Also calculate DDB during initial hw readout, to prevent using
|
||||
incorrect bios values. (Maarten)
|
||||
|
||||
v4:
|
||||
- Use new distrust_bios_wm flag instead of skip_initial_wm (which was
|
||||
never actually set).
|
||||
- Set intel_state->active_pipe_changes instead of just realloc_pipes
|
||||
|
||||
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Cc: Lyude Paul <cpaul@redhat.com>
|
||||
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-10-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_drv.h | 5 +++
|
||||
drivers/gpu/drm/i915/intel_display.c | 18 ++++++++
|
||||
drivers/gpu/drm/i915/intel_drv.h | 3 ++
|
||||
drivers/gpu/drm/i915/intel_pm.c | 79 ++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 105 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
|
||||
index e21960d..b908a41 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
||||
@@ -339,6 +339,10 @@ struct i915_hotplug {
|
||||
#define for_each_intel_crtc(dev, intel_crtc) \
|
||||
list_for_each_entry(intel_crtc, &dev->mode_config.crtc_list, base.head)
|
||||
|
||||
+#define for_each_intel_crtc_mask(dev, intel_crtc, crtc_mask) \
|
||||
+ list_for_each_entry(intel_crtc, &dev->mode_config.crtc_list, base.head) \
|
||||
+ for_each_if ((crtc_mask) & (1 << drm_crtc_index(&intel_crtc->base)))
|
||||
+
|
||||
#define for_each_intel_encoder(dev, intel_encoder) \
|
||||
list_for_each_entry(intel_encoder, \
|
||||
&(dev)->mode_config.encoder_list, \
|
||||
@@ -594,6 +598,7 @@ struct drm_i915_display_funcs {
|
||||
struct intel_crtc_state *newstate);
|
||||
void (*initial_watermarks)(struct intel_crtc_state *cstate);
|
||||
void (*optimize_watermarks)(struct intel_crtc_state *cstate);
|
||||
+ int (*compute_global_watermarks)(struct drm_atomic_state *state);
|
||||
void (*update_wm)(struct drm_crtc *crtc);
|
||||
int (*modeset_calc_cdclk)(struct drm_atomic_state *state);
|
||||
void (*modeset_commit_cdclk)(struct drm_atomic_state *state);
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index a9d2e30..ecad0ef 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -13342,6 +13342,7 @@ static int intel_modeset_checks(struct drm_atomic_state *state)
|
||||
static void calc_watermark_data(struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_device *dev = state->dev;
|
||||
+ struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *cstate;
|
||||
@@ -13371,6 +13372,10 @@ static void calc_watermark_data(struct drm_atomic_state *state)
|
||||
pstate->crtc_h != pstate->src_h >> 16)
|
||||
intel_state->wm_config.sprites_scaled = true;
|
||||
}
|
||||
+
|
||||
+ /* Is there platform-specific watermark information to calculate? */
|
||||
+ if (dev_priv->display.compute_global_watermarks)
|
||||
+ dev_priv->display.compute_global_watermarks(state);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -13739,6 +13744,19 @@ static int intel_atomic_commit(struct drm_device *dev,
|
||||
intel_modeset_verify_crtc(crtc, old_crtc_state, crtc->state);
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Temporary sanity check: make sure our pre-computed DDB matches the
|
||||
+ * one we actually wind up programming.
|
||||
+ *
|
||||
+ * Not a great place to put this, but the easiest place we have access
|
||||
+ * to both the pre-computed and final DDB's; we'll be removing this
|
||||
+ * check in the next patch anyway.
|
||||
+ */
|
||||
+ WARN(IS_GEN9(dev) &&
|
||||
+ memcmp(&intel_state->ddb, &dev_priv->wm.skl_results.ddb,
|
||||
+ sizeof(intel_state->ddb)),
|
||||
+ "Pre-computed DDB does not match final DDB!\n");
|
||||
+
|
||||
if (intel_state->modeset)
|
||||
intel_display_power_put(dev_priv, POWER_DOMAIN_MODESET);
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||
index d19e83e..2218290 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||
@@ -312,6 +312,9 @@ struct intel_atomic_state {
|
||||
* don't bother calculating intermediate watermarks.
|
||||
*/
|
||||
bool skip_intermediate_wm;
|
||||
+
|
||||
+ /* Gen9+ only */
|
||||
+ struct skl_ddb_allocation ddb;
|
||||
};
|
||||
|
||||
struct intel_plane_state {
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index a49faa7..cfa4f80 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -3812,6 +3812,84 @@ static void skl_clear_wm(struct skl_wm_values *watermarks, enum pipe pipe)
|
||||
|
||||
}
|
||||
|
||||
+static int
|
||||
+skl_compute_ddb(struct drm_atomic_state *state)
|
||||
+{
|
||||
+ struct drm_device *dev = state->dev;
|
||||
+ struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
+ struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
|
||||
+ struct intel_crtc *intel_crtc;
|
||||
+ unsigned realloc_pipes = dev_priv->active_crtcs;
|
||||
+ int ret;
|
||||
+
|
||||
+ /*
|
||||
+ * If this is our first atomic update following hardware readout,
|
||||
+ * we can't trust the DDB that the BIOS programmed for us. Let's
|
||||
+ * pretend that all pipes switched active status so that we'll
|
||||
+ * ensure a full DDB recompute.
|
||||
+ */
|
||||
+ if (dev_priv->wm.distrust_bios_wm)
|
||||
+ intel_state->active_pipe_changes = ~0;
|
||||
+
|
||||
+ /*
|
||||
+ * If the modeset changes which CRTC's are active, we need to
|
||||
+ * recompute the DDB allocation for *all* active pipes, even
|
||||
+ * those that weren't otherwise being modified in any way by this
|
||||
+ * atomic commit. Due to the shrinking of the per-pipe allocations
|
||||
+ * when new active CRTC's are added, it's possible for a pipe that
|
||||
+ * we were already using and aren't changing at all here to suddenly
|
||||
+ * become invalid if its DDB needs exceeds its new allocation.
|
||||
+ *
|
||||
+ * Note that if we wind up doing a full DDB recompute, we can't let
|
||||
+ * any other display updates race with this transaction, so we need
|
||||
+ * to grab the lock on *all* CRTC's.
|
||||
+ */
|
||||
+ if (intel_state->active_pipe_changes)
|
||||
+ realloc_pipes = ~0;
|
||||
+
|
||||
+ for_each_intel_crtc_mask(dev, intel_crtc, realloc_pipes) {
|
||||
+ struct intel_crtc_state *cstate;
|
||||
+
|
||||
+ cstate = intel_atomic_get_crtc_state(state, intel_crtc);
|
||||
+ if (IS_ERR(cstate))
|
||||
+ return PTR_ERR(cstate);
|
||||
+
|
||||
+ ret = skl_allocate_pipe_ddb(cstate, &intel_state->ddb);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+skl_compute_wm(struct drm_atomic_state *state)
|
||||
+{
|
||||
+ struct drm_crtc *crtc;
|
||||
+ struct drm_crtc_state *cstate;
|
||||
+ int ret, i;
|
||||
+ bool changed = false;
|
||||
+
|
||||
+ /*
|
||||
+ * If this transaction isn't actually touching any CRTC's, don't
|
||||
+ * bother with watermark calculation. Note that if we pass this
|
||||
+ * test, we're guaranteed to hold at least one CRTC state mutex,
|
||||
+ * which means we can safely use values like dev_priv->active_crtcs
|
||||
+ * since any racing commits that want to update them would need to
|
||||
+ * hold _all_ CRTC state mutexes.
|
||||
+ */
|
||||
+ for_each_crtc_in_state(state, crtc, cstate, i)
|
||||
+ changed = true;
|
||||
+ if (!changed)
|
||||
+ return 0;
|
||||
+
|
||||
+ ret = skl_compute_ddb(state);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void skl_update_wm(struct drm_crtc *crtc)
|
||||
{
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||
@@ -7384,6 +7462,7 @@ void intel_init_pm(struct drm_device *dev)
|
||||
if (INTEL_INFO(dev)->gen >= 9) {
|
||||
skl_setup_wm_latency(dev);
|
||||
dev_priv->display.update_wm = skl_update_wm;
|
||||
+ dev_priv->display.compute_global_watermarks = skl_compute_wm;
|
||||
} else if (HAS_PCH_SPLIT(dev)) {
|
||||
ilk_setup_wm_latency(dev);
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,379 @@
|
|||
From a9abdc6767855e1668301a1dcc4b5fa8bed1ddfa Mon Sep 17 00:00:00 2001
|
||||
From: Matt Roper <matthew.d.roper@intel.com>
|
||||
Date: Thu, 12 May 2016 07:06:04 -0700
|
||||
Subject: [PATCH 10/17] drm/i915/gen9: Drop re-allocation of DDB at atomic
|
||||
commit (v2)
|
||||
|
||||
Now that we're properly pre-allocating the DDB during the atomic check
|
||||
phase and we trust that the allocation is appropriate, let's actually
|
||||
use the allocation computed and not duplicate that work during the
|
||||
commit phase.
|
||||
|
||||
v2:
|
||||
- Significant rebasing now that we can use cached data rates and
|
||||
minimum block allocations to avoid grabbing additional plane states.
|
||||
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-11-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_display.c | 14 +--
|
||||
drivers/gpu/drm/i915/intel_pm.c | 224 +++++++++++------------------------
|
||||
2 files changed, 67 insertions(+), 171 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index ecad0ef..4db10d7 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -13627,6 +13627,7 @@ static int intel_atomic_commit(struct drm_device *dev,
|
||||
drm_atomic_helper_swap_state(dev, state);
|
||||
dev_priv->wm.config = intel_state->wm_config;
|
||||
dev_priv->wm.distrust_bios_wm = false;
|
||||
+ dev_priv->wm.skl_results.ddb = intel_state->ddb;
|
||||
intel_shared_dpll_commit(state);
|
||||
|
||||
if (intel_state->modeset) {
|
||||
@@ -13744,19 +13745,6 @@ static int intel_atomic_commit(struct drm_device *dev,
|
||||
intel_modeset_verify_crtc(crtc, old_crtc_state, crtc->state);
|
||||
}
|
||||
|
||||
- /*
|
||||
- * Temporary sanity check: make sure our pre-computed DDB matches the
|
||||
- * one we actually wind up programming.
|
||||
- *
|
||||
- * Not a great place to put this, but the easiest place we have access
|
||||
- * to both the pre-computed and final DDB's; we'll be removing this
|
||||
- * check in the next patch anyway.
|
||||
- */
|
||||
- WARN(IS_GEN9(dev) &&
|
||||
- memcmp(&intel_state->ddb, &dev_priv->wm.skl_results.ddb,
|
||||
- sizeof(intel_state->ddb)),
|
||||
- "Pre-computed DDB does not match final DDB!\n");
|
||||
-
|
||||
if (intel_state->modeset)
|
||||
intel_display_power_put(dev_priv, POWER_DOMAIN_MODESET);
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index cfa4f80..0f0d4e1 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -2849,7 +2849,6 @@ skl_wm_plane_id(const struct intel_plane *plane)
|
||||
static void
|
||||
skl_ddb_get_pipe_allocation_limits(struct drm_device *dev,
|
||||
const struct intel_crtc_state *cstate,
|
||||
- struct intel_wm_config *config,
|
||||
struct skl_ddb_entry *alloc, /* out */
|
||||
int *num_active /* out */)
|
||||
{
|
||||
@@ -2857,24 +2856,22 @@ skl_ddb_get_pipe_allocation_limits(struct drm_device *dev,
|
||||
struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
|
||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
struct drm_crtc *for_crtc = cstate->base.crtc;
|
||||
- struct drm_crtc *crtc;
|
||||
unsigned int pipe_size, ddb_size;
|
||||
int nth_active_pipe;
|
||||
int pipe = to_intel_crtc(for_crtc)->pipe;
|
||||
|
||||
- if (intel_state && intel_state->active_pipe_changes)
|
||||
- *num_active = hweight32(intel_state->active_crtcs);
|
||||
- else if (intel_state)
|
||||
- *num_active = hweight32(dev_priv->active_crtcs);
|
||||
- else
|
||||
- *num_active = config->num_pipes_active;
|
||||
-
|
||||
- if (!cstate->base.active) {
|
||||
+ if (WARN_ON(!state) || !cstate->base.active) {
|
||||
alloc->start = 0;
|
||||
alloc->end = 0;
|
||||
+ *num_active = hweight32(dev_priv->active_crtcs);
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (intel_state->active_pipe_changes)
|
||||
+ *num_active = hweight32(intel_state->active_crtcs);
|
||||
+ else
|
||||
+ *num_active = hweight32(dev_priv->active_crtcs);
|
||||
+
|
||||
if (IS_BROXTON(dev))
|
||||
ddb_size = BXT_DDB_SIZE;
|
||||
else
|
||||
@@ -2883,50 +2880,23 @@ skl_ddb_get_pipe_allocation_limits(struct drm_device *dev,
|
||||
ddb_size -= 4; /* 4 blocks for bypass path allocation */
|
||||
|
||||
/*
|
||||
- * FIXME: At the moment we may be called on either in-flight or fully
|
||||
- * committed cstate's. Once we fully move DDB allocation in the check
|
||||
- * phase, we'll only be called on in-flight states and the 'else'
|
||||
- * branch here will go away.
|
||||
- *
|
||||
- * The 'else' branch is slightly racy here, but it was racy to begin
|
||||
- * with; since it's going away soon, no effort is made to address that.
|
||||
+ * If the state doesn't change the active CRTC's, then there's
|
||||
+ * no need to recalculate; the existing pipe allocation limits
|
||||
+ * should remain unchanged. Note that we're safe from racing
|
||||
+ * commits since any racing commit that changes the active CRTC
|
||||
+ * list would need to grab _all_ crtc locks, including the one
|
||||
+ * we currently hold.
|
||||
*/
|
||||
- if (state) {
|
||||
- /*
|
||||
- * If the state doesn't change the active CRTC's, then there's
|
||||
- * no need to recalculate; the existing pipe allocation limits
|
||||
- * should remain unchanged. Note that we're safe from racing
|
||||
- * commits since any racing commit that changes the active CRTC
|
||||
- * list would need to grab _all_ crtc locks, including the one
|
||||
- * we currently hold.
|
||||
- */
|
||||
- if (!intel_state->active_pipe_changes) {
|
||||
- *alloc = dev_priv->wm.skl_hw.ddb.pipe[pipe];
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- nth_active_pipe = hweight32(intel_state->active_crtcs &
|
||||
- (drm_crtc_mask(for_crtc) - 1));
|
||||
- pipe_size = ddb_size / hweight32(intel_state->active_crtcs);
|
||||
- alloc->start = nth_active_pipe * ddb_size / *num_active;
|
||||
- alloc->end = alloc->start + pipe_size;
|
||||
- } else {
|
||||
- nth_active_pipe = 0;
|
||||
- for_each_crtc(dev, crtc) {
|
||||
- if (!to_intel_crtc(crtc)->active)
|
||||
- continue;
|
||||
-
|
||||
- if (crtc == for_crtc)
|
||||
- break;
|
||||
-
|
||||
- nth_active_pipe++;
|
||||
- }
|
||||
-
|
||||
- pipe_size = ddb_size / config->num_pipes_active;
|
||||
- alloc->start = nth_active_pipe * ddb_size /
|
||||
- config->num_pipes_active;
|
||||
- alloc->end = alloc->start + pipe_size;
|
||||
+ if (!intel_state->active_pipe_changes) {
|
||||
+ *alloc = dev_priv->wm.skl_hw.ddb.pipe[pipe];
|
||||
+ return;
|
||||
}
|
||||
+
|
||||
+ nth_active_pipe = hweight32(intel_state->active_crtcs &
|
||||
+ (drm_crtc_mask(for_crtc) - 1));
|
||||
+ pipe_size = ddb_size / hweight32(intel_state->active_crtcs);
|
||||
+ alloc->start = nth_active_pipe * ddb_size / *num_active;
|
||||
+ alloc->end = alloc->start + pipe_size;
|
||||
}
|
||||
|
||||
static unsigned int skl_cursor_allocation(int num_active)
|
||||
@@ -3025,62 +2995,33 @@ skl_get_total_relative_data_rate(struct intel_crtc_state *intel_cstate)
|
||||
struct drm_crtc *crtc = cstate->crtc;
|
||||
struct drm_device *dev = crtc->dev;
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||
+ const struct drm_plane *plane;
|
||||
const struct intel_plane *intel_plane;
|
||||
+ struct drm_plane_state *pstate;
|
||||
unsigned int rate, total_data_rate = 0;
|
||||
int id;
|
||||
+ int i;
|
||||
+
|
||||
+ if (WARN_ON(!state))
|
||||
+ return 0;
|
||||
|
||||
/* Calculate and cache data rate for each plane */
|
||||
- /*
|
||||
- * FIXME: At the moment this function can be called on either an
|
||||
- * in-flight or a committed state object. If it's in-flight then we
|
||||
- * only want to re-calculate the plane data rate for planes that are
|
||||
- * part of the transaction (i.e., we don't want to grab any additional
|
||||
- * plane states if we don't have to). If we're operating on committed
|
||||
- * state, we'll just go ahead and recalculate the plane data rate for
|
||||
- * all planes.
|
||||
- *
|
||||
- * Once we finish moving our DDB allocation to the atomic check phase,
|
||||
- * we'll only be calling this function on in-flight state objects, so
|
||||
- * the 'else' branch here will go away.
|
||||
- */
|
||||
- if (state) {
|
||||
- struct drm_plane *plane;
|
||||
- struct drm_plane_state *pstate;
|
||||
- int i;
|
||||
-
|
||||
- for_each_plane_in_state(state, plane, pstate, i) {
|
||||
- intel_plane = to_intel_plane(plane);
|
||||
- id = skl_wm_plane_id(intel_plane);
|
||||
-
|
||||
- if (intel_plane->pipe != intel_crtc->pipe)
|
||||
- continue;
|
||||
-
|
||||
- /* packed/uv */
|
||||
- rate = skl_plane_relative_data_rate(intel_cstate,
|
||||
- pstate, 0);
|
||||
- intel_cstate->wm.skl.plane_data_rate[id] = rate;
|
||||
-
|
||||
- /* y-plane */
|
||||
- rate = skl_plane_relative_data_rate(intel_cstate,
|
||||
- pstate, 1);
|
||||
- intel_cstate->wm.skl.plane_y_data_rate[id] = rate;
|
||||
- }
|
||||
- } else {
|
||||
- for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
- const struct drm_plane_state *pstate =
|
||||
- intel_plane->base.state;
|
||||
- int id = skl_wm_plane_id(intel_plane);
|
||||
+ for_each_plane_in_state(state, plane, pstate, i) {
|
||||
+ id = skl_wm_plane_id(to_intel_plane(plane));
|
||||
+ intel_plane = to_intel_plane(plane);
|
||||
|
||||
- /* packed/uv */
|
||||
- rate = skl_plane_relative_data_rate(intel_cstate,
|
||||
- pstate, 0);
|
||||
- intel_cstate->wm.skl.plane_data_rate[id] = rate;
|
||||
+ if (intel_plane->pipe != intel_crtc->pipe)
|
||||
+ continue;
|
||||
|
||||
- /* y-plane */
|
||||
- rate = skl_plane_relative_data_rate(intel_cstate,
|
||||
- pstate, 1);
|
||||
- intel_cstate->wm.skl.plane_y_data_rate[id] = rate;
|
||||
- }
|
||||
+ /* packed/uv */
|
||||
+ rate = skl_plane_relative_data_rate(intel_cstate,
|
||||
+ pstate, 0);
|
||||
+ intel_cstate->wm.skl.plane_data_rate[id] = rate;
|
||||
+
|
||||
+ /* y-plane */
|
||||
+ rate = skl_plane_relative_data_rate(intel_cstate,
|
||||
+ pstate, 1);
|
||||
+ intel_cstate->wm.skl.plane_y_data_rate[id] = rate;
|
||||
}
|
||||
|
||||
/* Calculate CRTC's total data rate from cached values */
|
||||
@@ -3104,8 +3045,6 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
struct drm_atomic_state *state = cstate->base.state;
|
||||
struct drm_crtc *crtc = cstate->base.crtc;
|
||||
struct drm_device *dev = crtc->dev;
|
||||
- struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
- struct intel_wm_config *config = &dev_priv->wm.config;
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||
struct intel_plane *intel_plane;
|
||||
struct drm_plane *plane;
|
||||
@@ -3119,6 +3058,9 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
int num_active;
|
||||
int id, i;
|
||||
|
||||
+ if (WARN_ON(!state))
|
||||
+ return 0;
|
||||
+
|
||||
if (!cstate->base.active) {
|
||||
ddb->pipe[pipe].start = ddb->pipe[pipe].end = 0;
|
||||
memset(ddb->plane[pipe], 0, sizeof(ddb->plane[pipe]));
|
||||
@@ -3126,8 +3068,7 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
return 0;
|
||||
}
|
||||
|
||||
- skl_ddb_get_pipe_allocation_limits(dev, cstate, config, alloc,
|
||||
- &num_active);
|
||||
+ skl_ddb_get_pipe_allocation_limits(dev, cstate, alloc, &num_active);
|
||||
alloc_size = skl_ddb_entry_size(alloc);
|
||||
if (alloc_size == 0) {
|
||||
memset(ddb->plane[pipe], 0, sizeof(ddb->plane[pipe]));
|
||||
@@ -3139,53 +3080,31 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
|
||||
ddb->plane[pipe][PLANE_CURSOR].end = alloc->end;
|
||||
|
||||
alloc_size -= cursor_blocks;
|
||||
- alloc->end -= cursor_blocks;
|
||||
|
||||
/* 1. Allocate the mininum required blocks for each active plane */
|
||||
- /*
|
||||
- * TODO: Remove support for already-committed state once we
|
||||
- * only allocate DDB on in-flight states.
|
||||
- */
|
||||
- if (state) {
|
||||
- for_each_plane_in_state(state, plane, pstate, i) {
|
||||
- intel_plane = to_intel_plane(plane);
|
||||
- id = skl_wm_plane_id(intel_plane);
|
||||
-
|
||||
- if (intel_plane->pipe != pipe)
|
||||
- continue;
|
||||
-
|
||||
- if (!to_intel_plane_state(pstate)->visible) {
|
||||
- minimum[id] = 0;
|
||||
- y_minimum[id] = 0;
|
||||
- continue;
|
||||
- }
|
||||
- if (plane->type == DRM_PLANE_TYPE_CURSOR) {
|
||||
- minimum[id] = 0;
|
||||
- y_minimum[id] = 0;
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- minimum[id] = 8;
|
||||
- if (pstate->fb->pixel_format == DRM_FORMAT_NV12)
|
||||
- y_minimum[id] = 8;
|
||||
- else
|
||||
- y_minimum[id] = 0;
|
||||
- }
|
||||
- } else {
|
||||
- for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
- struct drm_plane *plane = &intel_plane->base;
|
||||
- struct drm_framebuffer *fb = plane->state->fb;
|
||||
- int id = skl_wm_plane_id(intel_plane);
|
||||
-
|
||||
- if (!to_intel_plane_state(plane->state)->visible)
|
||||
- continue;
|
||||
+ for_each_plane_in_state(state, plane, pstate, i) {
|
||||
+ intel_plane = to_intel_plane(plane);
|
||||
+ id = skl_wm_plane_id(intel_plane);
|
||||
|
||||
- if (plane->type == DRM_PLANE_TYPE_CURSOR)
|
||||
- continue;
|
||||
+ if (intel_plane->pipe != pipe)
|
||||
+ continue;
|
||||
|
||||
- minimum[id] = 8;
|
||||
- y_minimum[id] = (fb->pixel_format == DRM_FORMAT_NV12) ? 8 : 0;
|
||||
+ if (!to_intel_plane_state(pstate)->visible) {
|
||||
+ minimum[id] = 0;
|
||||
+ y_minimum[id] = 0;
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (plane->type == DRM_PLANE_TYPE_CURSOR) {
|
||||
+ minimum[id] = 0;
|
||||
+ y_minimum[id] = 0;
|
||||
+ continue;
|
||||
}
|
||||
+
|
||||
+ minimum[id] = 8;
|
||||
+ if (pstate->fb->pixel_format == DRM_FORMAT_NV12)
|
||||
+ y_minimum[id] = 8;
|
||||
+ else
|
||||
+ y_minimum[id] = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < PLANE_CURSOR; i++) {
|
||||
@@ -3736,7 +3655,6 @@ static bool skl_update_pipe_wm(struct drm_crtc *crtc,
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||
struct intel_crtc_state *cstate = to_intel_crtc_state(crtc->state);
|
||||
|
||||
- WARN_ON(skl_allocate_pipe_ddb(cstate, ddb) != 0);
|
||||
skl_build_pipe_wm(cstate, ddb, pipe_wm);
|
||||
|
||||
if (!memcmp(&intel_crtc->wm.active.skl, pipe_wm, sizeof(*pipe_wm)))
|
||||
@@ -3800,16 +3718,6 @@ static void skl_clear_wm(struct skl_wm_values *watermarks, enum pipe pipe)
|
||||
memset(watermarks->plane_trans[pipe],
|
||||
0, sizeof(uint32_t) * I915_MAX_PLANES);
|
||||
watermarks->plane_trans[pipe][PLANE_CURSOR] = 0;
|
||||
-
|
||||
- /* Clear ddb entries for pipe */
|
||||
- memset(&watermarks->ddb.pipe[pipe], 0, sizeof(struct skl_ddb_entry));
|
||||
- memset(&watermarks->ddb.plane[pipe], 0,
|
||||
- sizeof(struct skl_ddb_entry) * I915_MAX_PLANES);
|
||||
- memset(&watermarks->ddb.y_plane[pipe], 0,
|
||||
- sizeof(struct skl_ddb_entry) * I915_MAX_PLANES);
|
||||
- memset(&watermarks->ddb.plane[pipe][PLANE_CURSOR], 0,
|
||||
- sizeof(struct skl_ddb_entry));
|
||||
-
|
||||
}
|
||||
|
||||
static int
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
From eacd0ecb98a93e3ff83a4479eadeb9cda05d3579 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Mon, 20 Jun 2016 12:41:01 +0200
|
||||
Subject: [PATCH 11/17] drm/i915/gen9: Calculate plane WM's from state
|
||||
|
||||
Upstream: since drm-intel-next-2016-05-22
|
||||
commit 33815fa55b31a5de4b197c09926ecab3dfb79732
|
||||
|
||||
Author: Matt Roper <matthew.d.roper@intel.com>
|
||||
AuthorDate: Thu May 12 07:06:05 2016 -0700
|
||||
Commit: Matt Roper <matthew.d.roper@intel.com>
|
||||
CommitDate: Fri May 13 07:34:12 2016 -0700
|
||||
|
||||
drm/i915/gen9: Calculate plane WM's from state
|
||||
|
||||
In a future patch we'll want to calculate plane watermarks for in-flight
|
||||
atomic state rather than the already-committed state.
|
||||
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-12-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_pm.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index 80f9f18..3164f30 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -3179,16 +3179,14 @@ static bool skl_ddb_allocation_changed(const struct skl_ddb_allocation *new_ddb,
|
||||
|
||||
static bool skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
|
||||
struct intel_crtc_state *cstate,
|
||||
- struct intel_plane *intel_plane,
|
||||
+ struct intel_plane_state *intel_pstate,
|
||||
uint16_t ddb_allocation,
|
||||
int level,
|
||||
uint16_t *out_blocks, /* out */
|
||||
uint8_t *out_lines /* out */)
|
||||
{
|
||||
- struct drm_plane *plane = &intel_plane->base;
|
||||
- struct drm_framebuffer *fb = plane->state->fb;
|
||||
- struct intel_plane_state *intel_pstate =
|
||||
- to_intel_plane_state(plane->state);
|
||||
+ struct drm_plane_state *pstate = &intel_pstate->base;
|
||||
+ struct drm_framebuffer *fb = pstate->fb;
|
||||
uint32_t latency = dev_priv->wm.skl_latency[level];
|
||||
uint32_t method1, method2;
|
||||
uint32_t plane_bytes_per_line, plane_blocks_per_line;
|
||||
@@ -3203,7 +3201,7 @@ static bool skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
|
||||
width = drm_rect_width(&intel_pstate->src) >> 16;
|
||||
height = drm_rect_height(&intel_pstate->src) >> 16;
|
||||
|
||||
- if (intel_rotation_90_or_270(plane->state->rotation))
|
||||
+ if (intel_rotation_90_or_270(pstate->rotation))
|
||||
swap(width, height);
|
||||
|
||||
cpp = drm_format_plane_cpp(fb->pixel_format, 0);
|
||||
@@ -3223,7 +3221,7 @@ static bool skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
|
||||
fb->modifier[0] == I915_FORMAT_MOD_Yf_TILED) {
|
||||
uint32_t min_scanlines = 4;
|
||||
uint32_t y_tile_minimum;
|
||||
- if (intel_rotation_90_or_270(plane->state->rotation)) {
|
||||
+ if (intel_rotation_90_or_270(pstate->rotation)) {
|
||||
int cpp = (fb->pixel_format == DRM_FORMAT_NV12) ?
|
||||
drm_format_plane_cpp(fb->pixel_format, 1) :
|
||||
drm_format_plane_cpp(fb->pixel_format, 0);
|
||||
@@ -3277,17 +3275,19 @@ static void skl_compute_wm_level(const struct drm_i915_private *dev_priv,
|
||||
struct drm_device *dev = dev_priv->dev;
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(cstate->base.crtc);
|
||||
struct intel_plane *intel_plane;
|
||||
+ struct intel_plane_state *intel_pstate;
|
||||
uint16_t ddb_blocks;
|
||||
enum pipe pipe = intel_crtc->pipe;
|
||||
|
||||
for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
int i = skl_wm_plane_id(intel_plane);
|
||||
|
||||
+ intel_pstate = to_intel_plane_state(intel_plane->base.state);
|
||||
ddb_blocks = skl_ddb_entry_size(&ddb->plane[pipe][i]);
|
||||
|
||||
result->plane_en[i] = skl_compute_plane_wm(dev_priv,
|
||||
cstate,
|
||||
- intel_plane,
|
||||
+ intel_pstate,
|
||||
ddb_blocks,
|
||||
level,
|
||||
&result->plane_res_b[i],
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
From c3d2591095045a8230361d55fadf15ce5dc9127d Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Mon, 20 Jun 2016 12:41:12 +0200
|
||||
Subject: [PATCH 12/17] drm/i915/gen9: Allow watermark calculation on in-flight
|
||||
atomic state (v3)
|
||||
|
||||
Upstream: since drm-intel-next-2016-05-22
|
||||
commit f4a967523ec7215a3ec867b7ed2e916bd34840e1
|
||||
|
||||
Author: Matt Roper <matthew.d.roper@intel.com>
|
||||
AuthorDate: Thu May 12 07:06:06 2016 -0700
|
||||
Commit: Matt Roper <matthew.d.roper@intel.com>
|
||||
CommitDate: Fri May 13 07:34:23 2016 -0700
|
||||
|
||||
drm/i915/gen9: Allow watermark calculation on in-flight atomic state (v3)
|
||||
|
||||
In an upcoming patch we'll move this calculation to the atomic 'check'
|
||||
phase so that the display update can be rejected early if no valid
|
||||
watermark programming is possible.
|
||||
|
||||
v2:
|
||||
- Drop intel_pstate_for_cstate_plane() helper and add note about how
|
||||
the code needs to evolve in the future if we start allowing more than
|
||||
one pending commit against a CRTC. (Maarten)
|
||||
|
||||
v3:
|
||||
- Only have skl_compute_wm_level calculate watermarks for enabled
|
||||
planes; we can just set the other planes on a CRTC to disabled
|
||||
without having to look at the plane state. This is important because
|
||||
despite our CRTC lock we can still have racing commits that modify
|
||||
a disabled plane's property without turning it on. (Maarten)
|
||||
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-13-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_pm.c | 61 ++++++++++++++++++++++++++++++++---------
|
||||
1 file changed, 48 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index 3164f30..cd29ab6 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -3266,23 +3266,56 @@ static bool skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
|
||||
return true;
|
||||
}
|
||||
|
||||
-static void skl_compute_wm_level(const struct drm_i915_private *dev_priv,
|
||||
- struct skl_ddb_allocation *ddb,
|
||||
- struct intel_crtc_state *cstate,
|
||||
- int level,
|
||||
- struct skl_wm_level *result)
|
||||
+static int
|
||||
+skl_compute_wm_level(const struct drm_i915_private *dev_priv,
|
||||
+ struct skl_ddb_allocation *ddb,
|
||||
+ struct intel_crtc_state *cstate,
|
||||
+ int level,
|
||||
+ struct skl_wm_level *result)
|
||||
{
|
||||
struct drm_device *dev = dev_priv->dev;
|
||||
+ struct drm_atomic_state *state = cstate->base.state;
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(cstate->base.crtc);
|
||||
+ struct drm_plane *plane;
|
||||
struct intel_plane *intel_plane;
|
||||
struct intel_plane_state *intel_pstate;
|
||||
uint16_t ddb_blocks;
|
||||
enum pipe pipe = intel_crtc->pipe;
|
||||
|
||||
- for_each_intel_plane_on_crtc(dev, intel_crtc, intel_plane) {
|
||||
+ /*
|
||||
+ * We'll only calculate watermarks for planes that are actually
|
||||
+ * enabled, so make sure all other planes are set as disabled.
|
||||
+ */
|
||||
+ memset(result, 0, sizeof(*result));
|
||||
+
|
||||
+ for_each_intel_plane_mask(dev, intel_plane, cstate->base.plane_mask) {
|
||||
int i = skl_wm_plane_id(intel_plane);
|
||||
|
||||
- intel_pstate = to_intel_plane_state(intel_plane->base.state);
|
||||
+ plane = &intel_plane->base;
|
||||
+ intel_pstate = NULL;
|
||||
+ if (state)
|
||||
+ intel_pstate =
|
||||
+ intel_atomic_get_existing_plane_state(state,
|
||||
+ intel_plane);
|
||||
+
|
||||
+ /*
|
||||
+ * Note: If we start supporting multiple pending atomic commits
|
||||
+ * against the same planes/CRTC's in the future, plane->state
|
||||
+ * will no longer be the correct pre-state to use for the
|
||||
+ * calculations here and we'll need to change where we get the
|
||||
+ * 'unchanged' plane data from.
|
||||
+ *
|
||||
+ * For now this is fine because we only allow one queued commit
|
||||
+ * against a CRTC. Even if the plane isn't modified by this
|
||||
+ * transaction and we don't have a plane lock, we still have
|
||||
+ * the CRTC's lock, so we know that no other transactions are
|
||||
+ * racing with us to update it.
|
||||
+ */
|
||||
+ if (!intel_pstate)
|
||||
+ intel_pstate = to_intel_plane_state(plane->state);
|
||||
+
|
||||
+ WARN_ON(!intel_pstate->base.fb);
|
||||
+
|
||||
ddb_blocks = skl_ddb_entry_size(&ddb->plane[pipe][i]);
|
||||
|
||||
result->plane_en[i] = skl_compute_plane_wm(dev_priv,
|
||||
@@ -3293,6 +3326,8 @@ static void skl_compute_wm_level(const struct drm_i915_private *dev_priv,
|
||||
&result->plane_res_b[i],
|
||||
&result->plane_res_l[i]);
|
||||
}
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
@@ -3587,14 +3622,14 @@ static void skl_flush_wm_values(struct drm_i915_private *dev_priv,
|
||||
}
|
||||
}
|
||||
|
||||
-static bool skl_update_pipe_wm(struct drm_crtc *crtc,
|
||||
+static bool skl_update_pipe_wm(struct drm_crtc_state *cstate,
|
||||
struct skl_ddb_allocation *ddb, /* out */
|
||||
struct skl_pipe_wm *pipe_wm /* out */)
|
||||
{
|
||||
- struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||
- struct intel_crtc_state *cstate = to_intel_crtc_state(crtc->state);
|
||||
+ struct intel_crtc *intel_crtc = to_intel_crtc(cstate->crtc);
|
||||
+ struct intel_crtc_state *intel_cstate = to_intel_crtc_state(cstate);
|
||||
|
||||
- skl_build_pipe_wm(cstate, ddb, pipe_wm);
|
||||
+ skl_build_pipe_wm(intel_cstate, ddb, pipe_wm);
|
||||
|
||||
if (!memcmp(&intel_crtc->wm.active.skl, pipe_wm, sizeof(*pipe_wm)))
|
||||
return false;
|
||||
@@ -3634,7 +3669,7 @@ static void skl_update_other_pipe_wm(struct drm_device *dev,
|
||||
if (!intel_crtc->active)
|
||||
continue;
|
||||
|
||||
- wm_changed = skl_update_pipe_wm(&intel_crtc->base,
|
||||
+ wm_changed = skl_update_pipe_wm(intel_crtc->base.state,
|
||||
&r->ddb, &pipe_wm);
|
||||
|
||||
/*
|
||||
@@ -3752,7 +3787,7 @@ static void skl_update_wm(struct drm_crtc *crtc)
|
||||
|
||||
skl_clear_wm(results, intel_crtc->pipe);
|
||||
|
||||
- if (!skl_update_pipe_wm(crtc, &results->ddb, pipe_wm))
|
||||
+ if (!skl_update_pipe_wm(crtc->state, &results->ddb, pipe_wm))
|
||||
return;
|
||||
|
||||
skl_compute_wm_results(dev, pipe_wm, results, intel_crtc);
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
From b43247a865f73fa3b73a878236b5055bfb864169 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Mon, 20 Jun 2016 12:41:23 +0200
|
||||
Subject: [PATCH 13/17] drm/i915/gen9: Use a bitmask to track dirty pipe
|
||||
watermarks
|
||||
|
||||
Upstream: since drm-intel-next-2016-05-22
|
||||
commit 2b4b9f35d94b1b533bc23110b040b04316480b28
|
||||
|
||||
Author: Matt Roper <matthew.d.roper@intel.com>
|
||||
AuthorDate: Thu May 12 07:06:07 2016 -0700
|
||||
Commit: Matt Roper <matthew.d.roper@intel.com>
|
||||
CommitDate: Fri May 13 07:34:40 2016 -0700
|
||||
|
||||
drm/i915/gen9: Use a bitmask to track dirty pipe watermarks
|
||||
|
||||
Slightly easier to work with than an array of bools.
|
||||
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-14-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_drv.h | 2 +-
|
||||
drivers/gpu/drm/i915/intel_pm.c | 10 +++++-----
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
|
||||
index 237df9f..67c76b6 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
||||
@@ -1615,7 +1615,7 @@ struct skl_ddb_allocation {
|
||||
};
|
||||
|
||||
struct skl_wm_values {
|
||||
- bool dirty[I915_MAX_PIPES];
|
||||
+ unsigned dirty_pipes;
|
||||
struct skl_ddb_allocation ddb;
|
||||
uint32_t wm_linetime[I915_MAX_PIPES];
|
||||
uint32_t plane[I915_MAX_PIPES][I915_MAX_PLANES][8];
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index cd29ab6..611c5a1 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -3455,7 +3455,7 @@ static void skl_write_wm_values(struct drm_i915_private *dev_priv,
|
||||
int i, level, max_level = ilk_wm_max_level(dev);
|
||||
enum pipe pipe = crtc->pipe;
|
||||
|
||||
- if (!new->dirty[pipe])
|
||||
+ if ((new->dirty_pipes & drm_crtc_mask(&crtc->base)) == 0)
|
||||
continue;
|
||||
|
||||
I915_WRITE(PIPE_WM_LINETIME(pipe), new->wm_linetime[pipe]);
|
||||
@@ -3680,7 +3680,7 @@ static void skl_update_other_pipe_wm(struct drm_device *dev,
|
||||
WARN_ON(!wm_changed);
|
||||
|
||||
skl_compute_wm_results(dev, &pipe_wm, r, intel_crtc);
|
||||
- r->dirty[intel_crtc->pipe] = true;
|
||||
+ r->dirty_pipes |= drm_crtc_mask(&intel_crtc->base);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3783,7 +3783,7 @@ static void skl_update_wm(struct drm_crtc *crtc)
|
||||
|
||||
|
||||
/* Clear all dirty flags */
|
||||
- memset(results->dirty, 0, sizeof(bool) * I915_MAX_PIPES);
|
||||
+ results->dirty_pipes = 0;
|
||||
|
||||
skl_clear_wm(results, intel_crtc->pipe);
|
||||
|
||||
@@ -3791,7 +3791,7 @@ static void skl_update_wm(struct drm_crtc *crtc)
|
||||
return;
|
||||
|
||||
skl_compute_wm_results(dev, pipe_wm, results, intel_crtc);
|
||||
- results->dirty[intel_crtc->pipe] = true;
|
||||
+ results->dirty_pipes |= drm_crtc_mask(&intel_crtc->base);
|
||||
|
||||
skl_update_other_pipe_wm(dev, crtc, results);
|
||||
skl_write_wm_values(dev_priv, results);
|
||||
@@ -3952,7 +3952,7 @@ static void skl_pipe_wm_get_hw_state(struct drm_crtc *crtc)
|
||||
if (!intel_crtc->active)
|
||||
return;
|
||||
|
||||
- hw->dirty[pipe] = true;
|
||||
+ hw->dirty_pipes |= drm_crtc_mask(crtc);
|
||||
|
||||
active->linetime = hw->wm_linetime[pipe];
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,254 @@
|
|||
From 2dda82bdd570042820241e71c02ea36081835f67 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Mon, 20 Jun 2016 12:41:35 +0200
|
||||
Subject: [PATCH 14/17] drm/i915/gen9: Propagate watermark calculation failures
|
||||
up the call chain
|
||||
|
||||
Upstream: since drm-intel-next-2016-05-22
|
||||
commit 55994c2c38a1101f84cdf277b228f830af8a9c1b
|
||||
|
||||
Author: Matt Roper <matthew.d.roper@intel.com>
|
||||
AuthorDate: Thu May 12 07:06:08 2016 -0700
|
||||
Commit: Matt Roper <matthew.d.roper@intel.com>
|
||||
CommitDate: Fri May 13 07:34:48 2016 -0700
|
||||
|
||||
drm/i915/gen9: Propagate watermark calculation failures up the call chain
|
||||
|
||||
Once we move watermark calculation to the atomic check phase, we'll want
|
||||
to start rejecting display configurations that exceed out watermark
|
||||
limits. At the moment we just assume that there's always a valid set of
|
||||
watermarks, even though this may not actually be true. Let's prepare by
|
||||
passing return codes up through the call stack in preparation.
|
||||
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-15-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_display.c | 10 ++--
|
||||
drivers/gpu/drm/i915/intel_pm.c | 90 ++++++++++++++++++++++--------------
|
||||
2 files changed, 61 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index b484fda..9ac2346 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -13222,7 +13222,7 @@ static int intel_modeset_checks(struct drm_atomic_state *state)
|
||||
* phase. The code here should be run after the per-crtc and per-plane 'check'
|
||||
* handlers to ensure that all derived state has been updated.
|
||||
*/
|
||||
-static void calc_watermark_data(struct drm_atomic_state *state)
|
||||
+static int calc_watermark_data(struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_device *dev = state->dev;
|
||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
@@ -13258,7 +13258,9 @@ static void calc_watermark_data(struct drm_atomic_state *state)
|
||||
|
||||
/* Is there platform-specific watermark information to calculate? */
|
||||
if (dev_priv->display.compute_global_watermarks)
|
||||
- dev_priv->display.compute_global_watermarks(state);
|
||||
+ return dev_priv->display.compute_global_watermarks(state);
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -13345,9 +13347,7 @@ static int intel_atomic_check(struct drm_device *dev,
|
||||
return ret;
|
||||
|
||||
intel_fbc_choose_crtc(dev_priv, state);
|
||||
- calc_watermark_data(state);
|
||||
-
|
||||
- return 0;
|
||||
+ return calc_watermark_data(state);
|
||||
}
|
||||
|
||||
static int intel_atomic_prepare_commit(struct drm_device *dev,
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index 611c5a1..ec22d93 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -3177,13 +3177,14 @@ static bool skl_ddb_allocation_changed(const struct skl_ddb_allocation *new_ddb,
|
||||
return false;
|
||||
}
|
||||
|
||||
-static bool skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
|
||||
- struct intel_crtc_state *cstate,
|
||||
- struct intel_plane_state *intel_pstate,
|
||||
- uint16_t ddb_allocation,
|
||||
- int level,
|
||||
- uint16_t *out_blocks, /* out */
|
||||
- uint8_t *out_lines /* out */)
|
||||
+static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
|
||||
+ struct intel_crtc_state *cstate,
|
||||
+ struct intel_plane_state *intel_pstate,
|
||||
+ uint16_t ddb_allocation,
|
||||
+ int level,
|
||||
+ uint16_t *out_blocks, /* out */
|
||||
+ uint8_t *out_lines, /* out */
|
||||
+ bool *enabled /* out */)
|
||||
{
|
||||
struct drm_plane_state *pstate = &intel_pstate->base;
|
||||
struct drm_framebuffer *fb = pstate->fb;
|
||||
@@ -3195,8 +3196,10 @@ static bool skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
|
||||
uint8_t cpp;
|
||||
uint32_t width = 0, height = 0;
|
||||
|
||||
- if (latency == 0 || !cstate->base.active || !intel_pstate->visible)
|
||||
- return false;
|
||||
+ if (latency == 0 || !cstate->base.active || !intel_pstate->visible) {
|
||||
+ *enabled = false;
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
width = drm_rect_width(&intel_pstate->src) >> 16;
|
||||
height = drm_rect_height(&intel_pstate->src) >> 16;
|
||||
@@ -3257,13 +3260,16 @@ static bool skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
|
||||
res_blocks++;
|
||||
}
|
||||
|
||||
- if (res_blocks >= ddb_allocation || res_lines > 31)
|
||||
- return false;
|
||||
+ if (res_blocks >= ddb_allocation || res_lines > 31) {
|
||||
+ *enabled = false;
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
*out_blocks = res_blocks;
|
||||
*out_lines = res_lines;
|
||||
+ *enabled = true;
|
||||
|
||||
- return true;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -3281,6 +3287,7 @@ skl_compute_wm_level(const struct drm_i915_private *dev_priv,
|
||||
struct intel_plane_state *intel_pstate;
|
||||
uint16_t ddb_blocks;
|
||||
enum pipe pipe = intel_crtc->pipe;
|
||||
+ int ret;
|
||||
|
||||
/*
|
||||
* We'll only calculate watermarks for planes that are actually
|
||||
@@ -3318,13 +3325,16 @@ skl_compute_wm_level(const struct drm_i915_private *dev_priv,
|
||||
|
||||
ddb_blocks = skl_ddb_entry_size(&ddb->plane[pipe][i]);
|
||||
|
||||
- result->plane_en[i] = skl_compute_plane_wm(dev_priv,
|
||||
- cstate,
|
||||
- intel_pstate,
|
||||
- ddb_blocks,
|
||||
- level,
|
||||
- &result->plane_res_b[i],
|
||||
- &result->plane_res_l[i]);
|
||||
+ ret = skl_compute_plane_wm(dev_priv,
|
||||
+ cstate,
|
||||
+ intel_pstate,
|
||||
+ ddb_blocks,
|
||||
+ level,
|
||||
+ &result->plane_res_b[i],
|
||||
+ &result->plane_res_l[i],
|
||||
+ &result->plane_en[i]);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -3361,21 +3371,26 @@ static void skl_compute_transition_wm(struct intel_crtc_state *cstate,
|
||||
}
|
||||
}
|
||||
|
||||
-static void skl_build_pipe_wm(struct intel_crtc_state *cstate,
|
||||
- struct skl_ddb_allocation *ddb,
|
||||
- struct skl_pipe_wm *pipe_wm)
|
||||
+static int skl_build_pipe_wm(struct intel_crtc_state *cstate,
|
||||
+ struct skl_ddb_allocation *ddb,
|
||||
+ struct skl_pipe_wm *pipe_wm)
|
||||
{
|
||||
struct drm_device *dev = cstate->base.crtc->dev;
|
||||
const struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
int level, max_level = ilk_wm_max_level(dev);
|
||||
+ int ret;
|
||||
|
||||
for (level = 0; level <= max_level; level++) {
|
||||
- skl_compute_wm_level(dev_priv, ddb, cstate,
|
||||
- level, &pipe_wm->wm[level]);
|
||||
+ ret = skl_compute_wm_level(dev_priv, ddb, cstate,
|
||||
+ level, &pipe_wm->wm[level]);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
}
|
||||
pipe_wm->linetime = skl_compute_linetime_wm(cstate);
|
||||
|
||||
skl_compute_transition_wm(cstate, &pipe_wm->trans_wm);
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static void skl_compute_wm_results(struct drm_device *dev,
|
||||
@@ -3622,21 +3637,27 @@ static void skl_flush_wm_values(struct drm_i915_private *dev_priv,
|
||||
}
|
||||
}
|
||||
|
||||
-static bool skl_update_pipe_wm(struct drm_crtc_state *cstate,
|
||||
- struct skl_ddb_allocation *ddb, /* out */
|
||||
- struct skl_pipe_wm *pipe_wm /* out */)
|
||||
+static int skl_update_pipe_wm(struct drm_crtc_state *cstate,
|
||||
+ struct skl_ddb_allocation *ddb, /* out */
|
||||
+ struct skl_pipe_wm *pipe_wm, /* out */
|
||||
+ bool *changed /* out */)
|
||||
{
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(cstate->crtc);
|
||||
struct intel_crtc_state *intel_cstate = to_intel_crtc_state(cstate);
|
||||
+ int ret;
|
||||
|
||||
- skl_build_pipe_wm(intel_cstate, ddb, pipe_wm);
|
||||
+ ret = skl_build_pipe_wm(intel_cstate, ddb, pipe_wm);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
|
||||
if (!memcmp(&intel_crtc->wm.active.skl, pipe_wm, sizeof(*pipe_wm)))
|
||||
- return false;
|
||||
+ *changed = false;
|
||||
+ else
|
||||
+ *changed = true;
|
||||
|
||||
intel_crtc->wm.active.skl = *pipe_wm;
|
||||
|
||||
- return true;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static void skl_update_other_pipe_wm(struct drm_device *dev,
|
||||
@@ -3669,8 +3690,8 @@ static void skl_update_other_pipe_wm(struct drm_device *dev,
|
||||
if (!intel_crtc->active)
|
||||
continue;
|
||||
|
||||
- wm_changed = skl_update_pipe_wm(intel_crtc->base.state,
|
||||
- &r->ddb, &pipe_wm);
|
||||
+ skl_update_pipe_wm(intel_crtc->base.state,
|
||||
+ &r->ddb, &pipe_wm, &wm_changed);
|
||||
|
||||
/*
|
||||
* If we end up re-computing the other pipe WM values, it's
|
||||
@@ -3780,14 +3801,15 @@ static void skl_update_wm(struct drm_crtc *crtc)
|
||||
struct skl_wm_values *results = &dev_priv->wm.skl_results;
|
||||
struct intel_crtc_state *cstate = to_intel_crtc_state(crtc->state);
|
||||
struct skl_pipe_wm *pipe_wm = &cstate->wm.skl.optimal;
|
||||
-
|
||||
+ bool wm_changed;
|
||||
|
||||
/* Clear all dirty flags */
|
||||
results->dirty_pipes = 0;
|
||||
|
||||
skl_clear_wm(results, intel_crtc->pipe);
|
||||
|
||||
- if (!skl_update_pipe_wm(crtc->state, &results->ddb, pipe_wm))
|
||||
+ skl_update_pipe_wm(crtc->state, &results->ddb, pipe_wm, &wm_changed);
|
||||
+ if (!wm_changed)
|
||||
return;
|
||||
|
||||
skl_compute_wm_results(dev, pipe_wm, results, intel_crtc);
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,302 @@
|
|||
From 664f87c5bfcc7798bd5b16e14792f1e9ba2956ea Mon Sep 17 00:00:00 2001
|
||||
From: Matt Roper <matthew.d.roper@intel.com>
|
||||
Date: Thu, 12 May 2016 15:11:40 -0700
|
||||
Subject: [PATCH 15/17] drm/i915/gen9: Calculate watermarks during atomic
|
||||
'check' (v2)
|
||||
|
||||
Moving watermark calculation into the check phase will allow us to to
|
||||
reject display configurations for which there are no valid watermark
|
||||
values before we start trying to program the hardware (although those
|
||||
tests will come in a subsequent patch).
|
||||
|
||||
Another advantage of moving this calculation to the check phase is that
|
||||
we can calculate the watermarks in a single shot as part of the atomic
|
||||
transaction. The watermark interfaces we inherited from our legacy
|
||||
modesetting days are a bit broken in the atomic design because they use
|
||||
per-crtc entry points but actually re-calculate and re-program something
|
||||
that is really more of a global state. That worked okay in the legacy
|
||||
modesetting world because operations only ever updated a single CRTC at
|
||||
a time. However in the atomic world, a transaction can involve multiple
|
||||
CRTC's, which means we wind up computing and programming the watermarks
|
||||
NxN times (where N is the number of CRTC's involved). With this patch
|
||||
we eliminate the redundant re-calculation of watermark data for atomic
|
||||
states (which was the cause of the WARN_ON(!wm_changed) problems that
|
||||
have plagued us for a while).
|
||||
|
||||
We still need to work on the 'commit' side of watermark handling so that
|
||||
we aren't doing redundant NxN programming of watermarks, but that's
|
||||
content for future patches.
|
||||
|
||||
v2:
|
||||
- Bail out of skl_write_wm_values() if the CRTC isn't active. Now that
|
||||
we set dirty_pipes to ~0 if the active pipes change (because
|
||||
we need to deal with DDB changes), we can now wind up here for
|
||||
disabled pipes, whereas we couldn't before.
|
||||
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89055
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92181
|
||||
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Tested-by: Daniel Stone <daniels@collabora.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463091100-13747-1-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_display.c | 2 +-
|
||||
drivers/gpu/drm/i915/intel_drv.h | 2 +-
|
||||
drivers/gpu/drm/i915/intel_pm.c | 140 +++++++++++++----------------------
|
||||
3 files changed, 54 insertions(+), 90 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index 2190bac..a75daac 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -13627,7 +13627,7 @@ static int intel_atomic_commit(struct drm_device *dev,
|
||||
drm_atomic_helper_swap_state(dev, state);
|
||||
dev_priv->wm.config = intel_state->wm_config;
|
||||
dev_priv->wm.distrust_bios_wm = false;
|
||||
- dev_priv->wm.skl_results.ddb = intel_state->ddb;
|
||||
+ dev_priv->wm.skl_results = intel_state->wm_results;
|
||||
intel_shared_dpll_commit(state);
|
||||
|
||||
if (intel_state->modeset) {
|
||||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||
index 2218290..ab0be7a 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||
@@ -314,7 +314,7 @@ struct intel_atomic_state {
|
||||
bool skip_intermediate_wm;
|
||||
|
||||
/* Gen9+ only */
|
||||
- struct skl_ddb_allocation ddb;
|
||||
+ struct skl_wm_values wm_results;
|
||||
};
|
||||
|
||||
struct intel_plane_state {
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index 342aa66..b072417 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -3221,23 +3221,6 @@ static uint32_t skl_wm_method2(uint32_t pixel_rate, uint32_t pipe_htotal,
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static bool skl_ddb_allocation_changed(const struct skl_ddb_allocation *new_ddb,
|
||||
- const struct intel_crtc *intel_crtc)
|
||||
-{
|
||||
- struct drm_device *dev = intel_crtc->base.dev;
|
||||
- struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
- const struct skl_ddb_allocation *cur_ddb = &dev_priv->wm.skl_hw.ddb;
|
||||
-
|
||||
- /*
|
||||
- * If ddb allocation of pipes changed, it may require recalculation of
|
||||
- * watermarks
|
||||
- */
|
||||
- if (memcmp(new_ddb->pipe, cur_ddb->pipe, sizeof(new_ddb->pipe)))
|
||||
- return true;
|
||||
-
|
||||
- return false;
|
||||
-}
|
||||
-
|
||||
static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
|
||||
struct intel_crtc_state *cstate,
|
||||
struct intel_plane_state *intel_pstate,
|
||||
@@ -3533,6 +3516,8 @@ static void skl_write_wm_values(struct drm_i915_private *dev_priv,
|
||||
|
||||
if ((new->dirty_pipes & drm_crtc_mask(&crtc->base)) == 0)
|
||||
continue;
|
||||
+ if (!crtc->active)
|
||||
+ continue;
|
||||
|
||||
I915_WRITE(PIPE_WM_LINETIME(pipe), new->wm_linetime[pipe]);
|
||||
|
||||
@@ -3716,66 +3701,9 @@ static int skl_update_pipe_wm(struct drm_crtc_state *cstate,
|
||||
else
|
||||
*changed = true;
|
||||
|
||||
- intel_crtc->wm.active.skl = *pipe_wm;
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void skl_update_other_pipe_wm(struct drm_device *dev,
|
||||
- struct drm_crtc *crtc,
|
||||
- struct skl_wm_values *r)
|
||||
-{
|
||||
- struct intel_crtc *intel_crtc;
|
||||
- struct intel_crtc *this_crtc = to_intel_crtc(crtc);
|
||||
-
|
||||
- /*
|
||||
- * If the WM update hasn't changed the allocation for this_crtc (the
|
||||
- * crtc we are currently computing the new WM values for), other
|
||||
- * enabled crtcs will keep the same allocation and we don't need to
|
||||
- * recompute anything for them.
|
||||
- */
|
||||
- if (!skl_ddb_allocation_changed(&r->ddb, this_crtc))
|
||||
- return;
|
||||
-
|
||||
- /*
|
||||
- * Otherwise, because of this_crtc being freshly enabled/disabled, the
|
||||
- * other active pipes need new DDB allocation and WM values.
|
||||
- */
|
||||
- for_each_intel_crtc(dev, intel_crtc) {
|
||||
- struct skl_pipe_wm pipe_wm = {};
|
||||
- bool wm_changed;
|
||||
-
|
||||
- if (this_crtc->pipe == intel_crtc->pipe)
|
||||
- continue;
|
||||
-
|
||||
- if (!intel_crtc->active)
|
||||
- continue;
|
||||
-
|
||||
- skl_update_pipe_wm(intel_crtc->base.state,
|
||||
- &r->ddb, &pipe_wm, &wm_changed);
|
||||
-
|
||||
- /*
|
||||
- * If we end up re-computing the other pipe WM values, it's
|
||||
- * because it was really needed, so we expect the WM values to
|
||||
- * be different.
|
||||
- */
|
||||
- WARN_ON(!wm_changed);
|
||||
-
|
||||
- skl_compute_wm_results(dev, &pipe_wm, r, intel_crtc);
|
||||
- r->dirty_pipes |= drm_crtc_mask(&intel_crtc->base);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-static void skl_clear_wm(struct skl_wm_values *watermarks, enum pipe pipe)
|
||||
-{
|
||||
- watermarks->wm_linetime[pipe] = 0;
|
||||
- memset(watermarks->plane[pipe], 0,
|
||||
- sizeof(uint32_t) * 8 * I915_MAX_PLANES);
|
||||
- memset(watermarks->plane_trans[pipe],
|
||||
- 0, sizeof(uint32_t) * I915_MAX_PLANES);
|
||||
- watermarks->plane_trans[pipe][PLANE_CURSOR] = 0;
|
||||
-}
|
||||
-
|
||||
static int
|
||||
skl_compute_ddb(struct drm_atomic_state *state)
|
||||
{
|
||||
@@ -3783,6 +3711,7 @@ skl_compute_ddb(struct drm_atomic_state *state)
|
||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
|
||||
struct intel_crtc *intel_crtc;
|
||||
+ struct skl_ddb_allocation *ddb = &intel_state->wm_results.ddb;
|
||||
unsigned realloc_pipes = dev_priv->active_crtcs;
|
||||
int ret;
|
||||
|
||||
@@ -3808,8 +3737,10 @@ skl_compute_ddb(struct drm_atomic_state *state)
|
||||
* any other display updates race with this transaction, so we need
|
||||
* to grab the lock on *all* CRTC's.
|
||||
*/
|
||||
- if (intel_state->active_pipe_changes)
|
||||
+ if (intel_state->active_pipe_changes) {
|
||||
realloc_pipes = ~0;
|
||||
+ intel_state->wm_results.dirty_pipes = ~0;
|
||||
+ }
|
||||
|
||||
for_each_intel_crtc_mask(dev, intel_crtc, realloc_pipes) {
|
||||
struct intel_crtc_state *cstate;
|
||||
@@ -3818,7 +3749,7 @@ skl_compute_ddb(struct drm_atomic_state *state)
|
||||
if (IS_ERR(cstate))
|
||||
return PTR_ERR(cstate);
|
||||
|
||||
- ret = skl_allocate_pipe_ddb(cstate, &intel_state->ddb);
|
||||
+ ret = skl_allocate_pipe_ddb(cstate, ddb);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
@@ -3831,8 +3762,11 @@ skl_compute_wm(struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *cstate;
|
||||
- int ret, i;
|
||||
+ struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
|
||||
+ struct skl_wm_values *results = &intel_state->wm_results;
|
||||
+ struct skl_pipe_wm *pipe_wm;
|
||||
bool changed = false;
|
||||
+ int ret, i;
|
||||
|
||||
/*
|
||||
* If this transaction isn't actually touching any CRTC's, don't
|
||||
@@ -3847,10 +3781,45 @@ skl_compute_wm(struct drm_atomic_state *state)
|
||||
if (!changed)
|
||||
return 0;
|
||||
|
||||
+ /* Clear all dirty flags */
|
||||
+ results->dirty_pipes = 0;
|
||||
+
|
||||
ret = skl_compute_ddb(state);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
+ /*
|
||||
+ * Calculate WM's for all pipes that are part of this transaction.
|
||||
+ * Note that the DDB allocation above may have added more CRTC's that
|
||||
+ * weren't otherwise being modified (and set bits in dirty_pipes) if
|
||||
+ * pipe allocations had to change.
|
||||
+ *
|
||||
+ * FIXME: Now that we're doing this in the atomic check phase, we
|
||||
+ * should allow skl_update_pipe_wm() to return failure in cases where
|
||||
+ * no suitable watermark values can be found.
|
||||
+ */
|
||||
+ for_each_crtc_in_state(state, crtc, cstate, i) {
|
||||
+ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||
+ struct intel_crtc_state *intel_cstate =
|
||||
+ to_intel_crtc_state(cstate);
|
||||
+
|
||||
+ pipe_wm = &intel_cstate->wm.skl.optimal;
|
||||
+ ret = skl_update_pipe_wm(cstate, &results->ddb, pipe_wm,
|
||||
+ &changed);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ if (changed)
|
||||
+ results->dirty_pipes |= drm_crtc_mask(crtc);
|
||||
+
|
||||
+ if ((results->dirty_pipes & drm_crtc_mask(crtc)) == 0)
|
||||
+ /* This pipe's WM's did not change */
|
||||
+ continue;
|
||||
+
|
||||
+ intel_cstate->update_wm_pre = true;
|
||||
+ skl_compute_wm_results(crtc->dev, pipe_wm, results, intel_crtc);
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3862,26 +3831,21 @@ static void skl_update_wm(struct drm_crtc *crtc)
|
||||
struct skl_wm_values *results = &dev_priv->wm.skl_results;
|
||||
struct intel_crtc_state *cstate = to_intel_crtc_state(crtc->state);
|
||||
struct skl_pipe_wm *pipe_wm = &cstate->wm.skl.optimal;
|
||||
- bool wm_changed;
|
||||
-
|
||||
- /* Clear all dirty flags */
|
||||
- results->dirty_pipes = 0;
|
||||
|
||||
- skl_clear_wm(results, intel_crtc->pipe);
|
||||
-
|
||||
- skl_update_pipe_wm(crtc->state, &results->ddb, pipe_wm, &wm_changed);
|
||||
- if (!wm_changed)
|
||||
+ if ((results->dirty_pipes & drm_crtc_mask(crtc)) == 0)
|
||||
return;
|
||||
|
||||
- skl_compute_wm_results(dev, pipe_wm, results, intel_crtc);
|
||||
- results->dirty_pipes |= drm_crtc_mask(&intel_crtc->base);
|
||||
+ intel_crtc->wm.active.skl = *pipe_wm;
|
||||
+
|
||||
+ mutex_lock(&dev_priv->wm.wm_mutex);
|
||||
|
||||
- skl_update_other_pipe_wm(dev, crtc, results);
|
||||
skl_write_wm_values(dev_priv, results);
|
||||
skl_flush_wm_values(dev_priv, results);
|
||||
|
||||
/* store the new configuration */
|
||||
dev_priv->wm.skl_hw = *results;
|
||||
+
|
||||
+ mutex_unlock(&dev_priv->wm.wm_mutex);
|
||||
}
|
||||
|
||||
static void ilk_compute_wm_config(struct drm_device *dev,
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
From 7731c187f1f77501b7dddf419a06c1b42b0f1388 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Mon, 20 Jun 2016 12:42:00 +0200
|
||||
Subject: [PATCH 16/17] drm/i915/gen9: Reject display updates that exceed wm
|
||||
limitations (v2)
|
||||
|
||||
Upstream: since drm-intel-next-2016-05-22
|
||||
commit 6b6bada7d476b586d85b1f9df43125804877e09f
|
||||
|
||||
Author: Matt Roper <matthew.d.roper@intel.com>
|
||||
AuthorDate: Thu May 12 07:06:10 2016 -0700
|
||||
Commit: Matt Roper <matthew.d.roper@intel.com>
|
||||
CommitDate: Fri May 13 07:36:04 2016 -0700
|
||||
|
||||
drm/i915/gen9: Reject display updates that exceed wm limitations (v2)
|
||||
|
||||
If we can't find any valid level 0 watermark values for the requested
|
||||
atomic transaction, reject the configuration before we try to start
|
||||
programming the hardware.
|
||||
|
||||
v2:
|
||||
- Add extra debugging output when we reject level 0 watermarks so that
|
||||
we can more easily debug how/why they were rejected.
|
||||
|
||||
Cc: Lyude Paul <cpaul@redhat.com>
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-17-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/intel_pm.c | 17 ++++++++++++++++-
|
||||
1 file changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
|
||||
index 73e5242..70dcd2e 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c
|
||||
@@ -3245,7 +3245,22 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
|
||||
|
||||
if (res_blocks >= ddb_allocation || res_lines > 31) {
|
||||
*enabled = false;
|
||||
- return 0;
|
||||
+
|
||||
+ /*
|
||||
+ * If there are no valid level 0 watermarks, then we can't
|
||||
+ * support this display configuration.
|
||||
+ */
|
||||
+ if (level) {
|
||||
+ return 0;
|
||||
+ } else {
|
||||
+ DRM_DEBUG_KMS("Requested display configuration exceeds system watermark limitations\n");
|
||||
+ DRM_DEBUG_KMS("Plane %d.%d: blocks required = %u/%u, lines required = %u/31\n",
|
||||
+ to_intel_crtc(cstate->base.crtc)->pipe,
|
||||
+ skl_wm_plane_id(to_intel_plane(pstate->plane)),
|
||||
+ res_blocks, ddb_allocation, res_lines);
|
||||
+
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
}
|
||||
|
||||
*out_blocks = res_blocks;
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
From 73a35468564f4e47deade0a4a5eb7ec289611ebc Mon Sep 17 00:00:00 2001
|
||||
From: Matt Roper <matthew.d.roper@intel.com>
|
||||
Date: Thu, 12 May 2016 07:06:11 -0700
|
||||
Subject: [PATCH 17/17] drm/i915: Remove wm_config from
|
||||
dev_priv/intel_atomic_state
|
||||
|
||||
We calculate the watermark config into intel_atomic_state and then save
|
||||
it into dev_priv, but never actually use it from there. This is
|
||||
left-over from some early ILK-style watermark programming designs that
|
||||
got changed over time.
|
||||
|
||||
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
||||
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-18-git-send-email-matthew.d.roper@intel.com
|
||||
---
|
||||
drivers/gpu/drm/i915/i915_drv.h | 3 ---
|
||||
drivers/gpu/drm/i915/intel_display.c | 31 -------------------------------
|
||||
drivers/gpu/drm/i915/intel_drv.h | 1 -
|
||||
3 files changed, 35 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
|
||||
index e7bde72..608f8e4 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
||||
@@ -1961,9 +1961,6 @@ struct drm_i915_private {
|
||||
*/
|
||||
uint16_t skl_latency[8];
|
||||
|
||||
- /* Committed wm config */
|
||||
- struct intel_wm_config config;
|
||||
-
|
||||
/*
|
||||
* The skl_wm_values structure is a bit too big for stack
|
||||
* allocation, so we keep the staging struct where we store
|
||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||
index a75daac..9c109c6 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||
@@ -13343,35 +13343,6 @@ static int calc_watermark_data(struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_device *dev = state->dev;
|
||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
- struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
|
||||
- struct drm_crtc *crtc;
|
||||
- struct drm_crtc_state *cstate;
|
||||
- struct drm_plane *plane;
|
||||
- struct drm_plane_state *pstate;
|
||||
-
|
||||
- /*
|
||||
- * Calculate watermark configuration details now that derived
|
||||
- * plane/crtc state is all properly updated.
|
||||
- */
|
||||
- drm_for_each_crtc(crtc, dev) {
|
||||
- cstate = drm_atomic_get_existing_crtc_state(state, crtc) ?:
|
||||
- crtc->state;
|
||||
-
|
||||
- if (cstate->active)
|
||||
- intel_state->wm_config.num_pipes_active++;
|
||||
- }
|
||||
- drm_for_each_legacy_plane(plane, dev) {
|
||||
- pstate = drm_atomic_get_existing_plane_state(state, plane) ?:
|
||||
- plane->state;
|
||||
-
|
||||
- if (!to_intel_plane_state(pstate)->visible)
|
||||
- continue;
|
||||
-
|
||||
- intel_state->wm_config.sprites_enabled = true;
|
||||
- if (pstate->crtc_w != pstate->src_w >> 16 ||
|
||||
- pstate->crtc_h != pstate->src_h >> 16)
|
||||
- intel_state->wm_config.sprites_scaled = true;
|
||||
- }
|
||||
|
||||
/* Is there platform-specific watermark information to calculate? */
|
||||
if (dev_priv->display.compute_global_watermarks)
|
||||
@@ -13625,7 +13596,6 @@ static int intel_atomic_commit(struct drm_device *dev,
|
||||
}
|
||||
|
||||
drm_atomic_helper_swap_state(dev, state);
|
||||
- dev_priv->wm.config = intel_state->wm_config;
|
||||
dev_priv->wm.distrust_bios_wm = false;
|
||||
dev_priv->wm.skl_results = intel_state->wm_results;
|
||||
intel_shared_dpll_commit(state);
|
||||
@@ -15405,7 +15375,6 @@ retry:
|
||||
}
|
||||
|
||||
/* Write calculated watermark values back */
|
||||
- to_i915(dev)->wm.config = to_intel_atomic_state(state)->wm_config;
|
||||
for_each_crtc_in_state(state, crtc, cstate, i) {
|
||||
struct intel_crtc_state *cs = to_intel_crtc_state(cstate);
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||
index ab0be7a..8d73c20 100644
|
||||
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||
@@ -305,7 +305,6 @@ struct intel_atomic_state {
|
||||
unsigned int min_pixclk[I915_MAX_PIPES];
|
||||
|
||||
struct intel_shared_dpll_config shared_dpll[I915_NUM_PLLS];
|
||||
- struct intel_wm_config wm_config;
|
||||
|
||||
/*
|
||||
* Current watermarks can't be trusted during hardware readout, so
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
From 4b85149b764cd024e3dd2aff9eb22a9e1aadd1fa Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Mar 2012 08:39:37 -0500
|
||||
Subject: [PATCH 04/20] ACPI: Limit access to custom_method
|
||||
|
||||
custom_method effectively allows arbitrary access to system memory, making
|
||||
it possible for an attacker to circumvent restrictions on module loading.
|
||||
Disable it if any such restrictions have been enabled.
|
||||
|
||||
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
---
|
||||
drivers/acpi/custom_method.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c
|
||||
index c68e72414a67..4277938af700 100644
|
||||
--- a/drivers/acpi/custom_method.c
|
||||
+++ b/drivers/acpi/custom_method.c
|
||||
@@ -29,6 +29,9 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,
|
||||
struct acpi_table_header table;
|
||||
acpi_status status;
|
||||
|
||||
+ if (secure_modules())
|
||||
+ return -EPERM;
|
||||
+
|
||||
if (!(*ppos)) {
|
||||
/* parse the table header to get the table length */
|
||||
if (count <= sizeof(struct acpi_table_header))
|
||||
--
|
||||
2.4.3
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From 527a5767c165abd2b4dba99da992c51ca7547562 Mon Sep 17 00:00:00 2001
|
||||
From: Kangjie Lu <kangjielu@gmail.com>
|
||||
Date: Tue, 3 May 2016 16:44:07 -0400
|
||||
Subject: [PATCH 1/3] ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The stack object “tread” has a total size of 32 bytes. Its field
|
||||
“event” and “val” both contain 4 bytes padding. These 8 bytes
|
||||
padding bytes are sent to user without being initialized.
|
||||
|
||||
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/core/timer.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/sound/core/timer.c b/sound/core/timer.c
|
||||
index 6469bedda2f3..964f5ebf495e 100644
|
||||
--- a/sound/core/timer.c
|
||||
+++ b/sound/core/timer.c
|
||||
@@ -1739,6 +1739,7 @@ static int snd_timer_user_params(struct file *file,
|
||||
if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
|
||||
if (tu->tread) {
|
||||
struct snd_timer_tread tread;
|
||||
+ memset(&tread, 0, sizeof(tread));
|
||||
tread.event = SNDRV_TIMER_EVENT_EARLY;
|
||||
tread.tstamp.tv_sec = 0;
|
||||
tread.tstamp.tv_nsec = 0;
|
||||
--
|
||||
2.5.5
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From addd6e9f0e25efb00d813d54528607c75b77c416 Mon Sep 17 00:00:00 2001
|
||||
From: Kangjie Lu <kangjielu@gmail.com>
|
||||
Date: Tue, 3 May 2016 16:44:20 -0400
|
||||
Subject: [PATCH 2/3] ALSA: timer: Fix leak in events via
|
||||
snd_timer_user_ccallback
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The stack object “r1” has a total size of 32 bytes. Its field
|
||||
“event” and “val” both contain 4 bytes padding. These 8 bytes
|
||||
padding bytes are sent to user without being initialized.
|
||||
|
||||
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/core/timer.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/sound/core/timer.c b/sound/core/timer.c
|
||||
index 964f5ebf495e..e98fa5feb731 100644
|
||||
--- a/sound/core/timer.c
|
||||
+++ b/sound/core/timer.c
|
||||
@@ -1225,6 +1225,7 @@ static void snd_timer_user_ccallback(struct snd_timer_instance *timeri,
|
||||
tu->tstamp = *tstamp;
|
||||
if ((tu->filter & (1 << event)) == 0 || !tu->tread)
|
||||
return;
|
||||
+ memset(&r1, 0, sizeof(r1));
|
||||
r1.event = event;
|
||||
r1.tstamp = *tstamp;
|
||||
r1.val = resolution;
|
||||
--
|
||||
2.5.5
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From b06a443b5679e9a0298e2f206ddb60845569f62f Mon Sep 17 00:00:00 2001
|
||||
From: Kangjie Lu <kangjielu@gmail.com>
|
||||
Date: Tue, 3 May 2016 16:44:32 -0400
|
||||
Subject: [PATCH 3/3] ALSA: timer: Fix leak in events via
|
||||
snd_timer_user_tinterrupt
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The stack object “r1” has a total size of 32 bytes. Its field
|
||||
“event” and “val” both contain 4 bytes padding. These 8 bytes
|
||||
padding bytes are sent to user without being initialized.
|
||||
|
||||
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
sound/core/timer.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/sound/core/timer.c b/sound/core/timer.c
|
||||
index e98fa5feb731..c69a27155433 100644
|
||||
--- a/sound/core/timer.c
|
||||
+++ b/sound/core/timer.c
|
||||
@@ -1268,6 +1268,7 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri,
|
||||
}
|
||||
if ((tu->filter & (1 << SNDRV_TIMER_EVENT_RESOLUTION)) &&
|
||||
tu->last_resolution != resolution) {
|
||||
+ memset(&r1, 0, sizeof(r1));
|
||||
r1.event = SNDRV_TIMER_EVENT_RESOLUTION;
|
||||
r1.tstamp = tstamp;
|
||||
r1.val = resolution;
|
||||
--
|
||||
2.5.5
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
From patchwork Wed Oct 26 15:17:01 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [3/5] ARM: OMAP4+: Fix bad fallthrough for cpuidle
|
||||
From: Tony Lindgren <tony@atomide.com>
|
||||
X-Patchwork-Id: 9397501
|
||||
Message-Id: <20161026151703.24730-4-tony@atomide.com>
|
||||
To: linux-omap@vger.kernel.org
|
||||
Cc: Nishanth Menon <nm@ti.com>, Dmitry Lifshitz <lifshitz@compulab.co.il>,
|
||||
Dave Gerlach <d-gerlach@ti.com>,
|
||||
Enric Balletbo Serra <eballetbo@gmail.com>,
|
||||
"Dr . H . Nikolaus Schaller" <hns@goldelico.com>,
|
||||
Pau Pajuel <ppajuel@gmail.com>, Grazvydas Ignotas <notasas@gmail.com>,
|
||||
Benoit Cousson <bcousson@baylibre.com>,
|
||||
Santosh Shilimkar <ssantosh@kernel.org>,
|
||||
Javier Martinez Canillas <javier@dowhile0.org>,
|
||||
Robert Nelson <robertcnelson@gmail.com>,
|
||||
Marek Belisko <marek@goldelico.com>, linux-arm-kernel@lists.infradead.org
|
||||
Date: Wed, 26 Oct 2016 08:17:01 -0700
|
||||
|
||||
We don't want to fall through to a bunch of errors for retention
|
||||
if PM_OMAP4_CPU_OSWR_DISABLE is not configured for a SoC.
|
||||
|
||||
Fixes: 6099dd37c669 ("ARM: OMAP5 / DRA7: Enable CPU RET on suspend")
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap-mpuss-lowpower.c | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
|
||||
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
|
||||
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
|
||||
@@ -244,10 +244,9 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
|
||||
save_state = 1;
|
||||
break;
|
||||
case PWRDM_POWER_RET:
|
||||
- if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE)) {
|
||||
+ if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE))
|
||||
save_state = 0;
|
||||
- break;
|
||||
- }
|
||||
+ break;
|
||||
default:
|
||||
/*
|
||||
* CPUx CSWR is invalid hardware state. Also CPUx OSWR
|
||||
From 5a78ff7bf7e25191144b550961001bbf6c734da4 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Chen <peter.chen@nxp.com>
|
||||
Date: Thu, 11 Aug 2016 17:44:54 +0800
|
||||
Subject: [PATCH 04152/16809] Revert "gpu: drm: omapdrm: dss-of: add missing
|
||||
of_node_put after calling of_parse_phandle"
|
||||
|
||||
This reverts
|
||||
commit 2ab9f5879162499e1c4e48613287e3f59e593c4f
|
||||
Author: Peter Chen <peter.chen@nxp.com>
|
||||
Date: Fri Jul 15 11:17:03 2016 +0800
|
||||
gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle
|
||||
|
||||
The of_get_next_parent will drop refcount on the passed node, so the reverted
|
||||
patch is wrong, thanks for Tomi Valkeinen points it.
|
||||
|
||||
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
||||
Signed-off-by: Peter Chen <peter.chen@nxp.com>
|
||||
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
||||
Signed-off-by: Sean Paul <seanpaul@chromium.org>
|
||||
Link: http://patchwork.freedesktop.org/patch/msgid/1470908694-16362-1-git-send-email-peter.chen@nxp.com
|
||||
---
|
||||
drivers/gpu/drm/omapdrm/dss/dss-of.c | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/omapdrm/dss/dss-of.c b/drivers/gpu/drm/omapdrm/dss/dss-of.c
|
||||
index e256d87..dfd4e96 100644
|
||||
--- a/drivers/gpu/drm/omapdrm/dss/dss-of.c
|
||||
+++ b/drivers/gpu/drm/omapdrm/dss/dss-of.c
|
||||
@@ -125,16 +125,15 @@ u32 dss_of_port_get_port_number(struct device_node *port)
|
||||
|
||||
static struct device_node *omapdss_of_get_remote_port(const struct device_node *node)
|
||||
{
|
||||
- struct device_node *np, *np_parent;
|
||||
+ struct device_node *np;
|
||||
|
||||
np = of_parse_phandle(node, "remote-endpoint", 0);
|
||||
if (!np)
|
||||
return NULL;
|
||||
|
||||
- np_parent = of_get_next_parent(np);
|
||||
- of_node_put(np);
|
||||
+ np = of_get_next_parent(np);
|
||||
|
||||
- return np_parent;
|
||||
+ return np;
|
||||
}
|
||||
|
||||
struct device_node *
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
From patchwork Wed Jan 27 15:08:19 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [1/2] ARM: mvebu: change order of ethernet DT nodes on Armada 38x
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
X-Patchwork-Id: 8134751
|
||||
Message-Id: <1453907300-28283-2-git-send-email-thomas.petazzoni@free-electrons.com>
|
||||
To: Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
|
||||
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
|
||||
Gregory Clement <gregory.clement@free-electrons.com>
|
||||
Cc: Nadav Haklai <nadavh@marvell.com>, Lior Amsalem <alior@marvell.com>,
|
||||
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Date: Wed, 27 Jan 2016 16:08:19 +0100
|
||||
|
||||
On Armada 38x, the available network interfaces are:
|
||||
|
||||
- port 0, at 0x70000
|
||||
- port 1, at 0x30000
|
||||
- port 2, at 0x34000
|
||||
|
||||
Due to the rule saying that DT nodes should be ordered by register
|
||||
addresses, the network interfaces are probed in this order:
|
||||
|
||||
- port 1, at 0x30000, which gets named eth0
|
||||
- port 2, at 0x34000, which gets named eth1
|
||||
- port 0, at 0x70000, which gets named eth2
|
||||
|
||||
(if all three ports are enabled at the board level)
|
||||
|
||||
Unfortunately, the network subsystem doesn't provide any way to rename
|
||||
network interfaces from the kernel (it can only be done from
|
||||
userspace). So, the default naming of the network interfaces is very
|
||||
confusing as it doesn't match the datasheet, nor the naming of the
|
||||
interfaces in the bootloader, nor the naming of the interfaces on
|
||||
labels printed on the board.
|
||||
|
||||
For example, on the Armada 388 GP, the board has two ports, labelled
|
||||
GE0 and GE1. One has to know that GE0 is eth1 and GE1 is eth0, which
|
||||
isn't really obvious.
|
||||
|
||||
In order to solve this, this patch proposes to exceptionaly violate
|
||||
the rule of "order DT nodes by register address", and put the 0x70000
|
||||
node before the 0x30000 node, so that network interfaces get named in
|
||||
a more natural way.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/armada-38x.dtsi | 30 +++++++++++++++++++++---------
|
||||
1 file changed, 21 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
|
||||
index e8b7f67..b50784d 100644
|
||||
--- a/arch/arm/boot/dts/armada-38x.dtsi
|
||||
+++ b/arch/arm/boot/dts/armada-38x.dtsi
|
||||
@@ -429,6 +429,27 @@
|
||||
reg = <0x22000 0x1000>;
|
||||
};
|
||||
|
||||
+ /*
|
||||
+ * As a special exception to the "order by
|
||||
+ * register address" rule, the eth0 node is
|
||||
+ * placed here to ensure that it gets
|
||||
+ * registered as the first interface, since
|
||||
+ * the network subsystem doesn't allow naming
|
||||
+ * interfaces using DT aliases. Without this,
|
||||
+ * the ordering of interfaces is different
|
||||
+ * from the one used in U-Boot and the
|
||||
+ * labeling of interfaces on the boards, which
|
||||
+ * is very confusing for users.
|
||||
+ */
|
||||
+ eth0: ethernet@70000 {
|
||||
+ compatible = "marvell,armada-370-neta";
|
||||
+ reg = <0x70000 0x4000>;
|
||||
+ interrupts-extended = <&mpic 8>;
|
||||
+ clocks = <&gateclk 4>;
|
||||
+ tx-csum-limit = <9800>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
eth1: ethernet@30000 {
|
||||
compatible = "marvell,armada-370-neta";
|
||||
reg = <0x30000 0x4000>;
|
||||
@@ -493,15 +514,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
- eth0: ethernet@70000 {
|
||||
- compatible = "marvell,armada-370-neta";
|
||||
- reg = <0x70000 0x4000>;
|
||||
- interrupts-extended = <&mpic 8>;
|
||||
- clocks = <&gateclk 4>;
|
||||
- tx-csum-limit = <9800>;
|
||||
- status = "disabled";
|
||||
- };
|
||||
-
|
||||
mdio: mdio@72004 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
|
@ -0,0 +1,28 @@
|
|||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Thu, 3 May 2012 20:27:11 +0100
|
||||
Subject: [PATCH] ARM: tegra: usb no reset
|
||||
|
||||
Patch for disconnect issues with storage attached to a
|
||||
tegra-ehci controller
|
||||
---
|
||||
drivers/usb/core/hub.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
|
||||
index 43cb2f2e3b43..7f838ec11c81 100644
|
||||
--- a/drivers/usb/core/hub.c
|
||||
+++ b/drivers/usb/core/hub.c
|
||||
@@ -4996,6 +4996,13 @@ static void hub_event(struct work_struct *work)
|
||||
(u16) hub->change_bits[0],
|
||||
(u16) hub->event_bits[0]);
|
||||
|
||||
+ /* Don't disconnect USB-SATA on TrimSlice */
|
||||
+ if (strcmp(dev_name(hdev->bus->controller), "tegra-ehci.0") == 0) {
|
||||
+ if ((hdev->state == 7) && (hub->change_bits[0] == 0) &&
|
||||
+ (hub->event_bits[0] == 0x2))
|
||||
+ hub->event_bits[0] = 0;
|
||||
+ }
|
||||
+
|
||||
/* Lock the device, then check to see if we were
|
||||
* disconnected while waiting for the lock to succeed. */
|
||||
usb_lock_device(hdev);
|
|
@ -0,0 +1,54 @@
|
|||
From 5216de8394ff599e41c8540c0572368c18c51459 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Howells <dhowells@redhat.com>
|
||||
Date: Tue, 23 Oct 2012 09:30:54 -0400
|
||||
Subject: [PATCH 4/9] Add EFI signature data types
|
||||
|
||||
Add the data types that are used for containing hashes, keys and certificates
|
||||
for cryptographic verification.
|
||||
|
||||
Bugzilla: N/A
|
||||
Upstream-status: Fedora mustard for now
|
||||
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
---
|
||||
include/linux/efi.h | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
||||
index 8cb38cfcba74..8c274b4ea8e6 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -647,6 +647,9 @@ void efi_native_runtime_setup(void);
|
||||
#define LINUX_EFI_ARM_SCREEN_INFO_TABLE_GUID EFI_GUID(0xe03fc20a, 0x85dc, 0x406e, 0xb9, 0x0e, 0x4a, 0xb5, 0x02, 0x37, 0x1d, 0x95)
|
||||
#define LINUX_EFI_LOADER_ENTRY_GUID EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, 0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f)
|
||||
|
||||
+#define EFI_CERT_SHA256_GUID EFI_GUID(0xc1c41626, 0x504c, 0x4092, 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28)
|
||||
+#define EFI_CERT_X509_GUID EFI_GUID(0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72)
|
||||
+
|
||||
typedef struct {
|
||||
efi_guid_t guid;
|
||||
u64 table;
|
||||
@@ -879,6 +885,20 @@ typedef struct {
|
||||
efi_memory_desc_t entry[0];
|
||||
} efi_memory_attributes_table_t;
|
||||
|
||||
+typedef struct {
|
||||
+ efi_guid_t signature_owner;
|
||||
+ u8 signature_data[];
|
||||
+} efi_signature_data_t;
|
||||
+
|
||||
+typedef struct {
|
||||
+ efi_guid_t signature_type;
|
||||
+ u32 signature_list_size;
|
||||
+ u32 signature_header_size;
|
||||
+ u32 signature_size;
|
||||
+ u8 signature_header[];
|
||||
+ /* efi_signature_data_t signatures[][] */
|
||||
+} efi_signature_list_t;
|
||||
+
|
||||
/*
|
||||
* All runtime access to EFI goes through this structure:
|
||||
*/
|
||||
--
|
||||
2.5.5
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
From e36a2d65e25fdf42b50aa5dc17583d7bfd09c4c4 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Howells <dhowells@redhat.com>
|
||||
Date: Tue, 23 Oct 2012 09:36:28 -0400
|
||||
Subject: [PATCH 5/9] Add an EFI signature blob parser and key loader.
|
||||
|
||||
X.509 certificates are loaded into the specified keyring as asymmetric type
|
||||
keys.
|
||||
|
||||
[labbott@fedoraproject.org: Drop KEY_ALLOC_TRUSTED]
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
---
|
||||
crypto/asymmetric_keys/Kconfig | 8 +++
|
||||
crypto/asymmetric_keys/Makefile | 1 +
|
||||
crypto/asymmetric_keys/efi_parser.c | 108 ++++++++++++++++++++++++++++++++++++
|
||||
include/linux/efi.h | 4 ++
|
||||
4 files changed, 121 insertions(+)
|
||||
create mode 100644 crypto/asymmetric_keys/efi_parser.c
|
||||
|
||||
diff --git a/crypto/asymmetric_keys/Kconfig b/crypto/asymmetric_keys/Kconfig
|
||||
index e28e912000a7..94024e8aedaa 100644
|
||||
--- a/crypto/asymmetric_keys/Kconfig
|
||||
+++ b/crypto/asymmetric_keys/Kconfig
|
||||
@@ -60,4 +60,12 @@ config SIGNED_PE_FILE_VERIFICATION
|
||||
This option provides support for verifying the signature(s) on a
|
||||
signed PE binary.
|
||||
|
||||
+config EFI_SIGNATURE_LIST_PARSER
|
||||
+ bool "EFI signature list parser"
|
||||
+ depends on EFI
|
||||
+ select X509_CERTIFICATE_PARSER
|
||||
+ help
|
||||
+ This option provides support for parsing EFI signature lists for
|
||||
+ X.509 certificates and turning them into keys.
|
||||
+
|
||||
endif # ASYMMETRIC_KEY_TYPE
|
||||
diff --git a/crypto/asymmetric_keys/Makefile b/crypto/asymmetric_keys/Makefile
|
||||
index 6516855bec18..c099fe15ed6d 100644
|
||||
--- a/crypto/asymmetric_keys/Makefile
|
||||
+++ b/crypto/asymmetric_keys/Makefile
|
||||
@@ -10,6 +10,7 @@ asymmetric_keys-y := \
|
||||
signature.o
|
||||
|
||||
obj-$(CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += public_key.o
|
||||
+obj-$(CONFIG_EFI_SIGNATURE_LIST_PARSER) += efi_parser.o
|
||||
|
||||
#
|
||||
# X.509 Certificate handling
|
||||
diff --git a/crypto/asymmetric_keys/efi_parser.c b/crypto/asymmetric_keys/efi_parser.c
|
||||
new file mode 100644
|
||||
index 000000000000..636feb18b733
|
||||
--- /dev/null
|
||||
+++ b/crypto/asymmetric_keys/efi_parser.c
|
||||
@@ -0,0 +1,108 @@
|
||||
+/* EFI signature/key/certificate list parser
|
||||
+ *
|
||||
+ * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
|
||||
+ * Written by David Howells (dhowells@redhat.com)
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public Licence
|
||||
+ * as published by the Free Software Foundation; either version
|
||||
+ * 2 of the Licence, or (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+#define pr_fmt(fmt) "EFI: "fmt
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/printk.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/efi.h>
|
||||
+#include <keys/asymmetric-type.h>
|
||||
+
|
||||
+static __initdata efi_guid_t efi_cert_x509_guid = EFI_CERT_X509_GUID;
|
||||
+
|
||||
+/**
|
||||
+ * parse_efi_signature_list - Parse an EFI signature list for certificates
|
||||
+ * @data: The data blob to parse
|
||||
+ * @size: The size of the data blob
|
||||
+ * @keyring: The keyring to add extracted keys to
|
||||
+ */
|
||||
+int __init parse_efi_signature_list(const void *data, size_t size, struct key *keyring)
|
||||
+{
|
||||
+ unsigned offs = 0;
|
||||
+ size_t lsize, esize, hsize, elsize;
|
||||
+
|
||||
+ pr_devel("-->%s(,%zu)\n", __func__, size);
|
||||
+
|
||||
+ while (size > 0) {
|
||||
+ efi_signature_list_t list;
|
||||
+ const efi_signature_data_t *elem;
|
||||
+ key_ref_t key;
|
||||
+
|
||||
+ if (size < sizeof(list))
|
||||
+ return -EBADMSG;
|
||||
+
|
||||
+ memcpy(&list, data, sizeof(list));
|
||||
+ pr_devel("LIST[%04x] guid=%pUl ls=%x hs=%x ss=%x\n",
|
||||
+ offs,
|
||||
+ list.signature_type.b, list.signature_list_size,
|
||||
+ list.signature_header_size, list.signature_size);
|
||||
+
|
||||
+ lsize = list.signature_list_size;
|
||||
+ hsize = list.signature_header_size;
|
||||
+ esize = list.signature_size;
|
||||
+ elsize = lsize - sizeof(list) - hsize;
|
||||
+
|
||||
+ if (lsize > size) {
|
||||
+ pr_devel("<--%s() = -EBADMSG [overrun @%x]\n",
|
||||
+ __func__, offs);
|
||||
+ return -EBADMSG;
|
||||
+ }
|
||||
+ if (lsize < sizeof(list) ||
|
||||
+ lsize - sizeof(list) < hsize ||
|
||||
+ esize < sizeof(*elem) ||
|
||||
+ elsize < esize ||
|
||||
+ elsize % esize != 0) {
|
||||
+ pr_devel("- bad size combo @%x\n", offs);
|
||||
+ return -EBADMSG;
|
||||
+ }
|
||||
+
|
||||
+ if (efi_guidcmp(list.signature_type, efi_cert_x509_guid) != 0) {
|
||||
+ data += lsize;
|
||||
+ size -= lsize;
|
||||
+ offs += lsize;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ data += sizeof(list) + hsize;
|
||||
+ size -= sizeof(list) + hsize;
|
||||
+ offs += sizeof(list) + hsize;
|
||||
+
|
||||
+ for (; elsize > 0; elsize -= esize) {
|
||||
+ elem = data;
|
||||
+
|
||||
+ pr_devel("ELEM[%04x]\n", offs);
|
||||
+
|
||||
+ key = key_create_or_update(
|
||||
+ make_key_ref(keyring, 1),
|
||||
+ "asymmetric",
|
||||
+ NULL,
|
||||
+ &elem->signature_data,
|
||||
+ esize - sizeof(*elem),
|
||||
+ (KEY_POS_ALL & ~KEY_POS_SETATTR) |
|
||||
+ KEY_USR_VIEW,
|
||||
+ KEY_ALLOC_NOT_IN_QUOTA);
|
||||
+
|
||||
+ if (IS_ERR(key))
|
||||
+ pr_err("Problem loading in-kernel X.509 certificate (%ld)\n",
|
||||
+ PTR_ERR(key));
|
||||
+ else
|
||||
+ pr_notice("Loaded cert '%s' linked to '%s'\n",
|
||||
+ key_ref_to_ptr(key)->description,
|
||||
+ keyring->description);
|
||||
+
|
||||
+ data += esize;
|
||||
+ size -= esize;
|
||||
+ offs += esize;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
||||
index 8c274b4ea8e6..ff1877145aa4 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -1044,6 +1044,10 @@ extern int efi_memattr_apply_permissions(struct mm_struct *mm,
|
||||
char * __init efi_md_typeattr_format(char *buf, size_t size,
|
||||
const efi_memory_desc_t *md);
|
||||
|
||||
+struct key;
|
||||
+extern int __init parse_efi_signature_list(const void *data, size_t size,
|
||||
+ struct key *keyring);
|
||||
+
|
||||
/**
|
||||
* efi_range_is_wc - check the WC bit on an address range
|
||||
* @start: starting kvirt address
|
||||
--
|
||||
2.5.5
|
||||
|
|
@ -0,0 +1,217 @@
|
|||
From 0000dc9edd5997cc49b8893a9d5407f89dfa1307 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Aug 2013 18:36:30 -0400
|
||||
Subject: [PATCH] Add option to automatically enforce module signatures when in
|
||||
Secure Boot mode
|
||||
|
||||
UEFI Secure Boot provides a mechanism for ensuring that the firmware will
|
||||
only load signed bootloaders and kernels. Certain use cases may also
|
||||
require that all kernel modules also be signed. Add a configuration option
|
||||
that enforces this automatically when enabled.
|
||||
|
||||
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
---
|
||||
Documentation/x86/zero-page.txt | 2 ++
|
||||
arch/x86/Kconfig | 11 ++++++
|
||||
arch/x86/boot/compressed/eboot.c | 66 +++++++++++++++++++++++++++++++++++
|
||||
arch/x86/include/uapi/asm/bootparam.h | 3 +-
|
||||
arch/x86/kernel/setup.c | 6 ++++
|
||||
include/linux/module.h | 6 ++++
|
||||
kernel/module.c | 7 ++++
|
||||
7 files changed, 100 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Documentation/x86/zero-page.txt b/Documentation/x86/zero-page.txt
|
||||
index 95a4d34af3fd..b8527c6b7646 100644
|
||||
--- a/Documentation/x86/zero-page.txt
|
||||
+++ b/Documentation/x86/zero-page.txt
|
||||
@@ -31,6 +31,8 @@ Offset Proto Name Meaning
|
||||
1E9/001 ALL eddbuf_entries Number of entries in eddbuf (below)
|
||||
1EA/001 ALL edd_mbr_sig_buf_entries Number of entries in edd_mbr_sig_buffer
|
||||
(below)
|
||||
+1EB/001 ALL kbd_status Numlock is enabled
|
||||
+1EC/001 ALL secure_boot Secure boot is enabled in the firmware
|
||||
1EF/001 ALL sentinel Used to detect broken bootloaders
|
||||
290/040 ALL edd_mbr_sig_buffer EDD MBR signatures
|
||||
2D0/A00 ALL e820_map E820 memory map table
|
||||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
|
||||
index 0a7b885964ba..29b8ba9ae713 100644
|
||||
--- a/arch/x86/Kconfig
|
||||
+++ b/arch/x86/Kconfig
|
||||
@@ -1776,6 +1776,17 @@ config EFI_MIXED
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
+config EFI_SECURE_BOOT_SIG_ENFORCE
|
||||
+ def_bool n
|
||||
+ depends on EFI
|
||||
+ prompt "Force module signing when UEFI Secure Boot is enabled"
|
||||
+ ---help---
|
||||
+ UEFI Secure Boot provides a mechanism for ensuring that the
|
||||
+ firmware will only load signed bootloaders and kernels. Certain
|
||||
+ use cases may also require that all kernel modules also be signed.
|
||||
+ Say Y here to automatically enable module signature enforcement
|
||||
+ when a system boots with UEFI Secure Boot enabled.
|
||||
+
|
||||
config SECCOMP
|
||||
def_bool y
|
||||
prompt "Enable seccomp to safely compute untrusted bytecode"
|
||||
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
|
||||
index 52fef606bc54..6b8b9a775b46 100644
|
||||
--- a/arch/x86/boot/compressed/eboot.c
|
||||
+++ b/arch/x86/boot/compressed/eboot.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <asm/efi.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/desc.h>
|
||||
+#include <asm/bootparam_utils.h>
|
||||
|
||||
#include "../string.h"
|
||||
#include "eboot.h"
|
||||
@@ -571,6 +572,67 @@ free_handle:
|
||||
efi_call_early(free_pool, pci_handle);
|
||||
}
|
||||
|
||||
+static int get_secure_boot(void)
|
||||
+{
|
||||
+ u8 sb, setup;
|
||||
+ unsigned long datasize = sizeof(sb);
|
||||
+ efi_guid_t var_guid = EFI_GLOBAL_VARIABLE_GUID;
|
||||
+ efi_status_t status;
|
||||
+
|
||||
+ status = efi_early->call((unsigned long)sys_table->runtime->get_variable,
|
||||
+ L"SecureBoot", &var_guid, NULL, &datasize, &sb);
|
||||
+
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (sb == 0)
|
||||
+ return 0;
|
||||
+
|
||||
+
|
||||
+ status = efi_early->call((unsigned long)sys_table->runtime->get_variable,
|
||||
+ L"SetupMode", &var_guid, NULL, &datasize,
|
||||
+ &setup);
|
||||
+
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (setup == 1)
|
||||
+ return 0;
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/*
|
||||
+ * See if we have Graphics Output Protocol
|
||||
+ */
|
||||
+static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,
|
||||
+ unsigned long size)
|
||||
+{
|
||||
+ efi_status_t status;
|
||||
+ void **gop_handle = NULL;
|
||||
+
|
||||
+ status = efi_call_early(allocate_pool, EFI_LOADER_DATA,
|
||||
+ size, (void **)&gop_handle);
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ return status;
|
||||
+
|
||||
+ status = efi_call_early(locate_handle,
|
||||
+ EFI_LOCATE_BY_PROTOCOL,
|
||||
+ proto, NULL, &size, gop_handle);
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ goto free_handle;
|
||||
+
|
||||
+ if (efi_early->is64)
|
||||
+ status = setup_gop64(si, proto, size, gop_handle);
|
||||
+ else
|
||||
+ status = setup_gop32(si, proto, size, gop_handle);
|
||||
+
|
||||
+free_handle:
|
||||
+ efi_call_early(free_pool, gop_handle);
|
||||
+ return status;
|
||||
+}
|
||||
+
|
||||
static efi_status_t
|
||||
setup_uga32(void **uga_handle, unsigned long size, u32 *width, u32 *height)
|
||||
{
|
||||
@@ -1126,6 +1188,10 @@ struct boot_params *efi_main(struct efi_config *c,
|
||||
else
|
||||
setup_boot_services32(efi_early);
|
||||
|
||||
+ sanitize_boot_params(boot_params);
|
||||
+
|
||||
+ boot_params->secure_boot = get_secure_boot();
|
||||
+
|
||||
setup_graphics(boot_params);
|
||||
|
||||
setup_efi_pci(boot_params);
|
||||
diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
|
||||
index c18ce67495fa..2b3e5427097b 100644
|
||||
--- a/arch/x86/include/uapi/asm/bootparam.h
|
||||
+++ b/arch/x86/include/uapi/asm/bootparam.h
|
||||
@@ -134,7 +134,8 @@ struct boot_params {
|
||||
__u8 eddbuf_entries; /* 0x1e9 */
|
||||
__u8 edd_mbr_sig_buf_entries; /* 0x1ea */
|
||||
__u8 kbd_status; /* 0x1eb */
|
||||
- __u8 _pad5[3]; /* 0x1ec */
|
||||
+ __u8 secure_boot; /* 0x1ec */
|
||||
+ __u8 _pad5[2]; /* 0x1ed */
|
||||
/*
|
||||
* The sentinel is set to a nonzero value (0xff) in header.S.
|
||||
*
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index c4e7b3991b60..bdb9881c7afd 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -1152,6 +1152,12 @@ void __init setup_arch(char **cmdline_p)
|
||||
|
||||
io_delay_init();
|
||||
|
||||
+#ifdef CONFIG_EFI_SECURE_BOOT_SIG_ENFORCE
|
||||
+ if (boot_params.secure_boot) {
|
||||
+ enforce_signed_modules();
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Parse the ACPI tables for possible boot-time SMP configuration.
|
||||
*/
|
||||
diff --git a/include/linux/module.h b/include/linux/module.h
|
||||
index 082298a09df1..38d0597f7615 100644
|
||||
--- a/include/linux/module.h
|
||||
+++ b/include/linux/module.h
|
||||
@@ -273,6 +273,12 @@ const struct exception_table_entry *search_exception_tables(unsigned long add);
|
||||
|
||||
struct notifier_block;
|
||||
|
||||
+#ifdef CONFIG_MODULE_SIG
|
||||
+extern void enforce_signed_modules(void);
|
||||
+#else
|
||||
+static inline void enforce_signed_modules(void) {};
|
||||
+#endif
|
||||
+
|
||||
#ifdef CONFIG_MODULES
|
||||
|
||||
extern int modules_disabled; /* for sysctl */
|
||||
diff --git a/kernel/module.c b/kernel/module.c
|
||||
index 3c384968f553..ea484f3a35b2 100644
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -4200,6 +4200,13 @@ void module_layout(struct module *mod,
|
||||
EXPORT_SYMBOL(module_layout);
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_MODULE_SIG
|
||||
+void enforce_signed_modules(void)
|
||||
+{
|
||||
+ sig_enforce = true;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
bool secure_modules(void)
|
||||
{
|
||||
#ifdef CONFIG_MODULE_SIG
|
||||
--
|
||||
2.5.5
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
From 3213f1513a744fb21b6b9e4d4f2650a204855b3e Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Aug 2013 17:58:15 -0400
|
||||
Subject: [PATCH] Add secure_modules() call
|
||||
|
||||
Provide a single call to allow kernel code to determine whether the system
|
||||
has been configured to either disable module loading entirely or to load
|
||||
only modules signed with a trusted key.
|
||||
|
||||
Bugzilla: N/A
|
||||
Upstream-status: Fedora mustard. Replaced by securelevels, but that was nak'd
|
||||
|
||||
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
---
|
||||
include/linux/module.h | 6 ++++++
|
||||
kernel/module.c | 10 ++++++++++
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/include/linux/module.h b/include/linux/module.h
|
||||
index 0c3207d..05bd6c9 100644
|
||||
--- a/include/linux/module.h
|
||||
+++ b/include/linux/module.h
|
||||
@@ -641,6 +641,8 @@ static inline bool is_livepatch_module(struct module *mod)
|
||||
}
|
||||
#endif /* CONFIG_LIVEPATCH */
|
||||
|
||||
+extern bool secure_modules(void);
|
||||
+
|
||||
#else /* !CONFIG_MODULES... */
|
||||
|
||||
static inline struct module *__module_address(unsigned long addr)
|
||||
@@ -750,6 +752,10 @@ static inline bool module_requested_async_probing(struct module *module)
|
||||
return false;
|
||||
}
|
||||
|
||||
+static inline bool secure_modules(void)
|
||||
+{
|
||||
+ return false;
|
||||
+}
|
||||
#endif /* CONFIG_MODULES */
|
||||
|
||||
#ifdef CONFIG_SYSFS
|
||||
diff --git a/kernel/module.c b/kernel/module.c
|
||||
index 529efae..0332fdd 100644
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -4279,3 +4279,13 @@ void module_layout(struct module *mod,
|
||||
}
|
||||
EXPORT_SYMBOL(module_layout);
|
||||
#endif
|
||||
+
|
||||
+bool secure_modules(void)
|
||||
+{
|
||||
+#ifdef CONFIG_MODULE_SIG
|
||||
+ return (sig_enforce || modules_disabled);
|
||||
+#else
|
||||
+ return modules_disabled;
|
||||
+#endif
|
||||
+}
|
||||
+EXPORT_SYMBOL(secure_modules);
|
||||
--
|
||||
2.9.2
|
||||
|
|
@ -0,0 +1,246 @@
|
|||
From e27a9a98dcf3ff95568593026da065a72ad21b92 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@redhat.com>
|
||||
Date: Fri, 30 Aug 2013 09:28:51 -0400
|
||||
Subject: [PATCH 9/9] Add sysrq option to disable secure boot mode
|
||||
|
||||
Bugzilla: N/A
|
||||
Upstream-status: Fedora mustard
|
||||
---
|
||||
arch/x86/kernel/setup.c | 36 ++++++++++++++++++++++++++++++++++++
|
||||
drivers/input/misc/uinput.c | 1 +
|
||||
drivers/tty/sysrq.c | 19 +++++++++++++------
|
||||
include/linux/input.h | 5 +++++
|
||||
include/linux/sysrq.h | 8 +++++++-
|
||||
kernel/debug/kdb/kdb_main.c | 2 +-
|
||||
kernel/module.c | 2 +-
|
||||
7 files changed, 64 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index a666b6c29c77..7732c769937b 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -70,6 +70,11 @@
|
||||
#include <linux/tboot.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
+#include <linux/fips.h>
|
||||
+#include <linux/cred.h>
|
||||
+#include <linux/sysrq.h>
|
||||
+#include <linux/init_task.h>
|
||||
+
|
||||
#include <video/edid.h>
|
||||
|
||||
#include <asm/mtrr.h>
|
||||
@@ -1286,6 +1291,37 @@ void __init i386_reserve_resources(void)
|
||||
|
||||
#endif /* CONFIG_X86_32 */
|
||||
|
||||
+#ifdef CONFIG_MAGIC_SYSRQ
|
||||
+#ifdef CONFIG_MODULE_SIG
|
||||
+extern bool sig_enforce;
|
||||
+#endif
|
||||
+
|
||||
+static void sysrq_handle_secure_boot(int key)
|
||||
+{
|
||||
+ if (!efi_enabled(EFI_SECURE_BOOT))
|
||||
+ return;
|
||||
+
|
||||
+ pr_info("Secure boot disabled\n");
|
||||
+#ifdef CONFIG_MODULE_SIG
|
||||
+ sig_enforce = fips_enabled;
|
||||
+#endif
|
||||
+}
|
||||
+static struct sysrq_key_op secure_boot_sysrq_op = {
|
||||
+ .handler = sysrq_handle_secure_boot,
|
||||
+ .help_msg = "unSB(x)",
|
||||
+ .action_msg = "Disabling Secure Boot restrictions",
|
||||
+ .enable_mask = SYSRQ_DISABLE_USERSPACE,
|
||||
+};
|
||||
+static int __init secure_boot_sysrq(void)
|
||||
+{
|
||||
+ if (efi_enabled(EFI_SECURE_BOOT))
|
||||
+ register_sysrq_key('x', &secure_boot_sysrq_op);
|
||||
+ return 0;
|
||||
+}
|
||||
+late_initcall(secure_boot_sysrq);
|
||||
+#endif /*CONFIG_MAGIC_SYSRQ*/
|
||||
+
|
||||
+
|
||||
static struct notifier_block kernel_offset_notifier = {
|
||||
.notifier_call = dump_kernel_offset
|
||||
};
|
||||
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
|
||||
index abe1a927b332..f4126fcec10c 100644
|
||||
--- a/drivers/input/misc/uinput.c
|
||||
+++ b/drivers/input/misc/uinput.c
|
||||
@@ -379,6 +379,7 @@ static int uinput_allocate_device(struct uinput_device *udev)
|
||||
if (!udev->dev)
|
||||
return -ENOMEM;
|
||||
|
||||
+ udev->dev->flags |= INPUTDEV_FLAGS_SYNTHETIC;
|
||||
udev->dev->event = uinput_dev_event;
|
||||
input_set_drvdata(udev->dev, udev);
|
||||
|
||||
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
|
||||
index e5139402e7f8..5ef2e04a03ad 100644
|
||||
--- a/drivers/tty/sysrq.c
|
||||
+++ b/drivers/tty/sysrq.c
|
||||
@@ -478,6 +478,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
|
||||
/* x: May be registered on mips for TLB dump */
|
||||
/* x: May be registered on ppc/powerpc for xmon */
|
||||
/* x: May be registered on sparc64 for global PMU dump */
|
||||
+ /* x: May be registered on x86_64 for disabling secure boot */
|
||||
NULL, /* x */
|
||||
/* y: May be registered on sparc64 for global register dump */
|
||||
NULL, /* y */
|
||||
@@ -521,7 +522,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p)
|
||||
sysrq_key_table[i] = op_p;
|
||||
}
|
||||
|
||||
-void __handle_sysrq(int key, bool check_mask)
|
||||
+void __handle_sysrq(int key, int from)
|
||||
{
|
||||
struct sysrq_key_op *op_p;
|
||||
int orig_log_level;
|
||||
@@ -541,11 +542,15 @@ void __handle_sysrq(int key, bool check_mask)
|
||||
|
||||
op_p = __sysrq_get_key_op(key);
|
||||
if (op_p) {
|
||||
+ /* Ban synthetic events from some sysrq functionality */
|
||||
+ if ((from == SYSRQ_FROM_PROC || from == SYSRQ_FROM_SYNTHETIC) &&
|
||||
+ op_p->enable_mask & SYSRQ_DISABLE_USERSPACE)
|
||||
+ printk("This sysrq operation is disabled from userspace.\n");
|
||||
/*
|
||||
* Should we check for enabled operations (/proc/sysrq-trigger
|
||||
* should not) and is the invoked operation enabled?
|
||||
*/
|
||||
- if (!check_mask || sysrq_on_mask(op_p->enable_mask)) {
|
||||
+ if (from == SYSRQ_FROM_KERNEL || sysrq_on_mask(op_p->enable_mask)) {
|
||||
pr_cont("%s\n", op_p->action_msg);
|
||||
console_loglevel = orig_log_level;
|
||||
op_p->handler(key);
|
||||
@@ -577,7 +582,7 @@ void __handle_sysrq(int key, bool check_mask)
|
||||
void handle_sysrq(int key)
|
||||
{
|
||||
if (sysrq_on())
|
||||
- __handle_sysrq(key, true);
|
||||
+ __handle_sysrq(key, SYSRQ_FROM_KERNEL);
|
||||
}
|
||||
EXPORT_SYMBOL(handle_sysrq);
|
||||
|
||||
@@ -658,7 +663,7 @@ static void sysrq_do_reset(unsigned long _state)
|
||||
static void sysrq_handle_reset_request(struct sysrq_state *state)
|
||||
{
|
||||
if (state->reset_requested)
|
||||
- __handle_sysrq(sysrq_xlate[KEY_B], false);
|
||||
+ __handle_sysrq(sysrq_xlate[KEY_B], SYSRQ_FROM_KERNEL);
|
||||
|
||||
if (sysrq_reset_downtime_ms)
|
||||
mod_timer(&state->keyreset_timer,
|
||||
@@ -809,8 +814,10 @@ static bool sysrq_handle_keypress(struct sysrq_state *sysrq,
|
||||
|
||||
default:
|
||||
if (sysrq->active && value && value != 2) {
|
||||
+ int from = sysrq->handle.dev->flags & INPUTDEV_FLAGS_SYNTHETIC ?
|
||||
+ SYSRQ_FROM_SYNTHETIC : 0;
|
||||
sysrq->need_reinject = false;
|
||||
- __handle_sysrq(sysrq_xlate[code], true);
|
||||
+ __handle_sysrq(sysrq_xlate[code], from);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1094,7 +1101,7 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
|
||||
|
||||
if (get_user(c, buf))
|
||||
return -EFAULT;
|
||||
- __handle_sysrq(c, false);
|
||||
+ __handle_sysrq(c, SYSRQ_FROM_PROC);
|
||||
}
|
||||
|
||||
return count;
|
||||
diff --git a/include/linux/input.h b/include/linux/input.h
|
||||
index 1e967694e9a5..2b56c6f9673c 100644
|
||||
--- a/include/linux/input.h
|
||||
+++ b/include/linux/input.h
|
||||
@@ -42,6 +42,7 @@ struct input_value {
|
||||
* @phys: physical path to the device in the system hierarchy
|
||||
* @uniq: unique identification code for the device (if device has it)
|
||||
* @id: id of the device (struct input_id)
|
||||
+ * @flags: input device flags (SYNTHETIC, etc.)
|
||||
* @propbit: bitmap of device properties and quirks
|
||||
* @evbit: bitmap of types of events supported by the device (EV_KEY,
|
||||
* EV_REL, etc.)
|
||||
@@ -124,6 +125,8 @@ struct input_dev {
|
||||
const char *uniq;
|
||||
struct input_id id;
|
||||
|
||||
+ unsigned int flags;
|
||||
+
|
||||
unsigned long propbit[BITS_TO_LONGS(INPUT_PROP_CNT)];
|
||||
|
||||
unsigned long evbit[BITS_TO_LONGS(EV_CNT)];
|
||||
@@ -190,6 +193,8 @@ struct input_dev {
|
||||
};
|
||||
#define to_input_dev(d) container_of(d, struct input_dev, dev)
|
||||
|
||||
+#define INPUTDEV_FLAGS_SYNTHETIC 0x000000001
|
||||
+
|
||||
/*
|
||||
* Verify that we are in sync with input_device_id mod_devicetable.h #defines
|
||||
*/
|
||||
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h
|
||||
index 387fa7d05c98..4b07e30b3279 100644
|
||||
--- a/include/linux/sysrq.h
|
||||
+++ b/include/linux/sysrq.h
|
||||
@@ -28,6 +28,8 @@
|
||||
#define SYSRQ_ENABLE_BOOT 0x0080
|
||||
#define SYSRQ_ENABLE_RTNICE 0x0100
|
||||
|
||||
+#define SYSRQ_DISABLE_USERSPACE 0x00010000
|
||||
+
|
||||
struct sysrq_key_op {
|
||||
void (*handler)(int);
|
||||
char *help_msg;
|
||||
@@ -42,8 +44,12 @@ struct sysrq_key_op {
|
||||
* are available -- else NULL's).
|
||||
*/
|
||||
|
||||
+#define SYSRQ_FROM_KERNEL 0x0001
|
||||
+#define SYSRQ_FROM_PROC 0x0002
|
||||
+#define SYSRQ_FROM_SYNTHETIC 0x0004
|
||||
+
|
||||
void handle_sysrq(int key);
|
||||
-void __handle_sysrq(int key, bool check_mask);
|
||||
+void __handle_sysrq(int key, int from);
|
||||
int register_sysrq_key(int key, struct sysrq_key_op *op);
|
||||
int unregister_sysrq_key(int key, struct sysrq_key_op *op);
|
||||
struct sysrq_key_op *__sysrq_get_key_op(int key);
|
||||
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
|
||||
index 2a20c0dfdafc..3d17205dab77 100644
|
||||
--- a/kernel/debug/kdb/kdb_main.c
|
||||
+++ b/kernel/debug/kdb/kdb_main.c
|
||||
@@ -1968,7 +1968,7 @@ static int kdb_sr(int argc, const char **argv)
|
||||
return KDB_ARGCOUNT;
|
||||
|
||||
kdb_trap_printk++;
|
||||
- __handle_sysrq(*argv[1], check_mask);
|
||||
+ __handle_sysrq(*argv[1], check_mask & SYSRQ_FROM_KERNEL);
|
||||
kdb_trap_printk--;
|
||||
|
||||
return 0;
|
||||
diff --git a/kernel/module.c b/kernel/module.c
|
||||
index ea484f3a35b2..84b00659b0ee 100644
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -269,7 +269,7 @@ static void module_assert_mutex_or_preempt(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
-static bool sig_enforce = IS_ENABLED(CONFIG_MODULE_SIG_FORCE);
|
||||
+bool sig_enforce = IS_ENABLED(CONFIG_MODULE_SIG_FORCE);
|
||||
#ifndef CONFIG_MODULE_SIG_FORCE
|
||||
module_param(sig_enforce, bool_enable_only, 0644);
|
||||
#endif /* !CONFIG_MODULE_SIG_FORCE */
|
||||
--
|
||||
2.5.5
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,318 @@
|
|||
From 15b8caef5f380d9465876478ff5e365bc6afa5b6 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Sun, 6 Mar 2016 10:59:13 +0000
|
||||
Subject: [PATCH] Fix tegra to use stdout-path for serial console
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/tegra114-dalmore.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra124-jetson-tk1.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra124-nyan.dtsi | 4 ++++
|
||||
arch/arm/boot/dts/tegra124-venice2.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra20-harmony.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra20-iris-512.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra20-medcom-wide.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra20-paz00.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra20-seaboard.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra20-tamonten.dtsi | 4 ++++
|
||||
arch/arm/boot/dts/tegra20-trimslice.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra20-ventana.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra20-whistler.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra30-apalis-eval.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra30-beaver.dts | 4 ++++
|
||||
arch/arm/boot/dts/tegra30-cardhu.dtsi | 4 ++++
|
||||
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts | 4 ++++
|
||||
arch/arm64/boot/dts/nvidia/tegra132-norrin.dts | 5 ++++-
|
||||
arch/arm64/boot/dts/nvidia/tegra210-p2530.dtsi | 4 ++++
|
||||
19 files changed, 76 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
|
||||
index 8b7aa0d..b5748ee 100644
|
||||
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
|
||||
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
|
||||
@@ -18,6 +18,10 @@
|
||||
serial0 = &uartd;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x80000000 0x40000000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1.dts b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
|
||||
index 66b4451..abf046a 100644
|
||||
--- a/arch/arm/boot/dts/tegra124-jetson-tk1.dts
|
||||
+++ b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
|
||||
@@ -15,6 +15,10 @@
|
||||
serial0 = &uartd;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x0 0x80000000 0x0 0x80000000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi
|
||||
index ec1aa64..e2cd39e 100644
|
||||
--- a/arch/arm/boot/dts/tegra124-nyan.dtsi
|
||||
+++ b/arch/arm/boot/dts/tegra124-nyan.dtsi
|
||||
@@ -8,6 +8,10 @@
|
||||
serial0 = &uarta;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x0 0x80000000 0x0 0x80000000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
|
||||
index cfbdf42..604f4b7 100644
|
||||
--- a/arch/arm/boot/dts/tegra124-venice2.dts
|
||||
+++ b/arch/arm/boot/dts/tegra124-venice2.dts
|
||||
@@ -13,6 +13,10 @@
|
||||
serial0 = &uarta;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x0 0x80000000 0x0 0x80000000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra20-harmony.dts b/arch/arm/boot/dts/tegra20-harmony.dts
|
||||
index b926a07..4b73c76 100644
|
||||
--- a/arch/arm/boot/dts/tegra20-harmony.dts
|
||||
+++ b/arch/arm/boot/dts/tegra20-harmony.dts
|
||||
@@ -13,6 +13,10 @@
|
||||
serial0 = &uartd;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x00000000 0x40000000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra20-iris-512.dts b/arch/arm/boot/dts/tegra20-iris-512.dts
|
||||
index 1dd7d7b..bb56dfe 100644
|
||||
--- a/arch/arm/boot/dts/tegra20-iris-512.dts
|
||||
+++ b/arch/arm/boot/dts/tegra20-iris-512.dts
|
||||
@@ -11,6 +11,10 @@
|
||||
serial1 = &uartd;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
host1x@50000000 {
|
||||
hdmi@54280000 {
|
||||
status = "okay";
|
||||
diff --git a/arch/arm/boot/dts/tegra20-medcom-wide.dts b/arch/arm/boot/dts/tegra20-medcom-wide.dts
|
||||
index 9b87526..34c6588 100644
|
||||
--- a/arch/arm/boot/dts/tegra20-medcom-wide.dts
|
||||
+++ b/arch/arm/boot/dts/tegra20-medcom-wide.dts
|
||||
@@ -10,6 +10,10 @@
|
||||
serial0 = &uartd;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
pwm@7000a000 {
|
||||
status = "okay";
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
|
||||
index ed7e100..81a10a9 100644
|
||||
--- a/arch/arm/boot/dts/tegra20-paz00.dts
|
||||
+++ b/arch/arm/boot/dts/tegra20-paz00.dts
|
||||
@@ -14,6 +14,10 @@
|
||||
serial1 = &uartc;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x00000000 0x20000000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra20-seaboard.dts b/arch/arm/boot/dts/tegra20-seaboard.dts
|
||||
index aea8994..0aed748 100644
|
||||
--- a/arch/arm/boot/dts/tegra20-seaboard.dts
|
||||
+++ b/arch/arm/boot/dts/tegra20-seaboard.dts
|
||||
@@ -13,6 +13,10 @@
|
||||
serial0 = &uartd;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x00000000 0x40000000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra20-tamonten.dtsi b/arch/arm/boot/dts/tegra20-tamonten.dtsi
|
||||
index 13d4e61..025e9e8 100644
|
||||
--- a/arch/arm/boot/dts/tegra20-tamonten.dtsi
|
||||
+++ b/arch/arm/boot/dts/tegra20-tamonten.dtsi
|
||||
@@ -10,6 +10,10 @@
|
||||
serial0 = &uartd;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x00000000 0x20000000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra20-trimslice.dts b/arch/arm/boot/dts/tegra20-trimslice.dts
|
||||
index d99af4e..69d25ca 100644
|
||||
--- a/arch/arm/boot/dts/tegra20-trimslice.dts
|
||||
+++ b/arch/arm/boot/dts/tegra20-trimslice.dts
|
||||
@@ -13,6 +13,10 @@
|
||||
serial0 = &uarta;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x00000000 0x40000000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra20-ventana.dts b/arch/arm/boot/dts/tegra20-ventana.dts
|
||||
index 04c58e9..c61533a 100644
|
||||
--- a/arch/arm/boot/dts/tegra20-ventana.dts
|
||||
+++ b/arch/arm/boot/dts/tegra20-ventana.dts
|
||||
@@ -13,6 +13,10 @@
|
||||
serial0 = &uartd;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x00000000 0x40000000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra20-whistler.dts b/arch/arm/boot/dts/tegra20-whistler.dts
|
||||
index 340d811..bd76585 100644
|
||||
--- a/arch/arm/boot/dts/tegra20-whistler.dts
|
||||
+++ b/arch/arm/boot/dts/tegra20-whistler.dts
|
||||
@@ -13,6 +13,10 @@
|
||||
serial0 = &uarta;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x00000000 0x20000000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra30-apalis-eval.dts b/arch/arm/boot/dts/tegra30-apalis-eval.dts
|
||||
index f2879cf..b914bcb 100644
|
||||
--- a/arch/arm/boot/dts/tegra30-apalis-eval.dts
|
||||
+++ b/arch/arm/boot/dts/tegra30-apalis-eval.dts
|
||||
@@ -17,6 +17,10 @@
|
||||
serial3 = &uartd;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
pcie-controller@00003000 {
|
||||
status = "okay";
|
||||
|
||||
diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
|
||||
index 3dede39..1eca3b2 100644
|
||||
--- a/arch/arm/boot/dts/tegra30-beaver.dts
|
||||
+++ b/arch/arm/boot/dts/tegra30-beaver.dts
|
||||
@@ -12,6 +12,10 @@
|
||||
serial0 = &uarta;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x80000000 0x7ff00000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi
|
||||
index bb1ca15..de9d6cc 100644
|
||||
--- a/arch/arm/boot/dts/tegra30-cardhu.dtsi
|
||||
+++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi
|
||||
@@ -35,6 +35,10 @@
|
||||
serial1 = &uartc;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
reg = <0x80000000 0x40000000>;
|
||||
};
|
||||
diff --git a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
|
||||
index 3ff019f..93e1ffd 100644
|
||||
--- a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
|
||||
+++ b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
|
||||
@@ -15,6 +15,10 @@
|
||||
serial2 = &uartd;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
host1x@50000000 {
|
||||
dc@54200000 {
|
||||
rgb {
|
||||
diff --git a/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts b/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
|
||||
index 62f33fc..3c0b4d7 100644
|
||||
--- a/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
|
||||
+++ b/arch/arm64/boot/dts/nvidia/tegra132-norrin.dts
|
||||
@@ -10,9 +10,12 @@
|
||||
aliases {
|
||||
rtc0 = "/i2c@0,7000d000/as3722@40";
|
||||
rtc1 = "/rtc@0,7000e000";
|
||||
+ serial0 = &uarta;
|
||||
};
|
||||
|
||||
- chosen { };
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2530.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2530.dtsi
|
||||
index ece0dec..73ba582 100644
|
||||
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2530.dtsi
|
||||
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2530.dtsi
|
||||
@@ -9,6 +9,10 @@
|
||||
serial0 = &uarta;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x80000000 0x0 0xc0000000>;
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
From 98f07385212073536f303c07ece455acdd4d267f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9=20=D0=9A=D1=83?=
|
||||
=?UTF-8?q?=D0=B4=D1=80=D1=8F=D0=B2=D1=86=D0=B5=D0=B2?=
|
||||
<nkudriavtsev@gmail.com>
|
||||
Date: Tue, 21 Jul 2015 13:31:52 +0300
|
||||
Subject: [PATCH] HID: chicony: Add support for Acer Aspire Switch 12
|
||||
|
||||
Acer Aspire Switch 12 keyboard Chicony's controller reports too big usage
|
||||
index on the 1st interface. The patch fixes the report. The work based on
|
||||
solution from drivers/hid/hid-holtek-mouse.c
|
||||
|
||||
Bug report: https://bugzilla.kernel.org/show_bug.cgi?id=101721
|
||||
|
||||
Signed-off-by: Nicholas Kudriavtsev <nkudriavtsev@gmail.com>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
||||
---
|
||||
drivers/hid/hid-chicony.c | 26 ++++++++++++++++++++++++++
|
||||
drivers/hid/hid-core.c | 1 +
|
||||
drivers/hid/hid-ids.h | 1 +
|
||||
3 files changed, 28 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-chicony.c b/drivers/hid/hid-chicony.c
|
||||
index b613d5a79684..bc3cec199fee 100644
|
||||
--- a/drivers/hid/hid-chicony.c
|
||||
+++ b/drivers/hid/hid-chicony.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <linux/input.h>
|
||||
#include <linux/hid.h>
|
||||
#include <linux/module.h>
|
||||
+#include <linux/usb.h>
|
||||
|
||||
#include "hid-ids.h"
|
||||
|
||||
@@ -57,10 +58,34 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
|
||||
return 1;
|
||||
}
|
||||
|
||||
+static __u8 *ch_switch12_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
+ unsigned int *rsize)
|
||||
+{
|
||||
+ struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
|
||||
+
|
||||
+ if (intf->cur_altsetting->desc.bInterfaceNumber == 1) {
|
||||
+ /* Change usage maximum and logical maximum from 0x7fff to
|
||||
+ * 0x2fff, so they don't exceed HID_MAX_USAGES */
|
||||
+ switch (hdev->product) {
|
||||
+ case USB_DEVICE_ID_CHICONY_ACER_SWITCH12:
|
||||
+ if (*rsize >= 128 && rdesc[64] == 0xff && rdesc[65] == 0x7f
|
||||
+ && rdesc[69] == 0xff && rdesc[70] == 0x7f) {
|
||||
+ hid_info(hdev, "Fixing up report descriptor\n");
|
||||
+ rdesc[65] = rdesc[70] = 0x2f;
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ return rdesc;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static const struct hid_device_id ch_devices[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_AK1D) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_ACER_SWITCH12) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hid, ch_devices);
|
||||
@@ -68,6 +93,7 @@ MODULE_DEVICE_TABLE(hid, ch_devices);
|
||||
static struct hid_driver ch_driver = {
|
||||
.name = "chicony",
|
||||
.id_table = ch_devices,
|
||||
+ .report_fixup = ch_switch12_report_fixup,
|
||||
.input_mapping = ch_input_mapping,
|
||||
};
|
||||
module_hid_driver(ch_driver);
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index e6fce23b121a..f90ca6574221 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -1807,6 +1807,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_AK1D) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_ACER_SWITCH12) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_CP2112) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) },
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index b3b225b75d0a..79210ca8eff1 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -233,6 +233,7 @@
|
||||
#define USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE 0x1053
|
||||
#define USB_DEVICE_ID_CHICONY_WIRELESS2 0x1123
|
||||
#define USB_DEVICE_ID_CHICONY_AK1D 0x1125
|
||||
+#define USB_DEVICE_ID_CHICONY_ACER_SWITCH12 0x1421
|
||||
|
||||
#define USB_VENDOR_ID_CHUNGHWAT 0x2247
|
||||
#define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH 0x0001
|
||||
--
|
||||
2.4.3
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
From 0621809e37936e7c2b3eac9165cf2aad7f9189eb Mon Sep 17 00:00:00 2001
|
||||
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
|
||||
Date: Mon, 3 Aug 2015 14:57:30 +0900
|
||||
Subject: [PATCH] HID: hid-input: Fix accessing freed memory during device
|
||||
disconnect
|
||||
|
||||
During unbinding the driver was dereferencing a pointer to memory
|
||||
already freed by power_supply_unregister().
|
||||
|
||||
Driver was freeing its internal description of battery through pointers
|
||||
stored in power_supply structure. However, because the core owns the
|
||||
power supply instance, after calling power_supply_unregister() this
|
||||
memory is freed and the driver cannot access these members.
|
||||
|
||||
Fix this by storing the pointer to internal description of battery in a
|
||||
local variable before calling power_supply_unregister(), so the pointer
|
||||
remains valid.
|
||||
|
||||
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
|
||||
Reported-by: H.J. Lu <hjl.tools@gmail.com>
|
||||
Fixes: 297d716f6260 ("power_supply: Change ownership from driver to core")
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.com>
|
||||
---
|
||||
drivers/hid/hid-input.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
|
||||
index 3511bbab..e3c6364 100644
|
||||
--- a/drivers/hid/hid-input.c
|
||||
+++ b/drivers/hid/hid-input.c
|
||||
@@ -462,12 +462,15 @@ out:
|
||||
|
||||
static void hidinput_cleanup_battery(struct hid_device *dev)
|
||||
{
|
||||
+ const struct power_supply_desc *psy_desc;
|
||||
+
|
||||
if (!dev->battery)
|
||||
return;
|
||||
|
||||
+ psy_desc = dev->battery->desc;
|
||||
power_supply_unregister(dev->battery);
|
||||
- kfree(dev->battery->desc->name);
|
||||
- kfree(dev->battery->desc);
|
||||
+ kfree(psy_desc->name);
|
||||
+ kfree(psy_desc);
|
||||
dev->battery = NULL;
|
||||
}
|
||||
#else /* !CONFIG_HID_BATTERY_STRENGTH */
|
||||
--
|
||||
2.4.3
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
From b490a8537df60d449199e162417da74ee9262515 Mon Sep 17 00:00:00 2001
|
||||
From: Yuta Kobayashi <alu.ula@outlook.com>
|
||||
Date: Fri, 12 Aug 2016 07:49:17 +0000
|
||||
Subject: [PATCH] HID: microsoft: Add Surface 4 type cover pro 4 (JP)
|
||||
|
||||
Adding support for the Microsoft Surface 4 Type Cover Pro (JP).
|
||||
|
||||
Signed-off-by: Yuta Kobayashi <alu.ula@outlook.com>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
drivers/hid/hid-core.c | 2 ++
|
||||
drivers/hid/hid-ids.h | 1 +
|
||||
drivers/hid/hid-microsoft.c | 2 ++
|
||||
drivers/hid/usbhid/hid-quirks.c | 1 +
|
||||
4 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index ed10d4f..45400de 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -727,6 +727,7 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type)
|
||||
(hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 ||
|
||||
hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 ||
|
||||
hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP ||
|
||||
+ hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP ||
|
||||
hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 ||
|
||||
hid->product == USB_DEVICE_ID_MS_POWER_COVER) &&
|
||||
hid->group == HID_GROUP_MULTITOUCH)
|
||||
@@ -1982,6 +1983,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_7K) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) },
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index da1c58e..3466f0d 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -713,6 +713,7 @@
|
||||
#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 0x07dc
|
||||
#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 0x07e2
|
||||
#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd
|
||||
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP 0x07e9
|
||||
#define USB_DEVICE_ID_MS_TYPE_COVER_3 0x07de
|
||||
#define USB_DEVICE_ID_MS_POWER_COVER 0x07da
|
||||
|
||||
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
|
||||
index e924d55..56c586f 100644
|
||||
--- a/drivers/hid/hid-microsoft.c
|
||||
+++ b/drivers/hid/hid-microsoft.c
|
||||
@@ -288,6 +288,8 @@ static const struct hid_device_id ms_devices[] = {
|
||||
.driver_data = MS_HIDINPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP),
|
||||
.driver_data = MS_HIDINPUT },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP),
|
||||
+ .driver_data = MS_HIDINPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3),
|
||||
.driver_data = MS_HIDINPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER),
|
||||
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
|
||||
index b4b8c6a..1fccffd 100644
|
||||
--- a/drivers/hid/usbhid/hid-quirks.c
|
||||
+++ b/drivers/hid/usbhid/hid-quirks.c
|
||||
@@ -98,6 +98,7 @@ static const struct hid_blacklist {
|
||||
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP, HID_QUIRK_NO_INIT_REPORTS },
|
||||
+ { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL, HID_QUIRK_NO_INIT_REPORTS },
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
From 580549ef6b3e3fb3b958de490ca99f43a089a2cf Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Date: Fri, 25 Mar 2016 15:26:55 +0100
|
||||
Subject: [PATCH] HID: wacom: fix Bamboo ONE oops
|
||||
|
||||
Looks like recent changes in the Wacom driver made the Bamboo ONE crashes.
|
||||
The tablet behaves as if it was a regular Bamboo device with pen, touch
|
||||
and pad, but there is no physical pad connected to it.
|
||||
The weird part is that the pad is still sending events and given that
|
||||
there is no input node connected to it, we get anull pointer exception.
|
||||
|
||||
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1317116
|
||||
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Acked-by: Ping Cheng <pingc@wacom.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
drivers/hid/wacom_wac.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
|
||||
index bd198bbd4df0..02c4efea241c 100644
|
||||
--- a/drivers/hid/wacom_wac.c
|
||||
+++ b/drivers/hid/wacom_wac.c
|
||||
@@ -2426,6 +2426,17 @@ void wacom_setup_device_quirks(struct wacom *wacom)
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Hack for the Bamboo One:
|
||||
+ * the device presents a PAD/Touch interface as most Bamboos and even
|
||||
+ * sends ghosts PAD data on it. However, later, we must disable this
|
||||
+ * ghost interface, and we can not detect it unless we set it here
|
||||
+ * to WACOM_DEVICETYPE_PAD or WACOM_DEVICETYPE_TOUCH.
|
||||
+ */
|
||||
+ if (features->type == BAMBOO_PEN &&
|
||||
+ features->pktlen == WACOM_PKGLEN_BBTOUCH3)
|
||||
+ features->device_type |= WACOM_DEVICETYPE_PAD;
|
||||
+
|
||||
+ /*
|
||||
* Raw Wacom-mode pen and touch events both come from interface
|
||||
* 0, whose HID descriptor has an application usage of 0xFF0D
|
||||
* (i.e., WACOM_VENDORDEFINED_PEN). We route pen packets back
|
||||
--
|
||||
2.5.5
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,117 @@
|
|||
From b9a532277938798b53178d5a66af6e2915cb27cf Mon Sep 17 00:00:00 2001
|
||||
From: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Date: Wed, 30 Sep 2015 12:48:40 -0400
|
||||
Subject: [PATCH] Initialize msg/shm IPC objects before doing ipc_addid()
|
||||
|
||||
As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before
|
||||
having initialized the IPC object state. Yes, we initialize the IPC
|
||||
object in a locked state, but with all the lockless RCU lookup work,
|
||||
that IPC object lock no longer means that the state cannot be seen.
|
||||
|
||||
We already did this for the IPC semaphore code (see commit e8577d1f0329:
|
||||
"ipc/sem.c: fully initialize sem_array before making it visible") but we
|
||||
clearly forgot about msg and shm.
|
||||
|
||||
Reported-by: Dmitry Vyukov <dvyukov@google.com>
|
||||
Cc: Manfred Spraul <manfred@colorfullife.com>
|
||||
Cc: Davidlohr Bueso <dbueso@suse.de>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
---
|
||||
ipc/msg.c | 14 +++++++-------
|
||||
ipc/shm.c | 13 +++++++------
|
||||
ipc/util.c | 8 ++++----
|
||||
3 files changed, 18 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/ipc/msg.c b/ipc/msg.c
|
||||
index 66c4f567eb73..1471db9a7e61 100644
|
||||
--- a/ipc/msg.c
|
||||
+++ b/ipc/msg.c
|
||||
@@ -137,13 +137,6 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params)
|
||||
return retval;
|
||||
}
|
||||
|
||||
- /* ipc_addid() locks msq upon success. */
|
||||
- id = ipc_addid(&msg_ids(ns), &msq->q_perm, ns->msg_ctlmni);
|
||||
- if (id < 0) {
|
||||
- ipc_rcu_putref(msq, msg_rcu_free);
|
||||
- return id;
|
||||
- }
|
||||
-
|
||||
msq->q_stime = msq->q_rtime = 0;
|
||||
msq->q_ctime = get_seconds();
|
||||
msq->q_cbytes = msq->q_qnum = 0;
|
||||
@@ -153,6 +146,13 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params)
|
||||
INIT_LIST_HEAD(&msq->q_receivers);
|
||||
INIT_LIST_HEAD(&msq->q_senders);
|
||||
|
||||
+ /* ipc_addid() locks msq upon success. */
|
||||
+ id = ipc_addid(&msg_ids(ns), &msq->q_perm, ns->msg_ctlmni);
|
||||
+ if (id < 0) {
|
||||
+ ipc_rcu_putref(msq, msg_rcu_free);
|
||||
+ return id;
|
||||
+ }
|
||||
+
|
||||
ipc_unlock_object(&msq->q_perm);
|
||||
rcu_read_unlock();
|
||||
|
||||
diff --git a/ipc/shm.c b/ipc/shm.c
|
||||
index 222131e8e38f..41787276e141 100644
|
||||
--- a/ipc/shm.c
|
||||
+++ b/ipc/shm.c
|
||||
@@ -551,12 +551,6 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
|
||||
if (IS_ERR(file))
|
||||
goto no_file;
|
||||
|
||||
- id = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni);
|
||||
- if (id < 0) {
|
||||
- error = id;
|
||||
- goto no_id;
|
||||
- }
|
||||
-
|
||||
shp->shm_cprid = task_tgid_vnr(current);
|
||||
shp->shm_lprid = 0;
|
||||
shp->shm_atim = shp->shm_dtim = 0;
|
||||
@@ -565,6 +559,13 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
|
||||
shp->shm_nattch = 0;
|
||||
shp->shm_file = file;
|
||||
shp->shm_creator = current;
|
||||
+
|
||||
+ id = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni);
|
||||
+ if (id < 0) {
|
||||
+ error = id;
|
||||
+ goto no_id;
|
||||
+ }
|
||||
+
|
||||
list_add(&shp->shm_clist, ¤t->sysvshm.shm_clist);
|
||||
|
||||
/*
|
||||
diff --git a/ipc/util.c b/ipc/util.c
|
||||
index be4230020a1f..0f401d94b7c6 100644
|
||||
--- a/ipc/util.c
|
||||
+++ b/ipc/util.c
|
||||
@@ -237,6 +237,10 @@ int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size)
|
||||
rcu_read_lock();
|
||||
spin_lock(&new->lock);
|
||||
|
||||
+ current_euid_egid(&euid, &egid);
|
||||
+ new->cuid = new->uid = euid;
|
||||
+ new->gid = new->cgid = egid;
|
||||
+
|
||||
id = idr_alloc(&ids->ipcs_idr, new,
|
||||
(next_id < 0) ? 0 : ipcid_to_idx(next_id), 0,
|
||||
GFP_NOWAIT);
|
||||
@@ -249,10 +253,6 @@ int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size)
|
||||
|
||||
ids->in_use++;
|
||||
|
||||
- current_euid_egid(&euid, &egid);
|
||||
- new->cuid = new->uid = euid;
|
||||
- new->gid = new->cgid = egid;
|
||||
-
|
||||
if (next_id < 0) {
|
||||
new->seq = ids->seq++;
|
||||
if (ids->seq > IPCID_SEQ_MAX)
|
||||
--
|
||||
2.4.3
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Date: Thu, 16 Apr 2015 13:01:46 -0400
|
||||
Subject: [PATCH] Input - synaptics: pin 3 touches when the firmware reports 3
|
||||
fingers
|
||||
|
||||
Synaptics PS/2 touchpad can send only 2 touches in a report. They can
|
||||
detect 4 or 5 and this information is valuable.
|
||||
|
||||
In commit 63c4fda (Input: synaptics - allocate 3 slots to keep stability
|
||||
in image sensors), we allocate 3 slots, but we still continue to report
|
||||
the 2 available fingers. That means that the client sees 2 used slots while
|
||||
there is a total of 3 fingers advertised by BTN_TOOL_TRIPLETAP.
|
||||
|
||||
For old kernels this is not a problem because max_slots was 2 and libinput/
|
||||
xorg-synaptics knew how to deal with that. Now that max_slot is 3, the
|
||||
clients ignore BTN_TOOL_TRIPLETAP and count the actual used slots (so 2).
|
||||
It then gets confused when receiving the BTN_TOOL_TRIPLETAP and DOUBLETAP
|
||||
information, and goes wild.
|
||||
|
||||
We can pin the 3 slots until we get a total number of fingers below 2.
|
||||
|
||||
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1212230
|
||||
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
---
|
||||
drivers/input/mouse/synaptics.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
|
||||
index 3a32caf06bf1..58102970f94f 100644
|
||||
--- a/drivers/input/mouse/synaptics.c
|
||||
+++ b/drivers/input/mouse/synaptics.c
|
||||
@@ -940,6 +940,14 @@ static void synaptics_report_mt_data(struct psmouse *psmouse,
|
||||
input_report_abs(dev, ABS_MT_PRESSURE, hw[i]->z);
|
||||
}
|
||||
|
||||
+ /* keep (slot count <= num_fingers) by pinning all slots */
|
||||
+ if (num_fingers >= 3) {
|
||||
+ for (i = 0; i < 3; i++) {
|
||||
+ input_mt_slot(dev, i);
|
||||
+ input_mt_report_slot_state(dev, MT_TOOL_FINGER, true);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
input_mt_drop_unused(dev);
|
||||
|
||||
/* Don't use active slot count to generate BTN_TOOL events. */
|
|
@ -0,0 +1,102 @@
|
|||
From 096da19de900a115ee3610b666ecb7e55926623d Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Date: Fri, 26 Oct 2012 12:36:24 -0400
|
||||
Subject: [PATCH 6/9] KEYS: Add a system blacklist keyring
|
||||
|
||||
This adds an additional keyring that is used to store certificates that
|
||||
are blacklisted. This keyring is searched first when loading signed modules
|
||||
and if the module's certificate is found, it will refuse to load. This is
|
||||
useful in cases where third party certificates are used for module signing.
|
||||
|
||||
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
---
|
||||
certs/system_keyring.c | 22 ++++++++++++++++++++++
|
||||
include/keys/system_keyring.h | 4 ++++
|
||||
init/Kconfig | 9 +++++++++
|
||||
3 files changed, 35 insertions(+)
|
||||
|
||||
diff --git a/certs/system_keyring.c b/certs/system_keyring.c
|
||||
index 50979d6dcecd..787eeead2f57 100644
|
||||
--- a/certs/system_keyring.c
|
||||
+++ b/certs/system_keyring.c
|
||||
@@ -22,6 +22,9 @@ static struct key *builtin_trusted_keys;
|
||||
#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
|
||||
static struct key *secondary_trusted_keys;
|
||||
#endif
|
||||
+#ifdef CONFIG_SYSTEM_BLACKLIST_KEYRING
|
||||
+struct key *system_blacklist_keyring;
|
||||
+#endif
|
||||
|
||||
extern __initconst const u8 system_certificate_list[];
|
||||
extern __initconst const unsigned long system_certificate_list_size;
|
||||
@@ -99,6 +102,16 @@ static __init int system_trusted_keyring_init(void)
|
||||
if (key_link(secondary_trusted_keys, builtin_trusted_keys) < 0)
|
||||
panic("Can't link trusted keyrings\n");
|
||||
#endif
|
||||
+#ifdef CONFIG_SYSTEM_BLACKLIST_KEYRING
|
||||
+ system_blacklist_keyring = keyring_alloc(".system_blacklist_keyring",
|
||||
+ KUIDT_INIT(0), KGIDT_INIT(0), current_cred(),
|
||||
+ ((KEY_POS_ALL & ~KEY_POS_SETATTR) |
|
||||
+ KEY_USR_VIEW | KEY_USR_READ | KEY_USR_SEARCH),
|
||||
+ KEY_ALLOC_NOT_IN_QUOTA,
|
||||
+ NULL, NULL);
|
||||
+ if (IS_ERR(system_blacklist_keyring))
|
||||
+ panic("Can't allocate system blacklist keyring\n");
|
||||
+#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -214,6 +227,15 @@ int verify_pkcs7_signature(const void *data, size_t len,
|
||||
trusted_keys = builtin_trusted_keys;
|
||||
#endif
|
||||
}
|
||||
+#ifdef CONFIG_SYSTEM_BLACKLIST_KEYRING
|
||||
+ ret = pkcs7_validate_trust(pkcs7, system_blacklist_keyring);
|
||||
+ if (!ret) {
|
||||
+ /* module is signed with a cert in the blacklist. reject */
|
||||
+ pr_err("Module key is in the blacklist\n");
|
||||
+ ret = -EKEYREJECTED;
|
||||
+ goto error;
|
||||
+ }
|
||||
+#endif
|
||||
ret = pkcs7_validate_trust(pkcs7, trusted_keys);
|
||||
if (ret < 0) {
|
||||
if (ret == -ENOKEY)
|
||||
diff --git a/include/keys/system_keyring.h b/include/keys/system_keyring.h
|
||||
index fbd4647767e9..5bc291a3d261 100644
|
||||
--- a/include/keys/system_keyring.h
|
||||
+++ b/include/keys/system_keyring.h
|
||||
@@ -33,6 +33,10 @@ extern int restrict_link_by_builtin_and_secondary_trusted(
|
||||
#define restrict_link_by_builtin_and_secondary_trusted restrict_link_by_builtin_trusted
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_SYSTEM_BLACKLIST_KEYRING
|
||||
+extern struct key *system_blacklist_keyring;
|
||||
+#endif
|
||||
+
|
||||
#ifdef CONFIG_IMA_BLACKLIST_KEYRING
|
||||
extern struct key *ima_blacklist_keyring;
|
||||
|
||||
diff --git a/init/Kconfig b/init/Kconfig
|
||||
index a9c4aefd5436..e5449d5aeff9 100644
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1829,6 +1829,15 @@ config SYSTEM_DATA_VERIFICATION
|
||||
module verification, kexec image verification and firmware blob
|
||||
verification.
|
||||
|
||||
+config SYSTEM_BLACKLIST_KEYRING
|
||||
+ bool "Provide system-wide ring of blacklisted keys"
|
||||
+ depends on KEYS
|
||||
+ help
|
||||
+ Provide a system keyring to which blacklisted keys can be added.
|
||||
+ Keys in the keyring are considered entirely untrusted. Keys in this
|
||||
+ keyring are used by the module signature checking to reject loading
|
||||
+ of modules signed with a blacklisted key.
|
||||
+
|
||||
config PROFILING
|
||||
bool "Profiling support"
|
||||
help
|
||||
--
|
||||
2.5.5
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
From 23c8a812dc3c621009e4f0e5342aa4e2ede1ceaa Mon Sep 17 00:00:00 2001
|
||||
From: David Howells <dhowells@redhat.com>
|
||||
Date: Tue, 23 Feb 2016 11:03:12 +0000
|
||||
Subject: [PATCH] KEYS: Fix ASN.1 indefinite length object parsing
|
||||
|
||||
This fixes CVE-2016-0758.
|
||||
|
||||
In the ASN.1 decoder, when the length field of an ASN.1 value is extracted,
|
||||
it isn't validated against the remaining amount of data before being added
|
||||
to the cursor. With a sufficiently large size indicated, the check:
|
||||
|
||||
datalen - dp < 2
|
||||
|
||||
may then fail due to integer overflow.
|
||||
|
||||
Fix this by checking the length indicated against the amount of remaining
|
||||
data in both places a definite length is determined.
|
||||
|
||||
Whilst we're at it, make the following changes:
|
||||
|
||||
(1) Check the maximum size of extended length does not exceed the capacity
|
||||
of the variable it's being stored in (len) rather than the type that
|
||||
variable is assumed to be (size_t).
|
||||
|
||||
(2) Compare the EOC tag to the symbolic constant ASN1_EOC rather than the
|
||||
integer 0.
|
||||
|
||||
(3) To reduce confusion, move the initialisation of len outside of:
|
||||
|
||||
for (len = 0; n > 0; n--) {
|
||||
|
||||
since it doesn't have anything to do with the loop counter n.
|
||||
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
Reviewed-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
|
||||
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
|
||||
Acked-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
lib/asn1_decoder.c | 16 +++++++++-------
|
||||
1 file changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c
|
||||
index 2b3f46c049d4..554522934c44 100644
|
||||
--- a/lib/asn1_decoder.c
|
||||
+++ b/lib/asn1_decoder.c
|
||||
@@ -74,7 +74,7 @@ next_tag:
|
||||
|
||||
/* Extract a tag from the data */
|
||||
tag = data[dp++];
|
||||
- if (tag == 0) {
|
||||
+ if (tag == ASN1_EOC) {
|
||||
/* It appears to be an EOC. */
|
||||
if (data[dp++] != 0)
|
||||
goto invalid_eoc;
|
||||
@@ -96,10 +96,8 @@ next_tag:
|
||||
|
||||
/* Extract the length */
|
||||
len = data[dp++];
|
||||
- if (len <= 0x7f) {
|
||||
- dp += len;
|
||||
- goto next_tag;
|
||||
- }
|
||||
+ if (len <= 0x7f)
|
||||
+ goto check_length;
|
||||
|
||||
if (unlikely(len == ASN1_INDEFINITE_LENGTH)) {
|
||||
/* Indefinite length */
|
||||
@@ -110,14 +108,18 @@ next_tag:
|
||||
}
|
||||
|
||||
n = len - 0x80;
|
||||
- if (unlikely(n > sizeof(size_t) - 1))
|
||||
+ if (unlikely(n > sizeof(len) - 1))
|
||||
goto length_too_long;
|
||||
if (unlikely(n > datalen - dp))
|
||||
goto data_overrun_error;
|
||||
- for (len = 0; n > 0; n--) {
|
||||
+ len = 0;
|
||||
+ for (; n > 0; n--) {
|
||||
len <<= 8;
|
||||
len |= data[dp++];
|
||||
}
|
||||
+check_length:
|
||||
+ if (len > datalen - dp)
|
||||
+ goto data_overrun_error;
|
||||
dp += len;
|
||||
goto next_tag;
|
||||
|
||||
--
|
||||
2.5.5
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 21 Nov 2014 10:40:00 -0800
|
||||
Subject: [PATCH] Kbuild: Add an option to enable GCC VTA
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Due to recent codegen issues, gcc -fvar-tracking-assignments was
|
||||
unconditionally disabled in commit 2062afb4f804a ("Fix gcc-4.9.0
|
||||
miscompilation of load_balance() in scheduler"). However, this reduces
|
||||
the debuginfo coverage for variable locations, especially in inline
|
||||
functions. VTA is certainly not perfect either in those cases, but it
|
||||
is much better than without. With compiler versions that have fixed the
|
||||
codegen bugs, we would prefer to have the better details for SystemTap,
|
||||
and surely other debuginfo consumers like perf will benefit as well.
|
||||
|
||||
This patch simply makes CONFIG_DEBUG_INFO_VTA an option. I considered
|
||||
Frank and Linus's discussion of a cc-option-like -fcompare-debug test,
|
||||
but I'm convinced that a narrow test of an arch-specific codegen issue
|
||||
is not really useful. GCC has their own regression tests for this, so
|
||||
I'd suggest GCC_COMPARE_DEBUG=-fvar-tracking-assignments-toggle is more
|
||||
useful for kernel developers to test confidence.
|
||||
|
||||
In fact, I ran into a couple more issues when testing for this patch[1],
|
||||
although neither of those had any codegen impact.
|
||||
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1140872
|
||||
|
||||
With gcc-4.9.2-1.fc22, I can now build v3.18-rc5 with Fedora's i686 and
|
||||
x86_64 configs, and this is completely clean with GCC_COMPARE_DEBUG.
|
||||
|
||||
Cc: Frank Ch. Eigler <fche@redhat.com>
|
||||
Cc: Jakub Jelinek <jakub@redhat.com>
|
||||
Cc: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Cc: Andrew Morton <akpm@linux-foundation.org>
|
||||
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
|
||||
Cc: Michel Dänzer <michel@daenzer.net>
|
||||
Signed-off-by: Josh Stone <jistone@redhat.com>
|
||||
---
|
||||
Makefile | 4 ++++
|
||||
lib/Kconfig.debug | 18 +++++++++++++++++-
|
||||
2 files changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 257ef5892ab7..3cc6f4477e78 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -701,7 +701,11 @@ KBUILD_CFLAGS += -fomit-frame-pointer
|
||||
endif
|
||||
endif
|
||||
|
||||
+ifdef CONFIG_DEBUG_INFO_VTA
|
||||
+KBUILD_CFLAGS += $(call cc-option, -fvar-tracking-assignments)
|
||||
+else
|
||||
KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
|
||||
+endif
|
||||
|
||||
ifdef CONFIG_DEBUG_INFO
|
||||
ifdef CONFIG_DEBUG_INFO_SPLIT
|
||||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
|
||||
index e2894b23efb6..d98afe18f704 100644
|
||||
--- a/lib/Kconfig.debug
|
||||
+++ b/lib/Kconfig.debug
|
||||
@@ -165,7 +165,23 @@ config DEBUG_INFO_DWARF4
|
||||
Generate dwarf4 debug info. This requires recent versions
|
||||
of gcc and gdb. It makes the debug information larger.
|
||||
But it significantly improves the success of resolving
|
||||
- variables in gdb on optimized code.
|
||||
+ variables in gdb on optimized code. The gcc docs also
|
||||
+ recommend enabling -fvar-tracking-assignments for maximum
|
||||
+ benefit. (see DEBUG_INFO_VTA)
|
||||
+
|
||||
+config DEBUG_INFO_VTA
|
||||
+ bool "Enable var-tracking-assignments for debuginfo"
|
||||
+ depends on DEBUG_INFO
|
||||
+ help
|
||||
+ Enable gcc -fvar-tracking-assignments for improved debug
|
||||
+ information on variable locations in optimized code. Per
|
||||
+ gcc, DEBUG_INFO_DWARF4 is recommended for best use of VTA.
|
||||
+
|
||||
+ VTA has been implicated in codegen bugs (gcc PR61801,
|
||||
+ PR61904), so this may deserve some caution. One can set
|
||||
+ GCC_COMPARE_DEBUG=-fvar-tracking-assignments-toggle in the
|
||||
+ environment to automatically compile everything both ways,
|
||||
+ generating an error if anything differs.
|
||||
|
||||
config GDB_SCRIPTS
|
||||
bool "Provide GDB scripts for kernel debugging"
|
|
@ -0,0 +1,233 @@
|
|||
From ba2b209daf984514229626803472e0b055832345 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Date: Fri, 26 Oct 2012 12:42:16 -0400
|
||||
Subject: [PATCH] MODSIGN: Import certificates from UEFI Secure Boot
|
||||
|
||||
Secure Boot stores a list of allowed certificates in the 'db' variable.
|
||||
This imports those certificates into the system trusted keyring. This
|
||||
allows for a third party signing certificate to be used in conjunction
|
||||
with signed modules. By importing the public certificate into the 'db'
|
||||
variable, a user can allow a module signed with that certificate to
|
||||
load. The shim UEFI bootloader has a similar certificate list stored
|
||||
in the 'MokListRT' variable. We import those as well.
|
||||
|
||||
In the opposite case, Secure Boot maintains a list of disallowed
|
||||
certificates in the 'dbx' variable. We load those certificates into
|
||||
the newly introduced system blacklist keyring and forbid any module
|
||||
signed with those from loading.
|
||||
|
||||
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
---
|
||||
certs/system_keyring.c | 13 ++++++
|
||||
include/keys/system_keyring.h | 1 +
|
||||
include/linux/efi.h | 6 +++
|
||||
init/Kconfig | 9 ++++
|
||||
kernel/Makefile | 3 ++
|
||||
kernel/modsign_uefi.c | 99 +++++++++++++++++++++++++++++++++++++++++++
|
||||
6 files changed, 131 insertions(+)
|
||||
create mode 100644 kernel/modsign_uefi.c
|
||||
|
||||
diff --git a/certs/system_keyring.c b/certs/system_keyring.c
|
||||
index 787eeead2f57..4d9123ed5c07 100644
|
||||
--- a/certs/system_keyring.c
|
||||
+++ b/certs/system_keyring.c
|
||||
@@ -30,6 +30,19 @@ extern __initconst const u8 system_certificate_list[];
|
||||
extern __initconst const unsigned long system_certificate_list_size;
|
||||
|
||||
/**
|
||||
+ * get_system_keyring - Return a pointer to the system keyring
|
||||
+ *
|
||||
+ */
|
||||
+struct key *get_system_keyring(void)
|
||||
+{
|
||||
+ struct key *system_keyring = NULL;
|
||||
+
|
||||
+ system_keyring = builtin_trusted_keys;
|
||||
+ return system_keyring;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(get_system_keyring);
|
||||
+
|
||||
+/**
|
||||
* restrict_link_to_builtin_trusted - Restrict keyring addition by built in CA
|
||||
*
|
||||
* Restrict the addition of keys into a keyring based on the key-to-be-added
|
||||
diff --git a/include/keys/system_keyring.h b/include/keys/system_keyring.h
|
||||
index 5bc291a3d261..56ff5715ab67 100644
|
||||
--- a/include/keys/system_keyring.h
|
||||
+++ b/include/keys/system_keyring.h
|
||||
@@ -36,6 +36,7 @@ extern int restrict_link_by_builtin_and_secondary_trusted(
|
||||
#ifdef CONFIG_SYSTEM_BLACKLIST_KEYRING
|
||||
extern struct key *system_blacklist_keyring;
|
||||
#endif
|
||||
+extern struct key *get_system_keyring(void);
|
||||
|
||||
#ifdef CONFIG_IMA_BLACKLIST_KEYRING
|
||||
extern struct key *ima_blacklist_keyring;
|
||||
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
||||
index ff1877145aa4..2483de19c719 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -658,6 +658,12 @@ typedef struct {
|
||||
u64 table;
|
||||
} efi_config_table_64_t;
|
||||
|
||||
+#define EFI_IMAGE_SECURITY_DATABASE_GUID \
|
||||
+ EFI_GUID( 0xd719b2cb, 0x3d3a, 0x4596, 0xa3, 0xbc, 0xda, 0xd0, 0x0e, 0x67, 0x65, 0x6f )
|
||||
+
|
||||
+#define EFI_SHIM_LOCK_GUID \
|
||||
+ EFI_GUID( 0x605dab50, 0xe046, 0x4300, 0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23 )
|
||||
+
|
||||
typedef struct {
|
||||
efi_guid_t guid;
|
||||
u32 table;
|
||||
diff --git a/init/Kconfig b/init/Kconfig
|
||||
index e5449d5aeff9..5408c96f6604 100644
|
||||
--- a/init/Kconfig
|
||||
+++ b/init/Kconfig
|
||||
@@ -1979,6 +1979,15 @@ config MODULE_SIG_ALL
|
||||
comment "Do not forget to sign required modules with scripts/sign-file"
|
||||
depends on MODULE_SIG_FORCE && !MODULE_SIG_ALL
|
||||
|
||||
+config MODULE_SIG_UEFI
|
||||
+ bool "Allow modules signed with certs stored in UEFI"
|
||||
+ depends on MODULE_SIG && SYSTEM_BLACKLIST_KEYRING && EFI
|
||||
+ select EFI_SIGNATURE_LIST_PARSER
|
||||
+ help
|
||||
+ This will import certificates stored in UEFI and allow modules
|
||||
+ signed with those to be loaded. It will also disallow loading
|
||||
+ of modules stored in the UEFI dbx variable.
|
||||
+
|
||||
choice
|
||||
prompt "Which hash algorithm should modules be signed with?"
|
||||
depends on MODULE_SIG
|
||||
diff --git a/kernel/Makefile b/kernel/Makefile
|
||||
index e2ec54e2b952..8dab549985d8 100644
|
||||
--- a/kernel/Makefile
|
||||
+++ b/kernel/Makefile
|
||||
@@ -57,6 +57,7 @@ endif
|
||||
obj-$(CONFIG_UID16) += uid16.o
|
||||
obj-$(CONFIG_MODULES) += module.o
|
||||
obj-$(CONFIG_MODULE_SIG) += module_signing.o
|
||||
+obj-$(CONFIG_MODULE_SIG_UEFI) += modsign_uefi.o
|
||||
obj-$(CONFIG_KALLSYMS) += kallsyms.o
|
||||
obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
|
||||
obj-$(CONFIG_KEXEC_CORE) += kexec_core.o
|
||||
@@ -113,6 +114,8 @@ obj-$(CONFIG_MEMBARRIER) += membarrier.o
|
||||
|
||||
obj-$(CONFIG_HAS_IOMEM) += memremap.o
|
||||
|
||||
+$(obj)/modsign_uefi.o: KBUILD_CFLAGS += -fshort-wchar
|
||||
+
|
||||
$(obj)/configs.o: $(obj)/config_data.h
|
||||
|
||||
# config_data.h contains the same information as ikconfig.h but gzipped.
|
||||
# Info from config_data can be extracted from /proc/config*
|
||||
targets += config_data.gz
|
||||
diff --git a/kernel/modsign_uefi.c b/kernel/modsign_uefi.c
|
||||
new file mode 100644
|
||||
index 000000000000..fe4a6f2bf10a
|
||||
--- /dev/null
|
||||
+++ b/kernel/modsign_uefi.c
|
||||
@@ -0,0 +1,99 @@
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/sched.h>
|
||||
+#include <linux/cred.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/efi.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <keys/asymmetric-type.h>
|
||||
+#include <keys/system_keyring.h>
|
||||
+#include "module-internal.h"
|
||||
+
|
||||
+static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid, unsigned long *size)
|
||||
+{
|
||||
+ efi_status_t status;
|
||||
+ unsigned long lsize = 4;
|
||||
+ unsigned long tmpdb[4];
|
||||
+ void *db = NULL;
|
||||
+
|
||||
+ status = efi.get_variable(name, guid, NULL, &lsize, &tmpdb);
|
||||
+ if (status != EFI_BUFFER_TOO_SMALL) {
|
||||
+ pr_err("Couldn't get size: 0x%lx\n", status);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ db = kmalloc(lsize, GFP_KERNEL);
|
||||
+ if (!db) {
|
||||
+ pr_err("Couldn't allocate memory for uefi cert list\n");
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ status = efi.get_variable(name, guid, NULL, &lsize, db);
|
||||
+ if (status != EFI_SUCCESS) {
|
||||
+ kfree(db);
|
||||
+ db = NULL;
|
||||
+ pr_err("Error reading db var: 0x%lx\n", status);
|
||||
+ }
|
||||
+out:
|
||||
+ *size = lsize;
|
||||
+ return db;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * * Load the certs contained in the UEFI databases
|
||||
+ * */
|
||||
+static int __init load_uefi_certs(void)
|
||||
+{
|
||||
+ efi_guid_t secure_var = EFI_IMAGE_SECURITY_DATABASE_GUID;
|
||||
+ efi_guid_t mok_var = EFI_SHIM_LOCK_GUID;
|
||||
+ void *db = NULL, *dbx = NULL, *mok = NULL;
|
||||
+ unsigned long dbsize = 0, dbxsize = 0, moksize = 0;
|
||||
+ int rc = 0;
|
||||
+ struct key *keyring = NULL;
|
||||
+
|
||||
+ /* Check if SB is enabled and just return if not */
|
||||
+ if (!efi_enabled(EFI_SECURE_BOOT))
|
||||
+ return 0;
|
||||
+
|
||||
+ keyring = get_system_keyring();
|
||||
+ if (!keyring) {
|
||||
+ pr_err("MODSIGN: Couldn't get system keyring\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ /* Get db, MokListRT, and dbx. They might not exist, so it isn't
|
||||
+ * an error if we can't get them.
|
||||
+ */
|
||||
+ db = get_cert_list(L"db", &secure_var, &dbsize);
|
||||
+ if (!db) {
|
||||
+ pr_err("MODSIGN: Couldn't get UEFI db list\n");
|
||||
+ } else {
|
||||
+ rc = parse_efi_signature_list(db, dbsize, keyring);
|
||||
+ if (rc)
|
||||
+ pr_err("Couldn't parse db signatures: %d\n", rc);
|
||||
+ kfree(db);
|
||||
+ }
|
||||
+
|
||||
+ mok = get_cert_list(L"MokListRT", &mok_var, &moksize);
|
||||
+ if (!mok) {
|
||||
+ pr_info("MODSIGN: Couldn't get UEFI MokListRT\n");
|
||||
+ } else {
|
||||
+ rc = parse_efi_signature_list(mok, moksize, keyring);
|
||||
+ if (rc)
|
||||
+ pr_err("Couldn't parse MokListRT signatures: %d\n", rc);
|
||||
+ kfree(mok);
|
||||
+ }
|
||||
+
|
||||
+ dbx = get_cert_list(L"dbx", &secure_var, &dbxsize);
|
||||
+ if (!dbx) {
|
||||
+ pr_info("MODSIGN: Couldn't get UEFI dbx list\n");
|
||||
+ } else {
|
||||
+ rc = parse_efi_signature_list(dbx, dbxsize,
|
||||
+ system_blacklist_keyring);
|
||||
+ if (rc)
|
||||
+ pr_err("Couldn't parse dbx signatures: %d\n", rc);
|
||||
+ kfree(dbx);
|
||||
+ }
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+late_initcall(load_uefi_certs);
|
||||
--
|
||||
2.5.5
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
From 7ce860189df19a38176c1510f4e5615bf35495c1 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Date: Thu, 3 Oct 2013 10:14:23 -0400
|
||||
Subject: [PATCH 2/2] MODSIGN: Support not importing certs from db
|
||||
|
||||
If a user tells shim to not use the certs/hashes in the UEFI db variable
|
||||
for verification purposes, shim will set a UEFI variable called MokIgnoreDB.
|
||||
Have the uefi import code look for this and not import things from the db
|
||||
variable.
|
||||
|
||||
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
---
|
||||
kernel/modsign_uefi.c | 40 +++++++++++++++++++++++++++++++---------
|
||||
1 file changed, 31 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/kernel/modsign_uefi.c b/kernel/modsign_uefi.c
|
||||
index 03f601a0052c..321c79a3b282 100644
|
||||
--- a/kernel/modsign_uefi.c
|
||||
+++ b/kernel/modsign_uefi.c
|
||||
@@ -8,6 +8,23 @@
|
||||
#include <keys/system_keyring.h>
|
||||
#include "module-internal.h"
|
||||
|
||||
+static __init int check_ignore_db(void)
|
||||
+{
|
||||
+ efi_status_t status;
|
||||
+ unsigned int db = 0;
|
||||
+ unsigned long size = sizeof(db);
|
||||
+ efi_guid_t guid = EFI_SHIM_LOCK_GUID;
|
||||
+
|
||||
+ /* Check and see if the MokIgnoreDB variable exists. If that fails
|
||||
+ * then we don't ignore DB. If it succeeds, we do.
|
||||
+ */
|
||||
+ status = efi.get_variable(L"MokIgnoreDB", &guid, NULL, &size, &db);
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ return 0;
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid, unsigned long *size)
|
||||
{
|
||||
efi_status_t status;
|
||||
@@ -47,7 +64,7 @@ static int __init load_uefi_certs(void)
|
||||
efi_guid_t mok_var = EFI_SHIM_LOCK_GUID;
|
||||
void *db = NULL, *dbx = NULL, *mok = NULL;
|
||||
unsigned long dbsize = 0, dbxsize = 0, moksize = 0;
|
||||
- int rc = 0;
|
||||
+ int ignore_db, rc = 0;
|
||||
struct key *keyring = NULL;
|
||||
|
||||
/* Check if SB is enabled and just return if not */
|
||||
@@ -60,17 +77,22 @@ static int __init load_uefi_certs(void)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ /* See if the user has setup Ignore DB mode */
|
||||
+ ignore_db = check_ignore_db();
|
||||
+
|
||||
/* Get db, MokListRT, and dbx. They might not exist, so it isn't
|
||||
* an error if we can't get them.
|
||||
*/
|
||||
- db = get_cert_list(L"db", &secure_var, &dbsize);
|
||||
- if (!db) {
|
||||
- pr_err("MODSIGN: Couldn't get UEFI db list\n");
|
||||
- } else {
|
||||
- rc = parse_efi_signature_list(db, dbsize, keyring);
|
||||
- if (rc)
|
||||
- pr_err("Couldn't parse db signatures: %d\n", rc);
|
||||
- kfree(db);
|
||||
+ if (!ignore_db) {
|
||||
+ db = get_cert_list(L"db", &secure_var, &dbsize);
|
||||
+ if (!db) {
|
||||
+ pr_err("MODSIGN: Couldn't get UEFI db list\n");
|
||||
+ } else {
|
||||
+ rc = parse_efi_signature_list(db, dbsize, keyring);
|
||||
+ if (rc)
|
||||
+ pr_err("Couldn't parse db signatures: %d\n", rc);
|
||||
+ kfree(db);
|
||||
+ }
|
||||
}
|
||||
|
||||
mok = get_cert_list(L"MokListRT", &mok_var, &moksize);
|
||||
--
|
||||
2.5.5
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
# Makefile for source rpm: kernel
|
||||
SPECFILE := kernel.spec
|
||||
|
||||
# we only check the .sign signatures
|
||||
UPSTREAM_CHECKS = sign
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
%:
|
||||
@echo "Try fedpkg $@ or something like that"
|
||||
@exit 1
|
||||
|
||||
include Makefile.config
|
||||
|
||||
prep:
|
||||
fedpkg -v prep
|
||||
|
||||
noarch:
|
||||
fedpkg -v local --arch=noarch
|
||||
|
||||
# 'make local' also needs to build the noarch firmware package
|
||||
local:
|
||||
fedpkg -v local
|
||||
|
||||
extremedebug:
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_PAGEALLOC is not set/CONFIG_DEBUG_PAGEALLOC=y/' config-nodebug
|
||||
|
||||
debug:
|
||||
@perl -pi -e 's/# CONFIG_LOCK_STAT is not set/CONFIG_LOCK_STAT=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_STACK_USAGE is not set/CONFIG_DEBUG_STACK_USAGE=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_SLAB is not set/CONFIG_DEBUG_SLAB=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_MUTEXES is not set/CONFIG_DEBUG_MUTEXES=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_RT_MUTEXES is not set/CONFIG_DEBUG_RT_MUTEXES=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_LOCK_ALLOC is not set/CONFIG_DEBUG_LOCK_ALLOC=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_LOCK_TORTURE_TEST is not set/CONFIG_LOCK_TORTURE_TEST=m/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_PROVE_LOCKING is not set/CONFIG_PROVE_LOCKING=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_PROVE_RCU is not set/CONFIG_PROVE_RCU=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_SPINLOCK is not set/CONFIG_DEBUG_SPINLOCK=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_VM is not set/CONFIG_DEBUG_VM=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_VM_PGFLAGS is not set/CONFIG_DEBUG_VM_PGFLAGS=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_FAULT_INJECTION is not set/CONFIG_FAULT_INJECTION=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_FAILSLAB is not set/CONFIG_FAILSLAB=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_FAIL_PAGE_ALLOC is not set/CONFIG_FAIL_PAGE_ALLOC=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_FAIL_IO_TIMEOUT is not set/CONFIG_FAIL_IO_TIMEOUT=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_FAIL_MAKE_REQUEST is not set/CONFIG_FAIL_MAKE_REQUEST=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_FAIL_MMC_REQUEST is not set/CONFIG_FAIL_MMC_REQUEST=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_FAULT_INJECTION_DEBUG_FS is not set/CONFIG_FAULT_INJECTION_DEBUG_FS=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set/CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_SG is not set/CONFIG_DEBUG_SG=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_PI_LIST is not set/CONFIG_DEBUG_PI_LIST=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_OBJECTS is not set/CONFIG_DEBUG_OBJECTS=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_OBJECTS_FREE is not set/CONFIG_DEBUG_OBJECTS_FREE=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_OBJECTS_TIMERS is not set/CONFIG_DEBUG_OBJECTS_TIMERS=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_OBJECTS_WORK is not set/CONFIG_DEBUG_OBJECTS_WORK=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set/CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_OBJECTS_RCU_HEAD is not set/CONFIG_DEBUG_OBJECTS_RCU_HEAD=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_X86_PTDUMP is not set/CONFIG_X86_PTDUMP=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_ARM64_PTDUMP is not set/CONFIG_ARM64_PTDUMP=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_EFI_PGT_DUMP is not set/CONFIG_EFI_PGT_DUMP=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_CAN_DEBUG_DEVICES is not set/CONFIG_CAN_DEBUG_DEVICES=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_MODULE_FORCE_UNLOAD is not set/CONFIG_MODULE_FORCE_UNLOAD=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_NOTIFIERS is not set/CONFIG_DEBUG_NOTIFIERS=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DMA_API_DEBUG is not set/CONFIG_DMA_API_DEBUG=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_PM_TEST_SUSPEND is not set/CONFIG_PM_TEST_SUSPEND=y/' config-generic
|
||||
@perl -pi -e 's/# CONFIG_PM_ADVANCED_DEBUG is not set/CONFIG_PM_ADVANCED_DEBUG=y/' config-generic
|
||||
@perl -pi -e 's/# CONFIG_B43_DEBUG is not set/CONFIG_B43_DEBUG=y/' config-generic
|
||||
@perl -pi -e 's/# CONFIG_B43LEGACY_DEBUG is not set/CONFIG_B43LEGACY_DEBUG=y/' config-generic
|
||||
@perl -pi -e 's/# CONFIG_MMIOTRACE is not set/CONFIG_MMIOTRACE=y/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_STRIP_ASM_SYMS=y/# CONFIG_STRIP_ASM_SYMS is not set/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_CREDENTIALS is not set/CONFIG_DEBUG_CREDENTIALS=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set/CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_ACPI_DEBUG is not set/CONFIG_ACPI_DEBUG=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_EXT4_DEBUG is not set/CONFIG_EXT4_DEBUG=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_PERF_USE_VMALLOC is not set/CONFIG_DEBUG_PERF_USE_VMALLOC=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_JBD2_DEBUG is not set/CONFIG_JBD2_DEBUG=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_NFSD_FAULT_INJECTION is not set/CONFIG_NFSD_FAULT_INJECTION=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_BLK_CGROUP is not set/CONFIG_DEBUG_BLK_CGROUP=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DRBD_FAULT_INJECTION is not set/CONFIG_DRBD_FAULT_INJECTION=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_ATH_DEBUG is not set/CONFIG_ATH_DEBUG=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_CARL9170_DEBUGFS is not set/CONFIG_CARL9170_DEBUGFS=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_IWLWIFI_DEVICE_TRACING is not set/CONFIG_IWLWIFI_DEVICE_TRACING=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DMADEVICES_DEBUG is not set/CONFIG_DMADEVICES_DEBUG=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_CEPH_LIB_PRETTYDEBUG is not set/CONFIG_CEPH_LIB_PRETTYDEBUG=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_QUOTA_DEBUG is not set/CONFIG_QUOTA_DEBUG=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_KGDB_KDB is not set/CONFIG_KGDB_KDB=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_KDB_KEYBOARD is not set/CONFIG_KDB_KEYBOARD=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set/CONFIG_CPU_NOTIFIER_ERROR_INJECT=m/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_PER_CPU_MAPS is not set/CONFIG_DEBUG_PER_CPU_MAPS=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_TEST_LIST_SORT is not set/CONFIG_TEST_LIST_SORT=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_ATOMIC_SLEEP is not set/CONFIG_DEBUG_ATOMIC_SLEEP=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DETECT_HUNG_TASK is not set/CONFIG_DETECT_HUNG_TASK=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_WQ_WATCHDOG is not set/CONFIG_WQ_WATCHDOG=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set/CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_KMEMLEAK is not set/CONFIG_DEBUG_KMEMLEAK=y/' config-nodebug
|
||||
|
||||
@# just in case we're going from extremedebug -> debug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
|
||||
|
||||
@perl -pi -e 's/# CONFIG_MAXSMP is not set/CONFIG_MAXSMP=y/' config-x86-generic
|
||||
|
||||
@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
|
||||
@rpmdev-bumpspec -c "Reenable debugging options." kernel.spec
|
||||
|
||||
nodebuginfo:
|
||||
@perl -pi -e 's/^%define with_debuginfo %\{\?_without_debuginfo: 0\} %\{\?\!_without_debuginfo: 1\}/%define with_debuginfo %\{\?_without_debuginfo: 0\} %\{\?\!_without_debuginfo: 0\}/' kernel.spec
|
||||
nodebug: release
|
||||
@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
|
||||
release: config-release
|
||||
@perl -pi -e 's/^%define debugbuildsenabled 0/%define debugbuildsenabled 1/' kernel.spec
|
||||
@rpmdev-bumpspec -c "Disable debugging options." kernel.spec
|
||||
|
||||
include Makefile.release
|
||||
|
||||
ifeq ($(MAKECMDGOALS),me a sandwich)
|
||||
.PHONY: me a sandwich
|
||||
me a:
|
||||
@:
|
||||
|
||||
sandwich:
|
||||
@[ `id -u` -ne 0 ] && echo "What? Make it yourself." || echo Okay.
|
||||
endif
|
|
@ -0,0 +1,129 @@
|
|||
# Make rules for configuration files.
|
||||
#
|
||||
# $Id$
|
||||
|
||||
CFG = kernel-$(VERSION)
|
||||
|
||||
CONFIGFILES = \
|
||||
$(CFG)-i686.config $(CFG)-i686-debug.config \
|
||||
$(CFG)-i686-PAE.config $(CFG)-i686-PAEdebug.config \
|
||||
$(CFG)-x86_64.config $(CFG)-x86_64-debug.config \
|
||||
$(CFG)-s390x.config \
|
||||
$(CFG)-armv7hl.config $(CFG)-armv7hl-lpae.config \
|
||||
$(CFG)-aarch64.config \
|
||||
$(CFG)-ppc64.config $(CFG)-ppc64p7.config $(CFG)-ppc64-debug.config \
|
||||
$(CFG)-ppc64le.config $(CFG)-ppc64le-debug.config
|
||||
|
||||
PLATFORMS = x86 x86_64 powerpc s390x arm arm64
|
||||
TEMPFILES = $(addprefix temp-, $(addsuffix -generic, $(PLATFORMS)))
|
||||
|
||||
configs: $(CONFIGFILES)
|
||||
@rm -f kernel-*-config
|
||||
@rm -f $(TEMPFILES)
|
||||
@rm -f temp-generic temp-*-generic temp-*-generic-tmp
|
||||
|
||||
# Augment the clean target to clean up our own cruft
|
||||
clean ::
|
||||
@rm -fv $(CONFIGFILES) $(TEMPFILES) temp-generic kernel-$(VERSION)*config
|
||||
|
||||
temp-generic: config-generic config-nodebug
|
||||
cat $^ > temp-generic
|
||||
|
||||
temp-debug-generic: config-generic config-debug
|
||||
cat $^ > temp-debug-generic
|
||||
|
||||
temp-no-extra-generic: config-no-extra temp-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-arm-generic: config-arm-generic temp-no-extra-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-armv7-generic: config-armv7-generic temp-arm-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-armv7: config-armv7 temp-armv7-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-armv7-lpae: config-armv7-lpae temp-armv7-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-arm-debug-generic: temp-arm-generic temp-debug-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-arm64: config-arm64 temp-arm-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-arm64-debug: config-arm64 temp-arm-debug-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-x86-32: config-x86-32-generic config-x86-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-x86-32-generic: temp-x86-32 temp-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-x86-debug-generic: temp-x86-32 temp-debug-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-x86-64: config-x86_64-generic config-x86-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-x86_64-generic: temp-x86-64 temp-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-x86_64-debug-generic: temp-x86-64 temp-debug-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-powerpc64-generic: config-powerpc64-generic temp-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-powerpc64-debug-generic: config-powerpc64-generic temp-debug-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
temp-s390-generic: config-s390x temp-generic
|
||||
perl merge.pl $^ > $@
|
||||
|
||||
$(CFG)-i686-PAE.config: config-i686-PAE temp-x86-32-generic
|
||||
perl merge.pl $^ i386 > $@
|
||||
|
||||
$(CFG)-i686-PAEdebug.config: config-i686-PAE temp-x86-debug-generic
|
||||
perl merge.pl $^ i386 > $@
|
||||
|
||||
$(CFG)-i686.config: /dev/null temp-x86-32-generic
|
||||
perl merge.pl $^ i386 > $@
|
||||
|
||||
$(CFG)-i686-debug.config: /dev/null temp-x86-debug-generic
|
||||
perl merge.pl $^ i386 > $@
|
||||
|
||||
$(CFG)-x86_64.config: /dev/null temp-x86_64-generic
|
||||
perl merge.pl $^ x86_64 > $@
|
||||
|
||||
$(CFG)-x86_64-debug.config: /dev/null temp-x86_64-debug-generic
|
||||
perl merge.pl $^ x86_64 > $@
|
||||
|
||||
$(CFG)-ppc64.config: config-powerpc64 temp-powerpc64-generic
|
||||
perl merge.pl $^ powerpc > $@
|
||||
|
||||
$(CFG)-ppc64-debug.config: config-powerpc64 temp-powerpc64-debug-generic
|
||||
perl merge.pl $^ powerpc > $@
|
||||
|
||||
$(CFG)-ppc64p7.config: config-powerpc64p7 temp-powerpc64-generic
|
||||
perl merge.pl $^ powerpc > $@
|
||||
|
||||
$(CFG)-ppc64le.config: config-powerpc64le temp-powerpc64-generic
|
||||
perl merge.pl $^ powerpc > $@
|
||||
|
||||
$(CFG)-ppc64le-debug.config: config-powerpc64le temp-powerpc64-debug-generic
|
||||
perl merge.pl $^ powerpc > $@
|
||||
|
||||
$(CFG)-s390x.config: config-s390x temp-s390-generic
|
||||
perl merge.pl $^ s390 > $@
|
||||
|
||||
$(CFG)-armv7hl.config: /dev/null temp-armv7
|
||||
perl merge.pl $^ arm > $@
|
||||
|
||||
$(CFG)-armv7hl-lpae.config: /dev/null temp-armv7-lpae
|
||||
perl merge.pl $^ arm > $@
|
||||
|
||||
$(CFG)-aarch64.config: /dev/null temp-arm64
|
||||
perl merge.pl $^ arm64 > $@
|
|
@ -0,0 +1,84 @@
|
|||
# Make rules for configuration files.
|
||||
#
|
||||
# $Id$
|
||||
|
||||
# This file contains only entries that change the config files.
|
||||
# Anything that changes kernel.spec itself should go in the main Makefile.
|
||||
|
||||
config-release:
|
||||
@perl -pi -e 's/CONFIG_LOCK_STAT=y/# CONFIG_LOCK_STAT is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_STACK_USAGE=y/# CONFIG_DEBUG_STACK_USAGE is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_SLAB=y/# CONFIG_DEBUG_SLAB is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_MUTEXES=y/# CONFIG_DEBUG_MUTEXES is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_RT_MUTEXES=y/# CONFIG_DEBUG_RT_MUTEXES is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_LOCK_ALLOC=y/# CONFIG_DEBUG_LOCK_ALLOC is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_LOCK_TORTURE_TEST=m/# CONFIG_LOCK_TORTURE_TEST is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_PROVE_LOCKING=y/# CONFIG_PROVE_LOCKING is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_PROVE_RCU=y/# CONFIG_PROVE_RCU is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_SPINLOCK=y/# CONFIG_DEBUG_SPINLOCK is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_VM=y/# CONFIG_DEBUG_VM is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_VM_PGFLAGS=y/# CONFIG_DEBUG_VM_PGFLAGS is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_FAULT_INJECTION=y/# CONFIG_FAULT_INJECTION is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_FAILSLAB=y/# CONFIG_FAILSLAB is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_FAIL_PAGE_ALLOC=y/# CONFIG_FAIL_PAGE_ALLOC is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_FAIL_IO_TIMEOUT=y/# CONFIG_FAIL_IO_TIMEOUT is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_FAIL_MAKE_REQUEST=y/# CONFIG_FAIL_MAKE_REQUEST is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_FAIL_MMC_REQUEST=y/# CONFIG_FAIL_MMC_REQUEST is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_FAULT_INJECTION_DEBUG_FS=y/# CONFIG_FAULT_INJECTION_DEBUG_FS is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y/# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_SG=y/# CONFIG_DEBUG_SG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_PI_LIST=y/# CONFIG_DEBUG_PI_LIST is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_OBJECTS=y/# CONFIG_DEBUG_OBJECTS is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_OBJECTS_FREE=y/# CONFIG_DEBUG_OBJECTS_FREE is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_OBJECTS_TIMERS=y/# CONFIG_DEBUG_OBJECTS_TIMERS is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_OBJECTS_WORK=y/# CONFIG_DEBUG_OBJECTS_WORK is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y/# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_OBJECTS_RCU_HEAD=y/# CONFIG_DEBUG_OBJECTS_RCU_HEAD is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_ARM64_PTDUMP=y/# CONFIG_ARM64_PTDUMP is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_EFI_PGT_DUMP=y/# CONFIG_EFI_PGT_DUMP is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_CAN_DEBUG_DEVICES=y/# CONFIG_CAN_DEBUG_DEVICES is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_MODULE_FORCE_UNLOAD=y/# CONFIG_MODULE_FORCE_UNLOAD is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_NOTIFIERS=y/# CONFIG_DEBUG_NOTIFIERS is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DMA_API_DEBUG=y/# CONFIG_DMA_API_DEBUG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_PM_TEST_SUSPEND=y/# CONFIG_PM_TEST_SUSPEND is not set/' config-generic
|
||||
@perl -pi -e 's/CONFIG_PM_ADVANCED_DEBUG=y/# CONFIG_PM_ADVANCED_DEBUG is not set/' config-generic
|
||||
@perl -pi -e 's/CONFIG_B43_DEBUG=y/# CONFIG_B43_DEBUG is not set/' config-generic
|
||||
@perl -pi -e 's/CONFIG_B43LEGACY_DEBUG=y/# CONFIG_B43LEGACY_DEBUG is not set/' config-generic
|
||||
@perl -pi -e 's/CONFIG_MMIOTRACE=y/# CONFIG_MMIOTRACE is not set/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_STRIP_ASM_SYMS is not set/CONFIG_STRIP_ASM_SYMS=y/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_CREDENTIALS=y/# CONFIG_DEBUG_CREDENTIALS is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y/# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_ACPI_DEBUG=y/# CONFIG_ACPI_DEBUG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_EXT4_DEBUG=y/# CONFIG_EXT4_DEBUG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_PERF_USE_VMALLOC=y/# CONFIG_DEBUG_PERF_USE_VMALLOC is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_JBD2_DEBUG=y/# CONFIG_JBD2_DEBUG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_NFSD_FAULT_INJECTION=y/# CONFIG_NFSD_FAULT_INJECTION is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_BLK_CGROUP=y/# CONFIG_DEBUG_BLK_CGROUP is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DRBD_FAULT_INJECTION=y/# CONFIG_DRBD_FAULT_INJECTION is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_ATH_DEBUG=y/# CONFIG_ATH_DEBUG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_CARL9170_DEBUGFS=y/# CONFIG_CARL9170_DEBUGFS is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_IWLWIFI_DEVICE_TRACING=y/# CONFIG_IWLWIFI_DEVICE_TRACING is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DMADEVICES_DEBUG=y/# CONFIG_DMADEVICES_DEBUG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_CEPH_LIB_PRETTYDEBUG=y/# CONFIG_CEPH_LIB_PRETTYDEBUG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_QUOTA_DEBUG=y/# CONFIG_QUOTA_DEBUG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_CPU_NOTIFIER_ERROR_INJECT=m/# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_PER_CPU_MAPS=y/# CONFIG_DEBUG_PER_CPU_MAPS is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_PERCPU_TEST=m/# CONFIG_PERCPU_TEST is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_TEST_LIST_SORT=y/# CONFIG_TEST_LIST_SORT is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_TEST_STRING_HELPERS=m/# CONFIG_TEST_STRING_HELPERS is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_ATOMIC_SLEEP=y/# CONFIG_DEBUG_ATOMIC_SLEEP is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DETECT_HUNG_TASK=y/# CONFIG_DETECT_HUNG_TASK is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_WQ_WATCHDOG=y/# CONFIG_WQ_WATCHDOG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y/# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_KMEMLEAK=y/# CONFIG_DEBUG_KMEMLEAK is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_MAC80211_MESSAGE_TRACING=y/# CONFIG_MAC80211_MESSAGE_TRACING is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_XFS_WARN=y/# CONFIG_XFS_WARN is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_EDAC_DEBUG=y/# CONFIG_EDAC_DEBUG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_RTLWIFI_DEBUG=y/# CONFIG_RTLWIFI_DEBUG is not set/' config-nodebug
|
||||
|
||||
@# Undo anything that make extremedebug might have set
|
||||
@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-debug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
|
||||
|
||||
@# Change defaults back to sane things.
|
||||
@perl -pi -e 's/CONFIG_MAXSMP=y/# CONFIG_MAXSMP is not set/' config-x86-generic
|
|
@ -1,45 +0,0 @@
|
|||
RHEL_MAJOR = 8
|
||||
RHEL_MINOR = 99
|
||||
|
||||
#
|
||||
# RHEL_RELEASE
|
||||
# -------------
|
||||
#
|
||||
# Represents build number in 'release' part of RPM's name-version-release.
|
||||
# name is <package_name>, e.g. kernel
|
||||
# version is upstream kernel version this kernel is based on, e.g. 4.18.0
|
||||
# release is <RHEL_RELEASE>.<dist_tag>[<buildid>], e.g. 100.el8
|
||||
#
|
||||
# Use this spot to avoid future merge conflicts.
|
||||
# Do not trim this comment.
|
||||
RHEL_RELEASE = 122
|
||||
|
||||
#
|
||||
# Early y+1 numbering
|
||||
# --------------------
|
||||
#
|
||||
# In early y+1 process, RHEL_RELEASE consists of 2 numbers: x.y
|
||||
# First is RHEL_RELEASE inherited/merged from y as-is, second number
|
||||
# is incremented with each build starting from 1. After merge from y,
|
||||
# it resets back to 1. This way y+1 nvr reflects status of last merge.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# rhel8.0 rhel-8.1
|
||||
# kernel-4.18.0-58.el8 --> kernel-4.18.0-58.1.el8
|
||||
# kernel-4.18.0-58.2.el8
|
||||
# kernel-4.18.0-59.el8 kernel-4.18.0-59.1.el8
|
||||
# kernel-4.18.0-60.el8
|
||||
# kernel-4.18.0-61.el8 --> kernel-4.18.0-61.1.el8
|
||||
#
|
||||
#
|
||||
# Use this spot to avoid future merge conflicts.
|
||||
# Do not trim this comment.
|
||||
EARLY_YSTREAM ?= no
|
||||
EARLY_YBUILD:=
|
||||
EARLY_YRELEASE:=
|
||||
ifneq ("$(ZSTREAM)", "yes")
|
||||
ifeq ("$(EARLY_YSTREAM)","yes")
|
||||
RHEL_RELEASE:=$(RHEL_RELEASE).$(EARLY_YRELEASE)
|
||||
endif
|
||||
endif
|
|
@ -0,0 +1,117 @@
|
|||
From 6f756b32a45b022428e33ce20181e874c73ca82e Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Thu, 8 Mar 2012 10:10:38 -0500
|
||||
Subject: [PATCH] PCI: Lock down BAR access when module security is enabled
|
||||
|
||||
Any hardware that can potentially generate DMA has to be locked down from
|
||||
userspace in order to avoid it being possible for an attacker to modify
|
||||
kernel code, allowing them to circumvent disabled module loading or module
|
||||
signing. Default to paranoid - in future we can potentially relax this for
|
||||
sufficiently IOMMU-isolated devices.
|
||||
|
||||
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
---
|
||||
drivers/pci/pci-sysfs.c | 10 ++++++++++
|
||||
drivers/pci/proc.c | 8 +++++++-
|
||||
drivers/pci/syscall.c | 3 ++-
|
||||
3 files changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
|
||||
index bcd10c7..a950301 100644
|
||||
--- a/drivers/pci/pci-sysfs.c
|
||||
+++ b/drivers/pci/pci-sysfs.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <linux/vgaarb.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/of.h>
|
||||
+#include <linux/module.h>
|
||||
#include "pci.h"
|
||||
|
||||
static int sysfs_initialized; /* = 0 */
|
||||
@@ -716,6 +717,9 @@ static ssize_t pci_write_config(struct file *filp, struct kobject *kobj,
|
||||
loff_t init_off = off;
|
||||
u8 *data = (u8 *) buf;
|
||||
|
||||
+ if (secure_modules())
|
||||
+ return -EPERM;
|
||||
+
|
||||
if (off > dev->cfg_size)
|
||||
return 0;
|
||||
if (off + count > dev->cfg_size) {
|
||||
@@ -1007,6 +1011,9 @@ static int pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
|
||||
resource_size_t start, end;
|
||||
int i;
|
||||
|
||||
+ if (secure_modules())
|
||||
+ return -EPERM;
|
||||
+
|
||||
for (i = 0; i < PCI_ROM_RESOURCE; i++)
|
||||
if (res == &pdev->resource[i])
|
||||
break;
|
||||
@@ -1106,6 +1113,9 @@ static ssize_t pci_write_resource_io(struct file *filp, struct kobject *kobj,
|
||||
struct bin_attribute *attr, char *buf,
|
||||
loff_t off, size_t count)
|
||||
{
|
||||
+ if (secure_modules())
|
||||
+ return -EPERM;
|
||||
+
|
||||
return pci_resource_io(filp, kobj, attr, buf, off, count, true);
|
||||
}
|
||||
|
||||
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
|
||||
index 2408abe..59f321c 100644
|
||||
--- a/drivers/pci/proc.c
|
||||
+++ b/drivers/pci/proc.c
|
||||
@@ -116,6 +116,9 @@ static ssize_t proc_bus_pci_write(struct file *file, const char __user *buf,
|
||||
int size = dev->cfg_size;
|
||||
int cnt;
|
||||
|
||||
+ if (secure_modules())
|
||||
+ return -EPERM;
|
||||
+
|
||||
if (pos >= size)
|
||||
return 0;
|
||||
if (nbytes >= size)
|
||||
@@ -195,6 +198,9 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
|
||||
#endif /* HAVE_PCI_MMAP */
|
||||
int ret = 0;
|
||||
|
||||
+ if (secure_modules())
|
||||
+ return -EPERM;
|
||||
+
|
||||
switch (cmd) {
|
||||
case PCIIOC_CONTROLLER:
|
||||
ret = pci_domain_nr(dev->bus);
|
||||
@@ -233,7 +239,7 @@ static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
struct pci_filp_private *fpriv = file->private_data;
|
||||
int i, ret, write_combine;
|
||||
|
||||
- if (!capable(CAP_SYS_RAWIO))
|
||||
+ if (!capable(CAP_SYS_RAWIO) || secure_modules())
|
||||
return -EPERM;
|
||||
|
||||
/* Make sure the caller is mapping a real resource for this device */
|
||||
diff --git a/drivers/pci/syscall.c b/drivers/pci/syscall.c
|
||||
index b91c4da..98f5637 100644
|
||||
--- a/drivers/pci/syscall.c
|
||||
+++ b/drivers/pci/syscall.c
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/errno.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/syscalls.h>
|
||||
+#include <linux/module.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include "pci.h"
|
||||
|
||||
@@ -92,7 +93,7 @@ SYSCALL_DEFINE5(pciconfig_write, unsigned long, bus, unsigned long, dfn,
|
||||
u32 dword;
|
||||
int err = 0;
|
||||
|
||||
- if (!capable(CAP_SYS_ADMIN))
|
||||
+ if (!capable(CAP_SYS_ADMIN) || secure_modules())
|
||||
return -EPERM;
|
||||
|
||||
dev = pci_get_bus_and_slot(bus, dfn);
|
||||
--
|
||||
2.9.2
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
# This file contains patches that we intend to carry for longer than
|
||||
# "Should show up in a stable release soonish"
|
||||
# Some of these may eventually drop out
|
||||
|
||||
kbuild-AFTER_LINK.patch
|
||||
|
||||
arm64-avoid-needing-console-to-enable-serial-console.patch
|
||||
|
||||
geekbox-v4-device-tree-support.patch
|
||||
|
||||
Initial-AllWinner-A64-and-PINE64-support.patch
|
||||
|
||||
arm64-pcie-quirks-xgene.patch
|
||||
|
||||
usb-phy-tegra-Add-38.4MHz-clock-table-entry.patch
|
||||
|
||||
ARM-tegra-usb-no-reset.patch
|
||||
|
||||
bcm283x-upstream-fixes.patch
|
||||
|
||||
lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
|
||||
|
||||
input-kill-stupid-messages.patch
|
||||
|
||||
die-floppy-die.patch
|
||||
|
||||
no-pcspkr-modalias.patch
|
||||
|
||||
silence-fbcon-logo.patch
|
||||
|
||||
Kbuild-Add-an-option-to-enable-GCC-VTA.patch
|
||||
|
||||
crash-driver.patch
|
||||
|
||||
#Secure boot patches
|
||||
Add-secure_modules-call.patch
|
||||
PCI-Lock-down-BAR-access-when-module-security-is-ena.patch
|
||||
x86-Lock-down-IO-port-access-when-module-security-is.patch
|
||||
ACPI-Limit-access-to-custom_method.patch
|
||||
asus-wmi-Restrict-debugfs-interface-when-module-load.patch
|
||||
Restrict-dev-mem-and-dev-kmem-when-module-loading-is.patch
|
||||
acpi-Ignore-acpi_rsdp-kernel-parameter-when-module-l.patch
|
||||
kexec-Disable-at-runtime-if-the-kernel-enforces-modu.patch
|
||||
x86-Restrict-MSR-access-when-module-loading-is-restr.patch
|
||||
Add-option-to-automatically-enforce-module-signature.patch
|
||||
efi-Disable-secure-boot-if-shim-is-in-insecure-mode.patch
|
||||
efi-Add-EFI_SECURE_BOOT-bit.patch
|
||||
hibernate-Disable-in-a-signed-modules-environment.patch
|
||||
Add-EFI-signature-data-types.patch
|
||||
Add-an-EFI-signature-blob-parser-and-key-loader.patch
|
||||
KEYS-Add-a-system-blacklist-keyring.patch
|
||||
MODSIGN-Import-certificates-from-UEFI-Secure-Boot.patch
|
||||
MODSIGN-Support-not-importing-certs-from-db.patch
|
||||
Add-sysrq-option-to-disable-secure-boot-mode.patch
|
||||
kexec-uefi-copy-secure_boot-flag-in-boot-params.patch
|
||||
|
||||
drm-i915-hush-check-crtc-state.patch
|
||||
|
||||
disable-i8042-check-on-apple-mac.patch
|
||||
|
||||
lis3-improve-handling-of-null-rate.patch
|
||||
|
||||
watchdog-Disable-watchdog-on-virtual-machines.patch
|
||||
|
||||
scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
|
||||
|
||||
criu-no-expert.patch
|
||||
|
||||
ath9k-rx-dma-stop-check.patch
|
||||
|
||||
xen-pciback-Don-t-disable-PCI_COMMAND-on-PCI-device-.patch
|
||||
|
||||
Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
|
||||
|
||||
firmware-Drop-WARN-from-usermodehelper_read_trylock-.patch
|
||||
|
||||
drm-i915-turn-off-wc-mmaps.patch
|
||||
|
||||
i8042-skip-selftest-asus-laptops.patch
|
|
@ -1,228 +0,0 @@
|
|||
https://gitlab.com/cki-project/kernel-ark/-/commit/8773e8c6039ff74d1426cc80de30de759cd0c2a2
|
||||
8773e8c6039ff74d1426cc80de30de759cd0c2a2 irq: export irq_check_status_bit
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e187313e5f0086538fefe0925ef84480f99616d8
|
||||
e187313e5f0086538fefe0925ef84480f99616d8 gcc-plugins: fix gcc 11 indigestion with plugins...
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/0c84b348e33ab9d7df5c3c5acc7fbc07fd96fafc
|
||||
0c84b348e33ab9d7df5c3c5acc7fbc07fd96fafc Fix up bad merge with efi: generalize efi_get_secureboot
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/364788093bdf437c33753d327136c363be8f756c
|
||||
364788093bdf437c33753d327136c363be8f756c Fix up a merge issue with rxe.c
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/a4d554ce883e24df77cce42bc2deec527028c213
|
||||
a4d554ce883e24df77cce42bc2deec527028c213 Filter out LTO build options from the perl ccopts
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/17b0f7f1d49df30661b517d668715ff5ee1bab09
|
||||
17b0f7f1d49df30661b517d668715ff5ee1bab09 Fixes "acpi: prefer booting with ACPI over DTS" to be RHEL only
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e7c009cd91ababdbb5f726ef592c7800f0682d3a
|
||||
e7c009cd91ababdbb5f726ef592c7800f0682d3a arch/x86: Remove vendor specific CPU ID checks
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7120b2a26fc4c7954fd0395973dc6739c110e091
|
||||
7120b2a26fc4c7954fd0395973dc6739c110e091 redhat: Replace hardware.redhat.com link in Unsupported message
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7a28e2fde653a161913abb8eee943cdacb5ff2ae
|
||||
7a28e2fde653a161913abb8eee943cdacb5ff2ae x86: Fix compile issues with rh_check_supported()
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/45f64c1a24e73af7987cffec3ea941e29364f87f
|
||||
45f64c1a24e73af7987cffec3ea941e29364f87f e1000e: bump up timeout to wait when ME un-configure ULP mode
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6c14763b1ce98698949ff45135c15e333aa6416d
|
||||
6c14763b1ce98698949ff45135c15e333aa6416d drm/sun4i: sun6i_mipi_dsi: fix horizontal timing calculation
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/67a19b16012b12cffba0b515c6503e5f8cdbb798
|
||||
67a19b16012b12cffba0b515c6503e5f8cdbb798 drm: panel: add Xingbangda XBD599 panel
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/d220dbf98cef820367b5a2a2eeaacebee958bdd4
|
||||
d220dbf98cef820367b5a2a2eeaacebee958bdd4 dt-bindings: panel: add binding for Xingbangda XBD599 panel
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/80660062260dec4bdca9540922577542c16145e8
|
||||
80660062260dec4bdca9540922577542c16145e8 ARM: fix __get_user_check() in case uaccess_* calls are not inlined
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/24d8743613b2a6a585fc68cfe95078d9a3d5b389
|
||||
24d8743613b2a6a585fc68cfe95078d9a3d5b389 mm/kmemleak: skip late_init if not skip disable
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/b697ff5e26974fee8fcd31a1e221e9dd41515efc
|
||||
b697ff5e26974fee8fcd31a1e221e9dd41515efc KEYS: Make use of platform keyring for module signature verify
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/081d2185e22479b449586c4e9843602ca0d49806
|
||||
081d2185e22479b449586c4e9843602ca0d49806 Drop that for now
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5ef51389cf6673a0e9e004909c7be1dc785050b2
|
||||
5ef51389cf6673a0e9e004909c7be1dc785050b2 Input: rmi4 - remove the need for artificial IRQ in case of HID
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c1788012ebf8de46e9dc80d18051ed0c77c811b6
|
||||
c1788012ebf8de46e9dc80d18051ed0c77c811b6 ARM: tegra: usb no reset
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/577365feaa909db4c0949eabfcda7e4a972b8e54
|
||||
577365feaa909db4c0949eabfcda7e4a972b8e54 arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/331be9c5a436057ee852075c102d9d90a9046a30
|
||||
331be9c5a436057ee852075c102d9d90a9046a30 redhat: rh_kabi: deduplication friendly structs
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/34d79fbfb327f732ebf3ece4db21a14f81fedf03
|
||||
34d79fbfb327f732ebf3ece4db21a14f81fedf03 redhat: rh_kabi add a comment with warning about RH_KABI_EXCLUDE usage
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/93a4b5f12d5a1c2d62cf1d7c440b31d9847eab07
|
||||
93a4b5f12d5a1c2d62cf1d7c440b31d9847eab07 redhat: rh_kabi: introduce RH_KABI_EXTEND_WITH_SIZE
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/8e5c06356457f5351289e9f687b991189d163dae
|
||||
8e5c06356457f5351289e9f687b991189d163dae redhat: rh_kabi: Indirect EXTEND macros so nesting of other macros will resolve.
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/212cbccda77cc81fcb60123907eabdac8ad5adb7
|
||||
212cbccda77cc81fcb60123907eabdac8ad5adb7 redhat: rh_kabi: Fix RH_KABI_SET_SIZE to use dereference operator
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6f7744b412e1fb86a67d8761e64df69cf891b4ad
|
||||
6f7744b412e1fb86a67d8761e64df69cf891b4ad redhat: rh_kabi: Add macros to size and extend structs
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/049623d33998be30d79692c69b34acb502c496e3
|
||||
049623d33998be30d79692c69b34acb502c496e3 Removing Obsolete hba pci-ids from rhel8
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/43ef1d631ecfe84084db3572c9ed1bedbdceb0f8
|
||||
43ef1d631ecfe84084db3572c9ed1bedbdceb0f8 mptsas: pci-id table changes
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e5726695109dd1a73da92487b75de6a51d54c015
|
||||
e5726695109dd1a73da92487b75de6a51d54c015 mptsas: Taint kernel if mptsas is loaded
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ee4dcd6f04ca76ad35ab0f38c436ab2f7de53f16
|
||||
ee4dcd6f04ca76ad35ab0f38c436ab2f7de53f16 mptspi: pci-id table changes
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/bd305f716d8b64be1926bc7aebe02468ac6bf599
|
||||
bd305f716d8b64be1926bc7aebe02468ac6bf599 qla2xxx: Remove PCI IDs of deprecated adapter
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/803ff9a2c660c094e14d246ef05019bf6008d503
|
||||
803ff9a2c660c094e14d246ef05019bf6008d503 be2iscsi: remove unsupported device IDs
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2cb24399321f555f18b0804d3fe02cf53949fba1
|
||||
2cb24399321f555f18b0804d3fe02cf53949fba1 mptspi: Taint kernel if mptspi is loaded
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ad1740551ff4af49f1ef10a130783d9369e955a0
|
||||
ad1740551ff4af49f1ef10a130783d9369e955a0 hpsa: remove old cciss-based smartarray pci ids
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/4197ba3e766656eea9175c11ed05903620d98a28
|
||||
4197ba3e766656eea9175c11ed05903620d98a28 qla4xxx: Remove deprecated PCI IDs from RHEL 8
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7e285aec22ab1213639afda877902db363473cb0
|
||||
7e285aec22ab1213639afda877902db363473cb0 aacraid: Remove depreciated device and vendor PCI id's
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/846109a16be92155e69731c36dde48761d375153
|
||||
846109a16be92155e69731c36dde48761d375153 megaraid_sas: remove deprecated pci-ids
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6fd2019d01cee7ff36dc047d3ecdb504b968f222
|
||||
6fd2019d01cee7ff36dc047d3ecdb504b968f222 mpt*: remove certain deprecated pci-ids
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/dddcd5c1129b275ff160324036a662739db51fc3
|
||||
dddcd5c1129b275ff160324036a662739db51fc3 kernel: add SUPPORT_REMOVED kernel taint
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/08d77161dba915d1ed0d9fede658085440ab4474
|
||||
08d77161dba915d1ed0d9fede658085440ab4474 Rename RH_DISABLE_DEPRECATED to RHEL_DIFFERENCES
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e2dc2ca6a25a445bf22ceb6a8e38e02706605341
|
||||
e2dc2ca6a25a445bf22ceb6a8e38e02706605341 Add option of 13 for FORCE_MAX_ZONEORDER
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2384646bf71d8c282cf49bb20321fdf802c61cce
|
||||
2384646bf71d8c282cf49bb20321fdf802c61cce s390: Lock down the kernel when the IPL secure flag is set
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5850c93175b9d2e1081873f4bbe08dead202cb08
|
||||
5850c93175b9d2e1081873f4bbe08dead202cb08 efi: Lock down the kernel if booted in secure boot mode
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/53250b991f841be025fa4d264850dadc0fae2861
|
||||
53250b991f841be025fa4d264850dadc0fae2861 efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/72223fd1241cc5c70b96a491db14d54c83beadd8
|
||||
72223fd1241cc5c70b96a491db14d54c83beadd8 security: lockdown: expose a hook to lock the kernel down
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7ba28f03674fa9346610c3fea7fc93bc58f06d2a
|
||||
7ba28f03674fa9346610c3fea7fc93bc58f06d2a Make get_cert_list() use efi_status_to_str() to print error messages.
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2ae9082db0b54d831a9b3782c049d9917e37d89f
|
||||
2ae9082db0b54d831a9b3782c049d9917e37d89f Add efi_status_to_str() and rework efi_status_to_err().
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/cee1461ada1b7e4b92cd154e7ec241119afcd644
|
||||
cee1461ada1b7e4b92cd154e7ec241119afcd644 Add support for deprecating processors
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2420149f8f5fa9dd1e2dc793765b498022922a81
|
||||
2420149f8f5fa9dd1e2dc793765b498022922a81 arm: aarch64: Drop the EXPERT setting from ARM64_FORCE_52BIT
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/1d69b30b98b60aff639351f5788d20a3b17f6e27
|
||||
1d69b30b98b60aff639351f5788d20a3b17f6e27 iommu/arm-smmu: workaround DMA mode issues
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6b2e73e508e7a117b1db91596097c00e5570f64a
|
||||
6b2e73e508e7a117b1db91596097c00e5570f64a rh_kabi: introduce RH_KABI_EXCLUDE
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ecb9206bce179eb600c52642a6753012a69ce4a2
|
||||
ecb9206bce179eb600c52642a6753012a69ce4a2 ipmi: do not configure ipmi for HPE m400
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/473be59fe72afa9969cf8d10609ef3f14f594631
|
||||
473be59fe72afa9969cf8d10609ef3f14f594631 IB/rxe: Mark Soft-RoCE Transport driver as tech-preview
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/b94117795261f9c074a7addca2252238871b5081
|
||||
b94117795261f9c074a7addca2252238871b5081 scsi: smartpqi: add inspur advantech ids
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/cae871558c333880c1687cab6f2a71accf40d105
|
||||
cae871558c333880c1687cab6f2a71accf40d105 ice: mark driver as tech-preview
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7d9cb007404211ea6638bde4a28dd0fbe8d95de0
|
||||
7d9cb007404211ea6638bde4a28dd0fbe8d95de0 kABI: Add generic kABI macros to use for kABI workarounds
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/bd353e9aae8877dd490e6c92b67849e0dcfbab25
|
||||
bd353e9aae8877dd490e6c92b67849e0dcfbab25 add pci_hw_vendor_status()
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/41a259999969bbdfe9f556ce71f2c3c07d7454f4
|
||||
41a259999969bbdfe9f556ce71f2c3c07d7454f4 ahci: thunderx2: Fix for errata that affects stop engine
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2a107343529ce648c11bff62e9f72bbeec738f3f
|
||||
2a107343529ce648c11bff62e9f72bbeec738f3f Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/03e48a48f400a51a182a1254cf22ff0c08706d76
|
||||
03e48a48f400a51a182a1254cf22ff0c08706d76 bpf: Add tech preview taint for syscall
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/607f0e89af7ef5682f79f2eea0a99638a1bc0c4f
|
||||
607f0e89af7ef5682f79f2eea0a99638a1bc0c4f bpf: set unprivileged_bpf_disabled to 1 by default, add a boot parameter
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/31da227877eb734ddb484bc519aae85ce200802e
|
||||
31da227877eb734ddb484bc519aae85ce200802e add Red Hat-specific taint flags
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7a2e2c83be0230667756cccb5bc3687419dfbb8b
|
||||
7a2e2c83be0230667756cccb5bc3687419dfbb8b kdump: fix a grammar issue in a kernel message
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/d345d54d33e7d496c9d845e4723550dd37cb3f88
|
||||
d345d54d33e7d496c9d845e4723550dd37cb3f88 tags.sh: Ignore redhat/rpm
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5c67dc1eb0783a5c4ca4eb5c545ff6fe05facff0
|
||||
5c67dc1eb0783a5c4ca4eb5c545ff6fe05facff0 put RHEL info into generated headers
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ce12884c009ec3bed11100c9d19f6d97628cf8ae
|
||||
ce12884c009ec3bed11100c9d19f6d97628cf8ae kdump: add support for crashkernel=auto
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/18fb1389afccdc5535977a10669b49a37829b55a
|
||||
18fb1389afccdc5535977a10669b49a37829b55a kdump: round up the total memory size to 128M for crashkernel reservation
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5fb9821441cc0b77101ad9c0dfaa747957a4cce4
|
||||
5fb9821441cc0b77101ad9c0dfaa747957a4cce4 acpi: prefer booting with ACPI over DTS
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/0cf21a40db6fca5d89cf3d65808117c8c14e524e
|
||||
0cf21a40db6fca5d89cf3d65808117c8c14e524e aarch64: acpi scan: Fix regression related to X-Gene UARTs
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/de13e14cc2388478d9a2c68c5d90affd92098f11
|
||||
de13e14cc2388478d9a2c68c5d90affd92098f11 ACPI / irq: Workaround firmware issue on X-Gene based m400
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/71c098f4afa38a15a95495c14f71fb087ab27308
|
||||
71c098f4afa38a15a95495c14f71fb087ab27308 modules: add rhelversion MODULE_INFO tag
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/3247f9c838f4aa91aa5d08c152b385d61554d4b5
|
||||
3247f9c838f4aa91aa5d08c152b385d61554d4b5 ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e80982feaa68226ff60d2f83dace2016c35270d3
|
||||
e80982feaa68226ff60d2f83dace2016c35270d3 Add Red Hat tainting
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2987f9a606df106f5bdfa4113eb55356a21085a6
|
||||
2987f9a606df106f5bdfa4113eb55356a21085a6 Introduce CONFIG_RH_DISABLE_DEPRECATED
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/a99885a5e77af594dfdce586cc83e5911d8401ce
|
||||
a99885a5e77af594dfdce586cc83e5911d8401ce Pull the RHEL version defines out of the Makefile
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/cd3a5d30570279538623ea8a1255db0ee4b728f7
|
||||
cd3a5d30570279538623ea8a1255db0ee4b728f7 [initial commit] Add Red Hat variables in the top level makefile
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
From 74e98eb085889b0d2d4908f59f6e00026063014f Mon Sep 17 00:00:00 2001
|
||||
From: Sasha Levin <sasha.levin@oracle.com>
|
||||
Date: Tue, 8 Sep 2015 10:53:40 -0400
|
||||
Subject: [PATCH] RDS: verify the underlying transport exists before creating a
|
||||
connection
|
||||
|
||||
There was no verification that an underlying transport exists when creating
|
||||
a connection, this would cause dereferencing a NULL ptr.
|
||||
|
||||
It might happen on sockets that weren't properly bound before attempting to
|
||||
send a message, which will cause a NULL ptr deref:
|
||||
|
||||
[135546.047719] kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN
|
||||
[135546.051270] Modules linked in:
|
||||
[135546.051781] CPU: 4 PID: 15650 Comm: trinity-c4 Not tainted 4.2.0-next-20150902-sasha-00041-gbaa1222-dirty #2527
|
||||
[135546.053217] task: ffff8800835bc000 ti: ffff8800bc708000 task.ti: ffff8800bc708000
|
||||
[135546.054291] RIP: __rds_conn_create (net/rds/connection.c:194)
|
||||
[135546.055666] RSP: 0018:ffff8800bc70fab0 EFLAGS: 00010202
|
||||
[135546.056457] RAX: dffffc0000000000 RBX: 0000000000000f2c RCX: ffff8800835bc000
|
||||
[135546.057494] RDX: 0000000000000007 RSI: ffff8800835bccd8 RDI: 0000000000000038
|
||||
[135546.058530] RBP: ffff8800bc70fb18 R08: 0000000000000001 R09: 0000000000000000
|
||||
[135546.059556] R10: ffffed014d7a3a23 R11: ffffed014d7a3a21 R12: 0000000000000000
|
||||
[135546.060614] R13: 0000000000000001 R14: ffff8801ec3d0000 R15: 0000000000000000
|
||||
[135546.061668] FS: 00007faad4ffb700(0000) GS:ffff880252000000(0000) knlGS:0000000000000000
|
||||
[135546.062836] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
|
||||
[135546.063682] CR2: 000000000000846a CR3: 000000009d137000 CR4: 00000000000006a0
|
||||
[135546.064723] Stack:
|
||||
[135546.065048] ffffffffafe2055c ffffffffafe23fc1 ffffed00493097bf ffff8801ec3d0008
|
||||
[135546.066247] 0000000000000000 00000000000000d0 0000000000000000 ac194a24c0586342
|
||||
[135546.067438] 1ffff100178e1f78 ffff880320581b00 ffff8800bc70fdd0 ffff880320581b00
|
||||
[135546.068629] Call Trace:
|
||||
[135546.069028] ? __rds_conn_create (include/linux/rcupdate.h:856 net/rds/connection.c:134)
|
||||
[135546.069989] ? rds_message_copy_from_user (net/rds/message.c:298)
|
||||
[135546.071021] rds_conn_create_outgoing (net/rds/connection.c:278)
|
||||
[135546.071981] rds_sendmsg (net/rds/send.c:1058)
|
||||
[135546.072858] ? perf_trace_lock (include/trace/events/lock.h:38)
|
||||
[135546.073744] ? lockdep_init (kernel/locking/lockdep.c:3298)
|
||||
[135546.074577] ? rds_send_drop_to (net/rds/send.c:976)
|
||||
[135546.075508] ? __might_fault (./arch/x86/include/asm/current.h:14 mm/memory.c:3795)
|
||||
[135546.076349] ? __might_fault (mm/memory.c:3795)
|
||||
[135546.077179] ? rds_send_drop_to (net/rds/send.c:976)
|
||||
[135546.078114] sock_sendmsg (net/socket.c:611 net/socket.c:620)
|
||||
[135546.078856] SYSC_sendto (net/socket.c:1657)
|
||||
[135546.079596] ? SYSC_connect (net/socket.c:1628)
|
||||
[135546.080510] ? trace_dump_stack (kernel/trace/trace.c:1926)
|
||||
[135546.081397] ? ring_buffer_unlock_commit (kernel/trace/ring_buffer.c:2479 kernel/trace/ring_buffer.c:2558 kernel/trace/ring_buffer.c:2674)
|
||||
[135546.082390] ? trace_buffer_unlock_commit (kernel/trace/trace.c:1749)
|
||||
[135546.083410] ? trace_event_raw_event_sys_enter (include/trace/events/syscalls.h:16)
|
||||
[135546.084481] ? do_audit_syscall_entry (include/trace/events/syscalls.h:16)
|
||||
[135546.085438] ? trace_buffer_unlock_commit (kernel/trace/trace.c:1749)
|
||||
[135546.085515] rds_ib_laddr_check(): addr 36.74.25.172 ret -99 node type -1
|
||||
|
||||
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
|
||||
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
net/rds/connection.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/net/rds/connection.c b/net/rds/connection.c
|
||||
index 9b2de5e67d79..49adeef8090c 100644
|
||||
--- a/net/rds/connection.c
|
||||
+++ b/net/rds/connection.c
|
||||
@@ -190,6 +190,12 @@ new_conn:
|
||||
}
|
||||
}
|
||||
|
||||
+ if (trans == NULL) {
|
||||
+ kmem_cache_free(rds_conn_slab, conn);
|
||||
+ conn = ERR_PTR(-ENODEV);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
conn->c_trans = trans;
|
||||
|
||||
ret = trans->conn_alloc(conn, gfp);
|
||||
--
|
||||
2.4.3
|
||||
|
25
README.rst
25
README.rst
|
@ -1,25 +0,0 @@
|
|||
===================
|
||||
The Kernel dist-git
|
||||
===================
|
||||
|
||||
The kernel is maintained in a `source tree`_ rather than directly in dist-git.
|
||||
The specfile is maintained as a `template`_ in the source tree along with a set
|
||||
of build scripts to generate configurations, (S)RPMs, and to populate the
|
||||
dist-git repository.
|
||||
|
||||
The `documentation`_ for the source tree covers how to contribute and maintain
|
||||
the tree.
|
||||
|
||||
If you're looking for the downstream patch set it's available in the source
|
||||
tree with "git log master..ark-patches" or
|
||||
`online`_.
|
||||
|
||||
Each release in dist-git is tagged in the source repository so you can easily
|
||||
check out the source tree for a build. The tags are in the format
|
||||
name-version-release, but note release doesn't contain the dist tag since the
|
||||
source can be built in different build roots (Fedora, CentOS, etc.)
|
||||
|
||||
.. _source tree: https://gitlab.com/cki-project/kernel-ark.git
|
||||
.. _template: https://gitlab.com/cki-project/kernel-ark/-/blob/os-build/redhat/kernel.spec.template
|
||||
.. _documentation: https://gitlab.com/cki-project/kernel-ark/-/wikis/home
|
||||
.. _online: https://gitlab.com/cki-project/kernel-ark/-/commits/ark-patches
|
|
@ -0,0 +1,82 @@
|
|||
|
||||
Kernel package tips & tricks.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The kernel is one of the more complicated packages in the distro, and
|
||||
for the newcomer, some of the voodoo in the spec file can be somewhat scary.
|
||||
This file attempts to document some of the magic.
|
||||
|
||||
|
||||
Speeding up make prep
|
||||
---------------------
|
||||
The kernel is nearly 500MB of source code, and as such, 'make prep'
|
||||
takes a while. The spec file employs some trickery so that repeated
|
||||
invocations of make prep don't take as long. Ordinarily the %prep
|
||||
phase of a package will delete the tree it is about to untar/patch.
|
||||
The kernel %prep keeps around an unpatched version of the tree,
|
||||
and makes a symlink tree clone of that clean tree and than applies
|
||||
the patches listed in the spec to the symlink tree.
|
||||
This makes a huge difference if you're doing multiple make preps a day.
|
||||
As an added bonus, doing a diff between the clean tree and the symlink
|
||||
tree is slightly faster than it would be doing two proper copies of the tree.
|
||||
|
||||
|
||||
build logs.
|
||||
-----------
|
||||
There's a convenience helper script in scripts/grab-logs.sh
|
||||
that will grab the build logs from koji for the kernel version reported
|
||||
by make verrel
|
||||
|
||||
|
||||
config heirarchy.
|
||||
-----------------
|
||||
Instead of having to maintain a config file for every arch variant we build on,
|
||||
the kernel spec uses a nested system of configs. At the top level, is
|
||||
config-generic. Add options here that should be present in every possible
|
||||
config on all architectures.
|
||||
|
||||
Beneath this are per-arch overrides. For example config-x86-generic add
|
||||
additional x86 specific options, and also _override_ any options that were
|
||||
set in config-generic.
|
||||
|
||||
The heirarchy looks like this..
|
||||
|
||||
config-generic
|
||||
|
|
||||
config-x86-generic
|
||||
| |
|
||||
config-x86-32-generic config-x86-64-generic
|
||||
|
||||
An option set in a lower level will override the same option set in one
|
||||
of the higher levels.
|
||||
|
||||
|
||||
There exist two additional overrides, config-debug, and config-nodebug,
|
||||
which override -generic, and the per-arch overrides. It is documented
|
||||
further below.
|
||||
|
||||
|
||||
debug options.
|
||||
--------------
|
||||
This is a little complicated, as the purpose & meaning of this changes
|
||||
depending on where we are in the release cycle.
|
||||
If we are building for a current stable release, 'make release' has
|
||||
typically been run already, which sets up the following..
|
||||
- Two builds occur, a 'kernel' and a 'kernel-debug' flavor.
|
||||
- kernel-debug will get various heavyweight debugging options like
|
||||
lockdep etc turned on.
|
||||
|
||||
If we are building for rawhide, 'make debug' has been run, which changes
|
||||
the status quo to:
|
||||
- We only build one kernel 'kernel'
|
||||
- The debug options from 'config-debug' are always turned on.
|
||||
This is done to increase coverage testing, as not many people actually
|
||||
run kernel-debug.
|
||||
|
||||
To add new debug options, add an option to _both_ config-debug and config-nodebug,
|
||||
and also new stanzas to the Makefile 'debug' and 'release' targets.
|
||||
|
||||
Sometimes debug options get added to config-generic, or per-arch overrides
|
||||
instead of config-[no]debug. In this instance, the options should have no
|
||||
discernable performance impact, otherwise they belong in the debug files.
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
From d4ae417828427de74e9f857f9caa49580aecf1fe Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Mar 2012 09:28:15 -0500
|
||||
Subject: [PATCH 06/20] Restrict /dev/mem and /dev/kmem when module loading is
|
||||
restricted
|
||||
|
||||
Allowing users to write to address space makes it possible for the kernel
|
||||
to be subverted, avoiding module loading restrictions. Prevent this when
|
||||
any restrictions have been imposed on loading modules.
|
||||
|
||||
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
---
|
||||
drivers/char/mem.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
|
||||
index 53fe675f9bd7..b52c88860532 100644
|
||||
--- a/drivers/char/mem.c
|
||||
+++ b/drivers/char/mem.c
|
||||
@@ -167,6 +167,9 @@ static ssize_t write_mem(struct file *file, const char __user *buf,
|
||||
if (p != *ppos)
|
||||
return -EFBIG;
|
||||
|
||||
+ if (secure_modules())
|
||||
+ return -EPERM;
|
||||
+
|
||||
if (!valid_phys_addr_range(p, count))
|
||||
return -EFAULT;
|
||||
|
||||
@@ -513,6 +516,9 @@ static ssize_t write_kmem(struct file *file, const char __user *buf,
|
||||
char *kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */
|
||||
int err = 0;
|
||||
|
||||
+ if (secure_modules())
|
||||
+ return -EPERM;
|
||||
+
|
||||
if (p < (unsigned long) high_memory) {
|
||||
unsigned long to_write = min_t(unsigned long, count,
|
||||
(unsigned long)high_memory - p);
|
||||
--
|
||||
2.4.3
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
Config TODOs:
|
||||
* review & disable a bunch of the I2C, RTC, DVB, SOUND options.
|
||||
|
||||
Spec file TODOs:
|
||||
|
||||
* modules-extra: Do a few more things to make it a bit more robust.
|
||||
- Allow for comments in the mod-extra.list file.
|
||||
- Don't fail the build if a module is listed but not built (maybe).
|
||||
- See if it can be tied into Kconfig instead of module names.
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
From 7adc5cbc25dcc47dc3856108d9823d08da75da9d Mon Sep 17 00:00:00 2001
|
||||
From: Kangjie Lu <kangjielu@gmail.com>
|
||||
Date: Tue, 3 May 2016 16:32:16 -0400
|
||||
Subject: [PATCH] USB: usbfs: fix potential infoleak in devio
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The stack object “ci” has a total size of 8 bytes. Its last 3 bytes
|
||||
are padding bytes which are not initialized and leaked to userland
|
||||
via “copy_to_user”.
|
||||
|
||||
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/usb/core/devio.c | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
|
||||
index 52c4461dfccd..9b7f1f75e887 100644
|
||||
--- a/drivers/usb/core/devio.c
|
||||
+++ b/drivers/usb/core/devio.c
|
||||
@@ -1316,10 +1316,11 @@ static int proc_getdriver(struct usb_dev_state *ps, void __user *arg)
|
||||
|
||||
static int proc_connectinfo(struct usb_dev_state *ps, void __user *arg)
|
||||
{
|
||||
- struct usbdevfs_connectinfo ci = {
|
||||
- .devnum = ps->dev->devnum,
|
||||
- .slow = ps->dev->speed == USB_SPEED_LOW
|
||||
- };
|
||||
+ struct usbdevfs_connectinfo ci;
|
||||
+
|
||||
+ memset(&ci, 0, sizeof(ci));
|
||||
+ ci.devnum = ps->dev->devnum;
|
||||
+ ci.slow = ps->dev->speed == USB_SPEED_LOW;
|
||||
|
||||
if (copy_to_user(arg, &ci, sizeof(ci)))
|
||||
return -EFAULT;
|
||||
--
|
||||
2.5.5
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
From 10d98bced414c6fc1d09db123e7f762d91b5ebea Mon Sep 17 00:00:00 2001
|
||||
From: Johan Hovold <johan@kernel.org>
|
||||
Date: Wed, 23 Sep 2015 11:41:42 -0700
|
||||
Subject: [PATCH] USB: whiteheat: fix potential null-deref at probe
|
||||
|
||||
Fix potential null-pointer dereference at probe by making sure that the
|
||||
required endpoints are present.
|
||||
|
||||
The whiteheat driver assumes there are at least five pairs of bulk
|
||||
endpoints, of which the final pair is used for the "command port". An
|
||||
attempt to bind to an interface with fewer bulk endpoints would
|
||||
currently lead to an oops.
|
||||
|
||||
Fixes CVE-2015-5257.
|
||||
|
||||
Reported-by: Moein Ghasemzadeh <moein@istuary.com>
|
||||
Cc: stable <stable@vger.kernel.org>
|
||||
Signed-off-by: Johan Hovold <johan@kernel.org>
|
||||
---
|
||||
drivers/usb/serial/whiteheat.c | 31 +++++++++++++++++++++++++++++++
|
||||
1 file changed, 31 insertions(+)
|
||||
|
||||
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
|
||||
index 6c3734d2b45a..d3ea90bef84d 100644
|
||||
--- a/drivers/usb/serial/whiteheat.c
|
||||
+++ b/drivers/usb/serial/whiteheat.c
|
||||
@@ -80,6 +80,8 @@ static int whiteheat_firmware_download(struct usb_serial *serial,
|
||||
static int whiteheat_firmware_attach(struct usb_serial *serial);
|
||||
|
||||
/* function prototypes for the Connect Tech WhiteHEAT serial converter */
|
||||
+static int whiteheat_probe(struct usb_serial *serial,
|
||||
+ const struct usb_device_id *id);
|
||||
static int whiteheat_attach(struct usb_serial *serial);
|
||||
static void whiteheat_release(struct usb_serial *serial);
|
||||
static int whiteheat_port_probe(struct usb_serial_port *port);
|
||||
@@ -116,6 +118,7 @@ static struct usb_serial_driver whiteheat_device = {
|
||||
.description = "Connect Tech - WhiteHEAT",
|
||||
.id_table = id_table_std,
|
||||
.num_ports = 4,
|
||||
+ .probe = whiteheat_probe,
|
||||
.attach = whiteheat_attach,
|
||||
.release = whiteheat_release,
|
||||
.port_probe = whiteheat_port_probe,
|
||||
@@ -217,6 +220,34 @@ static int whiteheat_firmware_attach(struct usb_serial *serial)
|
||||
/*****************************************************************************
|
||||
* Connect Tech's White Heat serial driver functions
|
||||
*****************************************************************************/
|
||||
+
|
||||
+static int whiteheat_probe(struct usb_serial *serial,
|
||||
+ const struct usb_device_id *id)
|
||||
+{
|
||||
+ struct usb_host_interface *iface_desc;
|
||||
+ struct usb_endpoint_descriptor *endpoint;
|
||||
+ size_t num_bulk_in = 0;
|
||||
+ size_t num_bulk_out = 0;
|
||||
+ size_t min_num_bulk;
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ iface_desc = serial->interface->cur_altsetting;
|
||||
+
|
||||
+ for (i = 0; i < iface_desc->desc.bNumEndpoints; i++) {
|
||||
+ endpoint = &iface_desc->endpoint[i].desc;
|
||||
+ if (usb_endpoint_is_bulk_in(endpoint))
|
||||
+ ++num_bulk_in;
|
||||
+ if (usb_endpoint_is_bulk_out(endpoint))
|
||||
+ ++num_bulk_out;
|
||||
+ }
|
||||
+
|
||||
+ min_num_bulk = COMMAND_PORT + 1;
|
||||
+ if (num_bulk_in < min_num_bulk || num_bulk_out < min_num_bulk)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int whiteheat_attach(struct usb_serial *serial)
|
||||
{
|
||||
struct usb_serial_port *command_port;
|
||||
--
|
||||
2.4.3
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
From 32d3dc2147823a32c8a7771d8fe0f2d1ef057c6a Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@redhat.com>
|
||||
Date: Mon, 25 Jun 2012 19:57:30 -0400
|
||||
Subject: [PATCH 07/20] acpi: Ignore acpi_rsdp kernel parameter when module
|
||||
loading is restricted
|
||||
|
||||
This option allows userspace to pass the RSDP address to the kernel, which
|
||||
makes it possible for a user to circumvent any restrictions imposed on
|
||||
loading modules. Disable it in that case.
|
||||
|
||||
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
|
||||
---
|
||||
drivers/acpi/osl.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
|
||||
index 739a4a6b3b9b..9ef2a020a7a9 100644
|
||||
--- a/drivers/acpi/osl.c
|
||||
+++ b/drivers/acpi/osl.c
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/semaphore.h>
|
||||
+#include <linux/module.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/uaccess.h>
|
||||
@@ -253,7 +254,7 @@ early_param("acpi_rsdp", setup_acpi_rsdp);
|
||||
acpi_physical_address __init acpi_os_get_root_pointer(void)
|
||||
{
|
||||
#ifdef CONFIG_KEXEC
|
||||
- if (acpi_rsdp)
|
||||
+ if (acpi_rsdp && !secure_modules())
|
||||
return acpi_rsdp;
|
||||
#endif
|
||||
|
||||
--
|
||||
2.4.3
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 3 Mar 2015 08:31:24 +0100
|
||||
Subject: [PATCH] acpi: video: Add force native backlight quirk for Lenovo
|
||||
Ideapad Z570
|
||||
|
||||
The Lenovo Ideapad Z570 (which is an Acer in disguise like some other Ideapads)
|
||||
has a broken acpi_video interface, this was fixed in commmit a11d342fb8
|
||||
("ACPI / video: force vendor backlight on Lenovo Ideapad Z570").
|
||||
|
||||
Which stops acpi_video from registering a backlight interface, but this is
|
||||
only a partial fix, because for people who have the ideapad-laptop module
|
||||
installed that module will now register a backlight interface, which also
|
||||
does not work, so we need to use the native intel_backlight interface.
|
||||
|
||||
The Lenovo Ideapad 570 is a pre-win8 laptop / too old for the acpi-video code
|
||||
to automatically prefer the native backlight interface, so add a quirk for it.
|
||||
|
||||
This commit also removes the previous incomplete fix.
|
||||
|
||||
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1187004
|
||||
Cc: Stepan Bujnak <stepanbujnak@fastmail.fm>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/acpi/video.c | 17 +++++++++++++++++
|
||||
drivers/acpi/video_detect.c | 8 --------
|
||||
2 files changed, 17 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
|
||||
index 70ea37bea84f..d9bf8ba7d848 100644
|
||||
--- a/drivers/acpi/video.c
|
||||
+++ b/drivers/acpi/video.c
|
||||
@@ -425,6 +425,12 @@ static int __init video_disable_native_backlight(const struct dmi_system_id *d)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int __init video_enable_native_backlight(const struct dmi_system_id *d)
|
||||
+{
|
||||
+ use_native_backlight_dmi = NATIVE_BACKLIGHT_ON;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static struct dmi_system_id video_dmi_table[] __initdata = {
|
||||
/*
|
||||
* Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
|
||||
@@ -566,6 +572,17 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "XPS L521X"),
|
||||
},
|
||||
},
|
||||
+
|
||||
+ /* Non win8 machines which need native backlight nevertheless */
|
||||
+ {
|
||||
+ /* https://bugzilla.redhat.com/show_bug.cgi?id=1187004 */
|
||||
+ .callback = video_enable_native_backlight,
|
||||
+ .ident = "Lenovo Ideapad Z570",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "102434U"),
|
||||
+ },
|
||||
+ },
|
||||
{}
|
||||
};
|
||||
|
||||
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
|
||||
index 27c43499977a..c42feb2bacd0 100644
|
||||
--- a/drivers/acpi/video_detect.c
|
||||
+++ b/drivers/acpi/video_detect.c
|
||||
@@ -174,14 +174,6 @@ static struct dmi_system_id video_detect_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 5737"),
|
||||
},
|
||||
},
|
||||
- {
|
||||
- .callback = video_detect_force_vendor,
|
||||
- .ident = "Lenovo IdeaPad Z570",
|
||||
- .matches = {
|
||||
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
- DMI_MATCH(DMI_PRODUCT_VERSION, "Ideapad Z570"),
|
||||
- },
|
||||
- },
|
||||
{ },
|
||||
};
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
From: Aaron Lu <aaron.lu@intel.com>
|
||||
Date: Wed, 11 Mar 2015 14:14:56 +0800
|
||||
Subject: [PATCH] acpi: video: Allow forcing native backlight on non win8
|
||||
machines
|
||||
|
||||
The native backlight behavior (so not registering both the acpi-video
|
||||
and the vendor backlight driver) can be useful on some non win8 machines
|
||||
too, so change the behavior of the video.use_native_backlight=1 or 0
|
||||
kernel cmdline option to be: if user has set video.use_native_backlight=1
|
||||
or 0, use that no matter if it is a win8 system or not. Also, we will
|
||||
put some known systems into the DMI table to make them either use native
|
||||
backlight interface or not, and the use_native_backlight_dmi is used to
|
||||
reflect that.
|
||||
|
||||
Original-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
|
||||
Acked-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/acpi/video.c | 19 +++++++++++++------
|
||||
1 file changed, 13 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
|
||||
index db70d550f526..70ea37bea84f 100644
|
||||
--- a/drivers/acpi/video.c
|
||||
+++ b/drivers/acpi/video.c
|
||||
@@ -82,9 +82,15 @@ module_param(allow_duplicates, bool, 0644);
|
||||
* For Windows 8 systems: used to decide if video module
|
||||
* should skip registering backlight interface of its own.
|
||||
*/
|
||||
-static int use_native_backlight_param = -1;
|
||||
+enum {
|
||||
+ NATIVE_BACKLIGHT_NOT_SET = -1,
|
||||
+ NATIVE_BACKLIGHT_OFF,
|
||||
+ NATIVE_BACKLIGHT_ON,
|
||||
+};
|
||||
+
|
||||
+static int use_native_backlight_param = NATIVE_BACKLIGHT_NOT_SET;
|
||||
module_param_named(use_native_backlight, use_native_backlight_param, int, 0444);
|
||||
-static bool use_native_backlight_dmi = true;
|
||||
+static int use_native_backlight_dmi = NATIVE_BACKLIGHT_NOT_SET;
|
||||
|
||||
static int register_count;
|
||||
static struct mutex video_list_lock;
|
||||
@@ -237,15 +243,16 @@ static void acpi_video_switch_brightness(struct work_struct *work);
|
||||
|
||||
static bool acpi_video_use_native_backlight(void)
|
||||
{
|
||||
- if (use_native_backlight_param != -1)
|
||||
+ if (use_native_backlight_param != NATIVE_BACKLIGHT_NOT_SET)
|
||||
return use_native_backlight_param;
|
||||
- else
|
||||
+ else if (use_native_backlight_dmi != NATIVE_BACKLIGHT_NOT_SET)
|
||||
return use_native_backlight_dmi;
|
||||
+ return acpi_osi_is_win8();
|
||||
}
|
||||
|
||||
bool acpi_video_verify_backlight_support(void)
|
||||
{
|
||||
- if (acpi_osi_is_win8() && acpi_video_use_native_backlight() &&
|
||||
+ if (acpi_video_use_native_backlight() &&
|
||||
backlight_device_registered(BACKLIGHT_RAW))
|
||||
return false;
|
||||
return acpi_video_backlight_support();
|
||||
@@ -414,7 +421,7 @@ static int __init video_set_bqc_offset(const struct dmi_system_id *d)
|
||||
|
||||
static int __init video_disable_native_backlight(const struct dmi_system_id *d)
|
||||
{
|
||||
- use_native_backlight_dmi = false;
|
||||
+ use_native_backlight_dmi = NATIVE_BACKLIGHT_OFF;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,227 @@
|
|||
From c18d8f5095715c56bb3cd9cba64242542632054b Mon Sep 17 00:00:00 2001
|
||||
From: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
Date: Wed, 16 Mar 2016 13:33:34 -0500
|
||||
Subject: rtlwifi: rtl8723be: Add antenna select module parameter
|
||||
|
||||
A number of new laptops have been delivered with only a single antenna.
|
||||
In principle, this is OK; however, a problem arises when the on-board
|
||||
EEPROM is programmed to use the other antenna connection. The option
|
||||
of opening the computer and moving the connector is not always possible
|
||||
as it will void the warranty in some cases. In addition, this solution
|
||||
breaks the Windows driver when the box dual boots Linux and Windows.
|
||||
|
||||
A fix involving a new module parameter has been developed. This commit
|
||||
adds the new parameter and implements the changes needed for the driver.
|
||||
|
||||
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
Cc: Stable <stable@vger.kernel.org> [V4.0+]
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 5 +++++
|
||||
drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 3 +++
|
||||
drivers/net/wireless/realtek/rtlwifi/wifi.h | 3 +++
|
||||
3 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
|
||||
index c983d2f..5a3df91 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
|
||||
@@ -2684,6 +2684,7 @@ void rtl8723be_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw,
|
||||
bool auto_load_fail, u8 *hwinfo)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ struct rtl_mod_params *mod_params = rtlpriv->cfg->mod_params;
|
||||
u8 value;
|
||||
u32 tmpu_32;
|
||||
|
||||
@@ -2702,6 +2703,10 @@ void rtl8723be_read_bt_coexist_info_from_hwpg(struct ieee80211_hw *hw,
|
||||
rtlpriv->btcoexist.btc_info.ant_num = ANT_X2;
|
||||
}
|
||||
|
||||
+ /* override ant_num / ant_path */
|
||||
+ if (mod_params->ant_sel)
|
||||
+ rtlpriv->btcoexist.btc_info.ant_num =
|
||||
+ (mod_params->ant_sel == 1 ? ANT_X2 : ANT_X1);
|
||||
}
|
||||
|
||||
void rtl8723be_bt_reg_init(struct ieee80211_hw *hw)
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
|
||||
index a78eaed..2101793 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c
|
||||
@@ -273,6 +273,7 @@ static struct rtl_mod_params rtl8723be_mod_params = {
|
||||
.msi_support = false,
|
||||
.disable_watchdog = false,
|
||||
.debug = DBG_EMERG,
|
||||
+ .ant_sel = 0,
|
||||
};
|
||||
|
||||
static struct rtl_hal_cfg rtl8723be_hal_cfg = {
|
||||
@@ -394,6 +395,7 @@ module_param_named(fwlps, rtl8723be_mod_params.fwctrl_lps, bool, 0444);
|
||||
module_param_named(msi, rtl8723be_mod_params.msi_support, bool, 0444);
|
||||
module_param_named(disable_watchdog, rtl8723be_mod_params.disable_watchdog,
|
||||
bool, 0444);
|
||||
+module_param_named(ant_sel, rtl8723be_mod_params.ant_sel, int, 0444);
|
||||
MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
|
||||
MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 1)\n");
|
||||
MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
|
||||
@@ -402,6 +404,7 @@ MODULE_PARM_DESC(msi, "Set to 1 to use MSI interrupts mode (default 0)\n");
|
||||
MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)");
|
||||
MODULE_PARM_DESC(disable_watchdog,
|
||||
"Set to 1 to disable the watchdog (default 0)\n");
|
||||
+MODULE_PARM_DESC(ant_sel, "Set to 1 or 2 to force antenna number (default 0)\n");
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume);
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
||||
index 554d814..93bd7fc 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
||||
@@ -2246,6 +2246,9 @@ struct rtl_mod_params {
|
||||
|
||||
/* default 0: 1 means do not disable interrupts */
|
||||
bool int_clear;
|
||||
+
|
||||
+ /* select antenna */
|
||||
+ int ant_sel;
|
||||
};
|
||||
|
||||
struct rtl_hal_usbint_cfg {
|
||||
--
|
||||
cgit v0.12
|
||||
|
||||
From baa1702290953295e421f0f433e2b1ff4815827c Mon Sep 17 00:00:00 2001
|
||||
From: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
Date: Wed, 16 Mar 2016 13:33:35 -0500
|
||||
Subject: rtlwifi: btcoexist: Implement antenna selection
|
||||
|
||||
The previous patch added an option to rtl8723be to manually select the
|
||||
antenna for those cases when only a single antenna is present, and the
|
||||
on-board EEPROM is incorrectly programmed. This patch implements the
|
||||
necessary changes in the Bluetooth coexistence driver.
|
||||
|
||||
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
|
||||
Cc: Stable <stable@vger.kernel.org> [V4.0+]
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 9 ++++++--
|
||||
.../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 27 +++++++++++++++++++++-
|
||||
.../realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 2 +-
|
||||
.../wireless/realtek/rtlwifi/btcoexist/rtl_btc.c | 5 +++-
|
||||
4 files changed, 38 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
|
||||
index c43ab59..77cbd10 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
|
||||
@@ -1203,7 +1203,6 @@ static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist,
|
||||
|
||||
/* Force GNT_BT to low */
|
||||
btcoexist->btc_write_1byte_bitmask(btcoexist, 0x765, 0x18, 0x0);
|
||||
- btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0);
|
||||
|
||||
if (board_info->btdm_ant_pos == BTC_ANTENNA_AT_MAIN_PORT) {
|
||||
/* tell firmware "no antenna inverse" */
|
||||
@@ -1211,19 +1210,25 @@ static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist,
|
||||
h2c_parameter[1] = 1; /* ext switch type */
|
||||
btcoexist->btc_fill_h2c(btcoexist, 0x65, 2,
|
||||
h2c_parameter);
|
||||
+ btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0);
|
||||
} else {
|
||||
/* tell firmware "antenna inverse" */
|
||||
h2c_parameter[0] = 1;
|
||||
h2c_parameter[1] = 1; /* ext switch type */
|
||||
btcoexist->btc_fill_h2c(btcoexist, 0x65, 2,
|
||||
h2c_parameter);
|
||||
+ btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280);
|
||||
}
|
||||
}
|
||||
|
||||
/* ext switch setting */
|
||||
if (use_ext_switch) {
|
||||
/* fixed internal switch S1->WiFi, S0->BT */
|
||||
- btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0);
|
||||
+ if (board_info->btdm_ant_pos == BTC_ANTENNA_AT_MAIN_PORT)
|
||||
+ btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0);
|
||||
+ else
|
||||
+ btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280);
|
||||
+
|
||||
switch (antpos_type) {
|
||||
case BTC_ANT_WIFI_AT_MAIN:
|
||||
/* ext switch main at wifi */
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
|
||||
index b2791c8..babd149 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
|
||||
@@ -965,13 +965,38 @@ void exhalbtc_set_chip_type(u8 chip_type)
|
||||
}
|
||||
}
|
||||
|
||||
-void exhalbtc_set_ant_num(u8 type, u8 ant_num)
|
||||
+void exhalbtc_set_ant_num(struct rtl_priv *rtlpriv, u8 type, u8 ant_num)
|
||||
{
|
||||
if (BT_COEX_ANT_TYPE_PG == type) {
|
||||
gl_bt_coexist.board_info.pg_ant_num = ant_num;
|
||||
gl_bt_coexist.board_info.btdm_ant_num = ant_num;
|
||||
+ /* The antenna position:
|
||||
+ * Main (default) or Aux for pgAntNum=2 && btdmAntNum =1.
|
||||
+ * The antenna position should be determined by
|
||||
+ * auto-detect mechanism.
|
||||
+ * The following is assumed to main,
|
||||
+ * and those must be modified
|
||||
+ * if y auto-detect mechanism is ready
|
||||
+ */
|
||||
+ if ((gl_bt_coexist.board_info.pg_ant_num == 2) &&
|
||||
+ (gl_bt_coexist.board_info.btdm_ant_num == 1))
|
||||
+ gl_bt_coexist.board_info.btdm_ant_pos =
|
||||
+ BTC_ANTENNA_AT_MAIN_PORT;
|
||||
+ else
|
||||
+ gl_bt_coexist.board_info.btdm_ant_pos =
|
||||
+ BTC_ANTENNA_AT_MAIN_PORT;
|
||||
} else if (BT_COEX_ANT_TYPE_ANTDIV == type) {
|
||||
gl_bt_coexist.board_info.btdm_ant_num = ant_num;
|
||||
+ gl_bt_coexist.board_info.btdm_ant_pos =
|
||||
+ BTC_ANTENNA_AT_MAIN_PORT;
|
||||
+ } else if (type == BT_COEX_ANT_TYPE_DETECTED) {
|
||||
+ gl_bt_coexist.board_info.btdm_ant_num = ant_num;
|
||||
+ if (rtlpriv->cfg->mod_params->ant_sel == 1)
|
||||
+ gl_bt_coexist.board_info.btdm_ant_pos =
|
||||
+ BTC_ANTENNA_AT_AUX_PORT;
|
||||
+ else
|
||||
+ gl_bt_coexist.board_info.btdm_ant_pos =
|
||||
+ BTC_ANTENNA_AT_MAIN_PORT;
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
|
||||
index 0a903ea..f41ca57 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h
|
||||
@@ -535,7 +535,7 @@ void exhalbtc_set_bt_patch_version(u16 bt_hci_version, u16 bt_patch_version);
|
||||
void exhalbtc_update_min_bt_rssi(char bt_rssi);
|
||||
void exhalbtc_set_bt_exist(bool bt_exist);
|
||||
void exhalbtc_set_chip_type(u8 chip_type);
|
||||
-void exhalbtc_set_ant_num(u8 type, u8 ant_num);
|
||||
+void exhalbtc_set_ant_num(struct rtl_priv *rtlpriv, u8 type, u8 ant_num);
|
||||
void exhalbtc_display_bt_coex_info(struct btc_coexist *btcoexist);
|
||||
void exhalbtc_signal_compensation(struct btc_coexist *btcoexist,
|
||||
u8 *rssi_wifi, u8 *rssi_bt);
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
|
||||
index b9b0cb7..d3fd921 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c
|
||||
@@ -72,7 +72,10 @@ void rtl_btc_init_hal_vars(struct rtl_priv *rtlpriv)
|
||||
__func__, bt_type);
|
||||
exhalbtc_set_chip_type(bt_type);
|
||||
|
||||
- exhalbtc_set_ant_num(BT_COEX_ANT_TYPE_PG, ant_num);
|
||||
+ if (rtlpriv->cfg->mod_params->ant_sel == 1)
|
||||
+ exhalbtc_set_ant_num(rtlpriv, BT_COEX_ANT_TYPE_DETECTED, 1);
|
||||
+ else
|
||||
+ exhalbtc_set_ant_num(rtlpriv, BT_COEX_ANT_TYPE_PG, ant_num);
|
||||
}
|
||||
|
||||
void rtl_btc_init_hw_config(struct rtl_priv *rtlpriv)
|
||||
--
|
||||
cgit v0.12
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
From bb3e08008c0e48fd4f51a0f0957eecae61a24d69 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Tue, 1 Nov 2016 09:35:30 +0000
|
||||
Subject: [PATCH] Revert "mmc: omap_hsmmc: Use dma_request_chan() for
|
||||
requesting DMA channel"
|
||||
|
||||
This reverts commit 81eef6ca92014845d40e3f1310e42b7010303acc.
|
||||
---
|
||||
drivers/mmc/host/omap_hsmmc.c | 50 ++++++++++++++++++++++++++++++++++---------
|
||||
1 file changed, 40 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
|
||||
index 24ebc9a..3563321 100644
|
||||
--- a/drivers/mmc/host/omap_hsmmc.c
|
||||
+++ b/drivers/mmc/host/omap_hsmmc.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/of_device.h>
|
||||
+#include <linux/omap-dmaengine.h>
|
||||
#include <linux/mmc/host.h>
|
||||
#include <linux/mmc/core.h>
|
||||
#include <linux/mmc/mmc.h>
|
||||
@@ -1992,6 +1993,8 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
|
||||
struct resource *res;
|
||||
int ret, irq;
|
||||
const struct of_device_id *match;
|
||||
+ dma_cap_mask_t mask;
|
||||
+ unsigned tx_req, rx_req;
|
||||
const struct omap_mmc_of_data *data;
|
||||
void __iomem *base;
|
||||
|
||||
@@ -2121,17 +2124,44 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
|
||||
|
||||
omap_hsmmc_conf_bus_power(host);
|
||||
|
||||
- host->rx_chan = dma_request_chan(&pdev->dev, "rx");
|
||||
- if (IS_ERR(host->rx_chan)) {
|
||||
- dev_err(mmc_dev(host->mmc), "RX DMA channel request failed\n");
|
||||
- ret = PTR_ERR(host->rx_chan);
|
||||
+ if (!pdev->dev.of_node) {
|
||||
+ res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
|
||||
+ if (!res) {
|
||||
+ dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n");
|
||||
+ ret = -ENXIO;
|
||||
+ goto err_irq;
|
||||
+ }
|
||||
+ tx_req = res->start;
|
||||
+
|
||||
+ res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
|
||||
+ if (!res) {
|
||||
+ dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n");
|
||||
+ ret = -ENXIO;
|
||||
+ goto err_irq;
|
||||
+ }
|
||||
+ rx_req = res->start;
|
||||
+ }
|
||||
+
|
||||
+ dma_cap_zero(mask);
|
||||
+ dma_cap_set(DMA_SLAVE, mask);
|
||||
+
|
||||
+ host->rx_chan =
|
||||
+ dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
|
||||
+ &rx_req, &pdev->dev, "rx");
|
||||
+
|
||||
+ if (!host->rx_chan) {
|
||||
+ dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel\n");
|
||||
+ ret = -ENXIO;
|
||||
goto err_irq;
|
||||
}
|
||||
|
||||
- host->tx_chan = dma_request_chan(&pdev->dev, "tx");
|
||||
- if (IS_ERR(host->tx_chan)) {
|
||||
- dev_err(mmc_dev(host->mmc), "TX DMA channel request failed\n");
|
||||
- ret = PTR_ERR(host->tx_chan);
|
||||
+ host->tx_chan =
|
||||
+ dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
|
||||
+ &tx_req, &pdev->dev, "tx");
|
||||
+
|
||||
+ if (!host->tx_chan) {
|
||||
+ dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel\n");
|
||||
+ ret = -ENXIO;
|
||||
goto err_irq;
|
||||
}
|
||||
|
||||
@@ -2189,9 +2219,9 @@ err_slot_name:
|
||||
mmc_remove_host(mmc);
|
||||
err_irq:
|
||||
device_init_wakeup(&pdev->dev, false);
|
||||
- if (!IS_ERR_OR_NULL(host->tx_chan))
|
||||
+ if (host->tx_chan)
|
||||
dma_release_channel(host->tx_chan);
|
||||
- if (!IS_ERR_OR_NULL(host->rx_chan))
|
||||
+ if (host->rx_chan)
|
||||
dma_release_channel(host->rx_chan);
|
||||
pm_runtime_dont_use_autosuspend(host->dev);
|
||||
pm_runtime_put_sync(host->dev);
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,596 @@
|
|||
From patchwork Fri Aug 12 11:07:14 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v9,1/4] of/serial: move earlycon early_param handling to serial
|
||||
From: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
X-Patchwork-Id: 9276727
|
||||
Message-Id: <20160812110717.12351-1-aleksey.makarov@linaro.org>
|
||||
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Cc: linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
|
||||
Aleksey Makarov <aleksey.makarov@linaro.org>,
|
||||
Russell King <linux@arm.linux.org.uk>, Len Brown <lenb@kernel.org>,
|
||||
Leif Lindholm <leif.lindholm@linaro.org>,
|
||||
Graeme Gregory <graeme.gregory@linaro.org>, Al Stone <ahs3@redhat.com>,
|
||||
Christopher Covington <cov@codeaurora.org>,
|
||||
Yury Norov <ynorov@caviumnetworks.com>,
|
||||
Peter Hurley <peter@hurleysoftware.com>,
|
||||
Andy Shevchenko <andy.shevchenko@gmail.com>,
|
||||
"Zheng, Lv" <lv.zheng@intel.com>, Mark Salter <msalter@redhat.com>,
|
||||
Kefeng Wang <wangkefeng.wang@huawei.com>,
|
||||
Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>,
|
||||
Jiri Slaby <jslaby@suse.com>, devicetree@vger.kernel.org
|
||||
Date: Fri, 12 Aug 2016 14:07:14 +0300
|
||||
|
||||
From: Leif Lindholm <leif.lindholm@linaro.org>
|
||||
|
||||
We have multiple "earlycon" early_param handlers - merge the DT one into
|
||||
the main earlycon one. It's a cleanup that also will be useful
|
||||
to defer setting up DT console until ACPI/DT decision is made.
|
||||
|
||||
Rename the exported function to avoid clashing with the function from
|
||||
arch/microblaze/kernel/prom.c
|
||||
|
||||
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
|
||||
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
|
||||
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
|
||||
---
|
||||
drivers/of/fdt.c | 11 +----------
|
||||
drivers/tty/serial/earlycon.c | 2 +-
|
||||
include/linux/of_fdt.h | 3 +++
|
||||
3 files changed, 5 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
|
||||
index 55f1b83..741cac53 100644
|
||||
--- a/drivers/of/fdt.c
|
||||
+++ b/drivers/of/fdt.c
|
||||
@@ -924,7 +924,7 @@ static inline void early_init_dt_check_for_initrd(unsigned long node)
|
||||
|
||||
#ifdef CONFIG_SERIAL_EARLYCON
|
||||
|
||||
-static int __init early_init_dt_scan_chosen_serial(void)
|
||||
+int __init early_init_dt_scan_chosen_stdout(void)
|
||||
{
|
||||
int offset;
|
||||
const char *p, *q, *options = NULL;
|
||||
@@ -968,15 +968,6 @@ static int __init early_init_dt_scan_chosen_serial(void)
|
||||
}
|
||||
return -ENODEV;
|
||||
}
|
||||
-
|
||||
-static int __init setup_of_earlycon(char *buf)
|
||||
-{
|
||||
- if (buf)
|
||||
- return 0;
|
||||
-
|
||||
- return early_init_dt_scan_chosen_serial();
|
||||
-}
|
||||
-early_param("earlycon", setup_of_earlycon);
|
||||
#endif
|
||||
|
||||
/**
|
||||
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
|
||||
index 067783f..7aae655 100644
|
||||
--- a/drivers/tty/serial/earlycon.c
|
||||
+++ b/drivers/tty/serial/earlycon.c
|
||||
@@ -209,7 +209,7 @@ static int __init param_setup_earlycon(char *buf)
|
||||
* don't generate a warning from parse_early_params() in that case
|
||||
*/
|
||||
if (!buf || !buf[0])
|
||||
- return 0;
|
||||
+ return early_init_dt_scan_chosen_stdout();
|
||||
|
||||
err = setup_earlycon(buf);
|
||||
if (err == -ENOENT || err == -EALREADY)
|
||||
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
|
||||
index 26c3302..4341f32 100644
|
||||
--- a/include/linux/of_fdt.h
|
||||
+++ b/include/linux/of_fdt.h
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
+#include <linux/errno.h>
|
||||
|
||||
/* Definitions used by the flattened device tree */
|
||||
#define OF_DT_HEADER 0xd00dfeed /* marker */
|
||||
@@ -66,6 +67,7 @@ extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,
|
||||
int depth, void *data);
|
||||
extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
|
||||
int depth, void *data);
|
||||
+extern int early_init_dt_scan_chosen_stdout(void);
|
||||
extern void early_init_fdt_scan_reserved_mem(void);
|
||||
extern void early_init_fdt_reserve_self(void);
|
||||
extern void early_init_dt_add_memory_arch(u64 base, u64 size);
|
||||
@@ -94,6 +96,7 @@ extern void early_get_first_memblock_info(void *, phys_addr_t *);
|
||||
extern u64 of_flat_dt_translate_address(unsigned long node);
|
||||
extern void of_fdt_limit_memory(int limit);
|
||||
#else /* CONFIG_OF_FLATTREE */
|
||||
+static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; }
|
||||
static inline void early_init_fdt_scan_reserved_mem(void) {}
|
||||
static inline void early_init_fdt_reserve_self(void) {}
|
||||
static inline const char *of_flat_dt_get_machine_name(void) { return NULL; }
|
||||
From patchwork Thu Aug 11 15:31:39 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v9,2/4] ACPI: parse SPCR and enable matching console
|
||||
From: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
X-Patchwork-Id: 9275443
|
||||
Message-Id: <20160811153152.755-3-aleksey.makarov@linaro.org>
|
||||
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Cc: linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
|
||||
Aleksey Makarov <aleksey.makarov@linaro.org>,
|
||||
Russell King <linux@arm.linux.org.uk>, Len Brown <lenb@kernel.org>,
|
||||
Leif Lindholm <leif.lindholm@linaro.org>,
|
||||
Graeme Gregory <graeme.gregory@linaro.org>, Al Stone <ahs3@redhat.com>,
|
||||
Christopher Covington <cov@codeaurora.org>,
|
||||
Yury Norov <ynorov@caviumnetworks.com>,
|
||||
Peter Hurley <peter@hurleysoftware.com>,
|
||||
Andy Shevchenko <andy.shevchenko@gmail.com>,
|
||||
"Zheng, Lv" <lv.zheng@intel.com>, Mark Salter <msalter@redhat.com>,
|
||||
Kefeng Wang <wangkefeng.wang@huawei.com>, Jiri Slaby <jslaby@suse.com>
|
||||
Date: Thu, 11 Aug 2016 18:31:39 +0300
|
||||
|
||||
'ARM Server Base Boot Requiremets' [1] mentions SPCR (Serial Port
|
||||
Console Redirection Table) [2] as a mandatory ACPI table that
|
||||
specifies the configuration of serial console.
|
||||
|
||||
Defer initialization of DT earlycon until ACPI/DT decision is made.
|
||||
|
||||
Parse the ACPI SPCR table, setup earlycon if required,
|
||||
enable specified console.
|
||||
|
||||
Thanks to Peter Hurley for explaining how this should work.
|
||||
|
||||
[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0044a/index.html
|
||||
[2] https://msdn.microsoft.com/en-us/library/windows/hardware/dn639132(v=vs.85).aspx
|
||||
|
||||
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
|
||||
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
|
||||
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
---
|
||||
drivers/acpi/Kconfig | 3 ++
|
||||
drivers/acpi/Makefile | 1 +
|
||||
drivers/acpi/spcr.c | 111 ++++++++++++++++++++++++++++++++++++++++++
|
||||
drivers/tty/serial/earlycon.c | 19 +++++++-
|
||||
include/linux/acpi.h | 6 +++
|
||||
include/linux/serial_core.h | 9 +++-
|
||||
6 files changed, 146 insertions(+), 3 deletions(-)
|
||||
create mode 100644 drivers/acpi/spcr.c
|
||||
|
||||
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
|
||||
index 6cef2d1..4a269f9 100644
|
||||
--- a/drivers/acpi/Kconfig
|
||||
+++ b/drivers/acpi/Kconfig
|
||||
@@ -77,6 +77,9 @@ config ACPI_DEBUGGER_USER
|
||||
|
||||
endif
|
||||
|
||||
+config ACPI_SPCR_TABLE
|
||||
+ bool
|
||||
+
|
||||
config ACPI_SLEEP
|
||||
bool
|
||||
depends on SUSPEND || HIBERNATION
|
||||
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
|
||||
index e5ada78..d799593 100644
|
||||
--- a/drivers/acpi/Makefile
|
||||
+++ b/drivers/acpi/Makefile
|
||||
@@ -81,6 +81,7 @@ obj-$(CONFIG_ACPI_EC_DEBUGFS) += ec_sys.o
|
||||
obj-$(CONFIG_ACPI_CUSTOM_METHOD)+= custom_method.o
|
||||
obj-$(CONFIG_ACPI_BGRT) += bgrt.o
|
||||
obj-$(CONFIG_ACPI_CPPC_LIB) += cppc_acpi.o
|
||||
+obj-$(CONFIG_ACPI_SPCR_TABLE) += spcr.o
|
||||
obj-$(CONFIG_ACPI_DEBUGGER_USER) += acpi_dbg.o
|
||||
|
||||
# processor has its own "processor." module_param namespace
|
||||
diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
|
||||
new file mode 100644
|
||||
index 0000000..e8d7bc7
|
||||
--- /dev/null
|
||||
+++ b/drivers/acpi/spcr.c
|
||||
@@ -0,0 +1,111 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2012, Intel Corporation
|
||||
+ * Copyright (c) 2015, Red Hat, Inc.
|
||||
+ * Copyright (c) 2015, 2016 Linaro Ltd.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#define pr_fmt(fmt) "ACPI: SPCR: " fmt
|
||||
+
|
||||
+#include <linux/acpi.h>
|
||||
+#include <linux/console.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/serial_core.h>
|
||||
+
|
||||
+/**
|
||||
+ * parse_spcr() - parse ACPI SPCR table and add preferred console
|
||||
+ *
|
||||
+ * @earlycon: set up earlycon for the console specified by the table
|
||||
+ *
|
||||
+ * For the architectures with support for ACPI, CONFIG_ACPI_SPCR_TABLE may be
|
||||
+ * defined to parse ACPI SPCR table. As a result of the parsing preferred
|
||||
+ * console is registered and if @earlycon is true, earlycon is set up.
|
||||
+ *
|
||||
+ * When CONFIG_ACPI_SPCR_TABLE is defined, this function should be called
|
||||
+ * from arch inintialization code as soon as the DT/ACPI decision is made.
|
||||
+ *
|
||||
+ */
|
||||
+int __init parse_spcr(bool earlycon)
|
||||
+{
|
||||
+ static char opts[64];
|
||||
+ struct acpi_table_spcr *table;
|
||||
+ acpi_size table_size;
|
||||
+ acpi_status status;
|
||||
+ char *uart;
|
||||
+ char *iotype;
|
||||
+ int baud_rate;
|
||||
+ int err;
|
||||
+
|
||||
+ if (acpi_disabled)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ status = acpi_get_table_with_size(ACPI_SIG_SPCR, 0,
|
||||
+ (struct acpi_table_header **)&table,
|
||||
+ &table_size);
|
||||
+
|
||||
+ if (ACPI_FAILURE(status))
|
||||
+ return -ENOENT;
|
||||
+
|
||||
+ if (table->header.revision < 2) {
|
||||
+ err = -ENOENT;
|
||||
+ pr_err("wrong table version\n");
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ iotype = table->serial_port.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY ?
|
||||
+ "mmio" : "io";
|
||||
+
|
||||
+ switch (table->interface_type) {
|
||||
+ case ACPI_DBG2_ARM_SBSA_32BIT:
|
||||
+ iotype = "mmio32";
|
||||
+ /* fall through */
|
||||
+ case ACPI_DBG2_ARM_PL011:
|
||||
+ case ACPI_DBG2_ARM_SBSA_GENERIC:
|
||||
+ case ACPI_DBG2_BCM2835:
|
||||
+ uart = "pl011";
|
||||
+ break;
|
||||
+ case ACPI_DBG2_16550_COMPATIBLE:
|
||||
+ case ACPI_DBG2_16550_SUBSET:
|
||||
+ uart = "uart";
|
||||
+ break;
|
||||
+ default:
|
||||
+ err = -ENOENT;
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ switch (table->baud_rate) {
|
||||
+ case 3:
|
||||
+ baud_rate = 9600;
|
||||
+ break;
|
||||
+ case 4:
|
||||
+ baud_rate = 19200;
|
||||
+ break;
|
||||
+ case 6:
|
||||
+ baud_rate = 57600;
|
||||
+ break;
|
||||
+ case 7:
|
||||
+ baud_rate = 115200;
|
||||
+ break;
|
||||
+ default:
|
||||
+ err = -ENOENT;
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d", uart, iotype,
|
||||
+ table->serial_port.address, baud_rate);
|
||||
+
|
||||
+ pr_info("console: %s\n", opts);
|
||||
+
|
||||
+ if (earlycon)
|
||||
+ setup_earlycon(opts);
|
||||
+
|
||||
+ err = add_preferred_console(uart, 0, opts + strlen(uart) + 1);
|
||||
+
|
||||
+done:
|
||||
+ early_acpi_os_unmap_memory((void __iomem *)table, table_size);
|
||||
+ return err;
|
||||
+}
|
||||
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
|
||||
index 7aae655..ea00b9f 100644
|
||||
--- a/drivers/tty/serial/earlycon.c
|
||||
+++ b/drivers/tty/serial/earlycon.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/sizes.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_fdt.h>
|
||||
+#include <linux/acpi.h>
|
||||
|
||||
#ifdef CONFIG_FIX_EARLYCON_MEM
|
||||
#include <asm/fixmap.h>
|
||||
@@ -199,6 +200,14 @@ int __init setup_earlycon(char *buf)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * When CONFIG_ACPI_SPCR_TABLE is defined, "earlycon" without parameters in
|
||||
+ * command line does not start DT earlycon immediately, instead it defers
|
||||
+ * starting it until DT/ACPI decision is made. At that time if ACPI is enabled
|
||||
+ * call parse_spcr(), else call early_init_dt_scan_chosen_stdout()
|
||||
+ */
|
||||
+bool earlycon_init_is_deferred __initdata;
|
||||
+
|
||||
/* early_param wrapper for setup_earlycon() */
|
||||
static int __init param_setup_earlycon(char *buf)
|
||||
{
|
||||
@@ -208,8 +217,14 @@ static int __init param_setup_earlycon(char *buf)
|
||||
* Just 'earlycon' is a valid param for devicetree earlycons;
|
||||
* don't generate a warning from parse_early_params() in that case
|
||||
*/
|
||||
- if (!buf || !buf[0])
|
||||
- return early_init_dt_scan_chosen_stdout();
|
||||
+ if (!buf || !buf[0]) {
|
||||
+ if (IS_ENABLED(CONFIG_ACPI_SPCR_TABLE)) {
|
||||
+ earlycon_init_is_deferred = true;
|
||||
+ return 0;
|
||||
+ } else {
|
||||
+ return early_init_dt_scan_chosen_stdout();
|
||||
+ }
|
||||
+ }
|
||||
|
||||
err = setup_earlycon(buf);
|
||||
if (err == -ENOENT || err == -EALREADY)
|
||||
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
|
||||
index 4d8452c..32407e4 100644
|
||||
--- a/include/linux/acpi.h
|
||||
+++ b/include/linux/acpi.h
|
||||
@@ -1074,4 +1074,10 @@ void acpi_table_upgrade(void);
|
||||
static inline void acpi_table_upgrade(void) { }
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_ACPI_SPCR_TABLE
|
||||
+int parse_spcr(bool earlycon);
|
||||
+#else
|
||||
+static inline int parse_spcr(bool earlycon) { return 0; }
|
||||
+#endif
|
||||
+
|
||||
#endif /*_LINUX_ACPI_H*/
|
||||
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
|
||||
index 2f44e20..04b8cfb 100644
|
||||
--- a/include/linux/serial_core.h
|
||||
+++ b/include/linux/serial_core.h
|
||||
@@ -367,11 +367,18 @@ extern const struct earlycon_id __earlycon_table_end[];
|
||||
|
||||
#define EARLYCON_DECLARE(_name, fn) OF_EARLYCON_DECLARE(_name, "", fn)
|
||||
|
||||
-extern int setup_earlycon(char *buf);
|
||||
extern int of_setup_earlycon(const struct earlycon_id *match,
|
||||
unsigned long node,
|
||||
const char *options);
|
||||
|
||||
+#ifdef CONFIG_SERIAL_EARLYCON
|
||||
+extern bool earlycon_init_is_deferred __initdata;
|
||||
+extern int setup_earlycon(char *buf);
|
||||
+#else
|
||||
+static const bool earlycon_init_is_deferred;
|
||||
+static inline int setup_earlycon(char *buf) { return 0; }
|
||||
+#endif
|
||||
+
|
||||
struct uart_port *uart_get_console(struct uart_port *ports, int nr,
|
||||
struct console *c);
|
||||
int uart_parse_earlycon(char *p, unsigned char *iotype, unsigned long *addr,
|
||||
From patchwork Thu Aug 11 15:31:40 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v9,3/4] ARM64: ACPI: enable ACPI_SPCR_TABLE
|
||||
From: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
X-Patchwork-Id: 9275457
|
||||
Message-Id: <20160811153152.755-4-aleksey.makarov@linaro.org>
|
||||
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Cc: linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
|
||||
Aleksey Makarov <aleksey.makarov@linaro.org>,
|
||||
Russell King <linux@arm.linux.org.uk>, Len Brown <lenb@kernel.org>,
|
||||
Leif Lindholm <leif.lindholm@linaro.org>,
|
||||
Graeme Gregory <graeme.gregory@linaro.org>, Al Stone <ahs3@redhat.com>,
|
||||
Christopher Covington <cov@codeaurora.org>,
|
||||
Yury Norov <ynorov@caviumnetworks.com>,
|
||||
Peter Hurley <peter@hurleysoftware.com>,
|
||||
Andy Shevchenko <andy.shevchenko@gmail.com>,
|
||||
"Zheng, Lv" <lv.zheng@intel.com>, Mark Salter <msalter@redhat.com>,
|
||||
Kefeng Wang <wangkefeng.wang@huawei.com>,
|
||||
Catalin Marinas <catalin.marinas@arm.com>,
|
||||
Will Deacon <will.deacon@arm.com>
|
||||
Date: Thu, 11 Aug 2016 18:31:40 +0300
|
||||
|
||||
SBBR mentions SPCR as a mandatory ACPI table. So enable it for ARM64
|
||||
|
||||
Earlycon should be set up as early as possible. ACPI boot tables are
|
||||
mapped in arch/arm64/kernel/acpi.c:acpi_boot_table_init() that
|
||||
is called from setup_arch() and that's where we parse SPCR.
|
||||
So it has to be opted-in per-arch.
|
||||
|
||||
When ACPI_SPCR_TABLE is defined initialization of DT earlycon is
|
||||
deferred until the DT/ACPI decision is done. Initialize DT earlycon
|
||||
if ACPI is disabled.
|
||||
|
||||
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
|
||||
---
|
||||
arch/arm64/Kconfig | 1 +
|
||||
arch/arm64/kernel/acpi.c | 11 ++++++++++-
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
|
||||
index 69c8787..a54dfc0 100644
|
||||
--- a/arch/arm64/Kconfig
|
||||
+++ b/arch/arm64/Kconfig
|
||||
@@ -4,6 +4,7 @@ config ARM64
|
||||
select ACPI_GENERIC_GSI if ACPI
|
||||
select ACPI_REDUCED_HARDWARE_ONLY if ACPI
|
||||
select ACPI_MCFG if ACPI
|
||||
+ select ACPI_SPCR_TABLE if ACPI
|
||||
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
||||
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
|
||||
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
||||
diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c
|
||||
index 3e4f1a4..252a6d9 100644
|
||||
--- a/arch/arm64/kernel/acpi.c
|
||||
+++ b/arch/arm64/kernel/acpi.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/smp.h>
|
||||
+#include <linux/serial_core.h>
|
||||
|
||||
#include <asm/cputype.h>
|
||||
#include <asm/cpu_ops.h>
|
||||
@@ -206,7 +207,7 @@ void __init acpi_boot_table_init(void)
|
||||
if (param_acpi_off ||
|
||||
(!param_acpi_on && !param_acpi_force &&
|
||||
of_scan_flat_dt(dt_scan_depth1_nodes, NULL)))
|
||||
- return;
|
||||
+ goto done;
|
||||
|
||||
/*
|
||||
* ACPI is disabled at this point. Enable it in order to parse
|
||||
@@ -226,6 +227,14 @@ void __init acpi_boot_table_init(void)
|
||||
if (!param_acpi_force)
|
||||
disable_acpi();
|
||||
}
|
||||
+
|
||||
+done:
|
||||
+ if (acpi_disabled) {
|
||||
+ if (earlycon_init_is_deferred)
|
||||
+ early_init_dt_scan_chosen_stdout();
|
||||
+ } else {
|
||||
+ parse_spcr(earlycon_init_is_deferred);
|
||||
+ }
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI_APEI
|
||||
From patchwork Mon Aug 15 13:35:03 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v9,4/4] serial: pl011: add console matching function
|
||||
From: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
X-Patchwork-Id: 9280971
|
||||
Message-Id: <20160815133505.15294-1-aleksey.makarov@linaro.org>
|
||||
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Cc: linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
|
||||
Aleksey Makarov <aleksey.makarov@linaro.org>,
|
||||
Russell King <linux@arm.linux.org.uk>, Len Brown <lenb@kernel.org>,
|
||||
Leif Lindholm <leif.lindholm@linaro.org>,
|
||||
Graeme Gregory <graeme.gregory@linaro.org>, Al Stone <ahs3@redhat.com>,
|
||||
Christopher Covington <cov@codeaurora.org>,
|
||||
Yury Norov <ynorov@caviumnetworks.com>,
|
||||
Peter Hurley <peter@hurleysoftware.com>,
|
||||
Andy Shevchenko <andy.shevchenko@gmail.com>,
|
||||
"Zheng, Lv" <lv.zheng@intel.com>, Mark Salter <msalter@redhat.com>,
|
||||
Kefeng Wang <wangkefeng.wang@huawei.com>,
|
||||
Russell King <linux@armlinux.org.uk>, Jiri Slaby <jslaby@suse.com>
|
||||
Date: Mon, 15 Aug 2016 16:35:03 +0300
|
||||
|
||||
This patch adds function pl011_console_match() that implements
|
||||
method match of struct console. It allows to match consoles against
|
||||
data specified in a string, for example taken from command line or
|
||||
compiled by ACPI SPCR table handler.
|
||||
|
||||
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
|
||||
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
---
|
||||
drivers/tty/serial/amba-pl011.c | 55 +++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 55 insertions(+)
|
||||
|
||||
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
|
||||
index 8a9e213..2f9af8a 100644
|
||||
--- a/drivers/tty/serial/amba-pl011.c
|
||||
+++ b/drivers/tty/serial/amba-pl011.c
|
||||
@@ -2288,12 +2288,67 @@ static int __init pl011_console_setup(struct console *co, char *options)
|
||||
return uart_set_options(&uap->port, co, baud, parity, bits, flow);
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * pl011_console_match - non-standard console matching
|
||||
+ * @co: registering console
|
||||
+ * @name: name from console command line
|
||||
+ * @idx: index from console command line
|
||||
+ * @options: ptr to option string from console command line
|
||||
+ *
|
||||
+ * Only attempts to match console command lines of the form:
|
||||
+ * console=pl011,mmio|mmio32,<addr>[,<options>]
|
||||
+ * console=pl011,0x<addr>[,<options>]
|
||||
+ * This form is used to register an initial earlycon boot console and
|
||||
+ * replace it with the amba_console at pl011 driver init.
|
||||
+ *
|
||||
+ * Performs console setup for a match (as required by interface)
|
||||
+ * If no <options> are specified, then assume the h/w is already setup.
|
||||
+ *
|
||||
+ * Returns 0 if console matches; otherwise non-zero to use default matching
|
||||
+ */
|
||||
+static int __init pl011_console_match(struct console *co, char *name, int idx,
|
||||
+ char *options)
|
||||
+{
|
||||
+ unsigned char iotype;
|
||||
+ unsigned long addr;
|
||||
+ int i;
|
||||
+
|
||||
+ if (strcmp(name, "pl011") != 0)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ if (uart_parse_earlycon(options, &iotype, &addr, &options))
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ if (iotype != UPIO_MEM && iotype != UPIO_MEM32)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ /* try to match the port specified on the command line */
|
||||
+ for (i = 0; i < ARRAY_SIZE(amba_ports); i++) {
|
||||
+ struct uart_port *port;
|
||||
+
|
||||
+ if (!amba_ports[i])
|
||||
+ continue;
|
||||
+
|
||||
+ port = &amba_ports[i]->port;
|
||||
+
|
||||
+ if (port->mapbase != addr)
|
||||
+ continue;
|
||||
+
|
||||
+ co->index = i;
|
||||
+ port->cons = co;
|
||||
+ return pl011_console_setup(co, options);
|
||||
+ }
|
||||
+
|
||||
+ return -ENODEV;
|
||||
+}
|
||||
+
|
||||
static struct uart_driver amba_reg;
|
||||
static struct console amba_console = {
|
||||
.name = "ttyAMA",
|
||||
.write = pl011_console_write,
|
||||
.device = uart_console_device,
|
||||
.setup = pl011_console_setup,
|
||||
+ .match = pl011_console_match,
|
||||
.flags = CON_PRINTBUFFER,
|
||||
.index = -1,
|
||||
.data = &amba_reg,
|
|
@ -0,0 +1,93 @@
|
|||
From patchwork Thu Oct 6 09:52:07 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: arm64: mm: Fix memmap to be initialized for the entire section
|
||||
From: Robert Richter <rrichter@cavium.com>
|
||||
X-Patchwork-Id: 9364537
|
||||
Message-Id: <1475747527-32387-1-git-send-email-rrichter@cavium.com>
|
||||
To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon
|
||||
<will.deacon@arm.com>
|
||||
Cc: Mark Rutland <mark.rutland@arm.com>, linux-efi@vger.kernel.org,
|
||||
David Daney <david.daney@cavium.com>,
|
||||
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
|
||||
linux-kernel@vger.kernel.org, Robert Richter <rrichter@cavium.com>,
|
||||
Hanjun Guo <hanjun.guo@linaro.org>, linux-arm-kernel@lists.infradead.org
|
||||
Date: Thu, 6 Oct 2016 11:52:07 +0200
|
||||
|
||||
There is a memory setup problem on ThunderX systems with certain
|
||||
memory configurations. The symptom is
|
||||
|
||||
kernel BUG at mm/page_alloc.c:1848!
|
||||
|
||||
This happens for some configs with 64k page size enabled. The bug
|
||||
triggers for page zones with some pages in the zone not assigned to
|
||||
this particular zone. In my case some pages that are marked as nomap
|
||||
were not reassigned to the new zone of node 1, so those are still
|
||||
assigned to node 0.
|
||||
|
||||
The reason for the mis-configuration is a change in pfn_valid() which
|
||||
reports pages marked nomap as invalid:
|
||||
|
||||
68709f45385a arm64: only consider memblocks with NOMAP cleared for linear mapping
|
||||
|
||||
This causes pages marked as nomap being no long reassigned to the new
|
||||
zone in memmap_init_zone() by calling __init_single_pfn().
|
||||
|
||||
Fixing this by restoring the old behavior of pfn_valid() to use
|
||||
memblock_is_memory(). Also changing users of pfn_valid() in arm64 code
|
||||
to use memblock_is_map_memory() where necessary. This only affects
|
||||
code in ioremap.c. The code in mmu.c still can use the new version of
|
||||
pfn_valid().
|
||||
|
||||
Should be marked stable v4.5..
|
||||
|
||||
Signed-off-by: Robert Richter <rrichter@cavium.com>
|
||||
---
|
||||
arch/arm64/mm/init.c | 2 +-
|
||||
arch/arm64/mm/ioremap.c | 5 +++--
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
|
||||
index bbb7ee76e319..25b8659c2a9f 100644
|
||||
--- a/arch/arm64/mm/init.c
|
||||
+++ b/arch/arm64/mm/init.c
|
||||
@@ -147,7 +147,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max)
|
||||
#ifdef CONFIG_HAVE_ARCH_PFN_VALID
|
||||
int pfn_valid(unsigned long pfn)
|
||||
{
|
||||
- return memblock_is_map_memory(pfn << PAGE_SHIFT);
|
||||
+ return memblock_is_memory(pfn << PAGE_SHIFT);
|
||||
}
|
||||
EXPORT_SYMBOL(pfn_valid);
|
||||
#endif
|
||||
diff --git a/arch/arm64/mm/ioremap.c b/arch/arm64/mm/ioremap.c
|
||||
index 01e88c8bcab0..c17c220b0c48 100644
|
||||
--- a/arch/arm64/mm/ioremap.c
|
||||
+++ b/arch/arm64/mm/ioremap.c
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/export.h>
|
||||
+#include <linux/memblock.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/io.h>
|
||||
@@ -55,7 +56,7 @@ static void __iomem *__ioremap_caller(phys_addr_t phys_addr, size_t size,
|
||||
/*
|
||||
* Don't allow RAM to be mapped.
|
||||
*/
|
||||
- if (WARN_ON(pfn_valid(__phys_to_pfn(phys_addr))))
|
||||
+ if (WARN_ON(memblock_is_map_memory(phys_addr)))
|
||||
return NULL;
|
||||
|
||||
area = get_vm_area_caller(size, VM_IOREMAP, caller);
|
||||
@@ -96,7 +97,7 @@ EXPORT_SYMBOL(__iounmap);
|
||||
void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size)
|
||||
{
|
||||
/* For normal memory we already have a cacheable mapping. */
|
||||
- if (pfn_valid(__phys_to_pfn(phys_addr)))
|
||||
+ if (memblock_is_map_memory(phys_addr))
|
||||
return (void __iomem *)__phys_to_virt(phys_addr);
|
||||
|
||||
return __ioremap_caller(phys_addr, size, __pgprot(PROT_NORMAL),
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,508 @@
|
|||
From 767b70aa55d013f0c7589955f410d488fed5776a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Tue, 5 Jul 2016 23:49:39 +0100
|
||||
Subject: [PATCH 1/4] Some platforms may not be fully compliant with generic
|
||||
set of PCI config accessors. For these cases we implement the way to
|
||||
overwrite accessors set. Algorithm traverses available quirk list, matches
|
||||
against <oem_id, oem_table_id, domain, bus number> tuple and returns
|
||||
corresponding PCI config ops. oem_id and oem_table_id come from MCFG table
|
||||
standard header. All quirks can be defined using DECLARE_ACPI_MCFG_FIXUP()
|
||||
macro and kept self contained. Example:
|
||||
|
||||
/* Custom PCI config ops */
|
||||
static struct pci_generic_ecam_ops foo_pci_ops = {
|
||||
.bus_shift = 24,
|
||||
.pci_ops = {
|
||||
.map_bus = pci_ecam_map_bus,
|
||||
.read = foo_ecam_config_read,
|
||||
.write = foo_ecam_config_write,
|
||||
}
|
||||
};
|
||||
|
||||
DECLARE_ACPI_MCFG_FIXUP(&foo_pci_ops, <oem_id_str>, <oem_table_id>, <domain_nr>, <bus_nr>);
|
||||
|
||||
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
|
||||
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
||||
---
|
||||
drivers/acpi/pci_mcfg.c | 41 ++++++++++++++++++++++++++++++++++++---
|
||||
include/asm-generic/vmlinux.lds.h | 7 +++++++
|
||||
include/linux/pci-acpi.h | 20 +++++++++++++++++++
|
||||
3 files changed, 65 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index d3c3e85..deb0077 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -22,6 +22,10 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/pci-acpi.h>
|
||||
+#include <linux/pci-ecam.h>
|
||||
+
|
||||
+/* Root pointer to the mapped MCFG table */
|
||||
+static struct acpi_table_mcfg *mcfg_table;
|
||||
|
||||
/* Structure to hold entries from the MCFG table */
|
||||
struct mcfg_entry {
|
||||
@@ -35,6 +39,38 @@ struct mcfg_entry {
|
||||
/* List to save mcfg entries */
|
||||
static LIST_HEAD(pci_mcfg_list);
|
||||
|
||||
+extern struct pci_cfg_fixup __start_acpi_mcfg_fixups[];
|
||||
+extern struct pci_cfg_fixup __end_acpi_mcfg_fixups[];
|
||||
+
|
||||
+struct pci_ecam_ops *pci_mcfg_get_ops(struct acpi_pci_root *root)
|
||||
+{
|
||||
+ int bus_num = root->secondary.start;
|
||||
+ int domain = root->segment;
|
||||
+ struct pci_cfg_fixup *f;
|
||||
+
|
||||
+ if (!mcfg_table)
|
||||
+ return &pci_generic_ecam_ops;
|
||||
+
|
||||
+ /*
|
||||
+ * Match against platform specific quirks and return corresponding
|
||||
+ * CAM ops.
|
||||
+ *
|
||||
+ * First match against PCI topology <domain:bus> then use OEM ID and
|
||||
+ * OEM revision from MCFG table standard header.
|
||||
+ */
|
||||
+ for (f = __start_acpi_mcfg_fixups; f < __end_acpi_mcfg_fixups; f++) {
|
||||
+ if ((f->domain == domain || f->domain == PCI_MCFG_DOMAIN_ANY) &&
|
||||
+ (f->bus_num == bus_num || f->bus_num == PCI_MCFG_BUS_ANY) &&
|
||||
+ (!strncmp(f->oem_id, mcfg_table->header.oem_id,
|
||||
+ ACPI_OEM_ID_SIZE)) &&
|
||||
+ (!strncmp(f->oem_table_id, mcfg_table->header.oem_table_id,
|
||||
+ ACPI_OEM_TABLE_ID_SIZE)))
|
||||
+ return f->ops;
|
||||
+ }
|
||||
+ /* No quirks, use ECAM */
|
||||
+ return &pci_generic_ecam_ops;
|
||||
+}
|
||||
+
|
||||
phys_addr_t pci_mcfg_lookup(u16 seg, struct resource *bus_res)
|
||||
{
|
||||
struct mcfg_entry *e;
|
||||
@@ -54,7 +90,6 @@ phys_addr_t pci_mcfg_lookup(u16 seg, struct resource *bus_res)
|
||||
|
||||
static __init int pci_mcfg_parse(struct acpi_table_header *header)
|
||||
{
|
||||
- struct acpi_table_mcfg *mcfg;
|
||||
struct acpi_mcfg_allocation *mptr;
|
||||
struct mcfg_entry *e, *arr;
|
||||
int i, n;
|
||||
@@ -64,8 +99,8 @@ static __init int pci_mcfg_parse(struct acpi_table_header *header)
|
||||
|
||||
n = (header->length - sizeof(struct acpi_table_mcfg)) /
|
||||
sizeof(struct acpi_mcfg_allocation);
|
||||
- mcfg = (struct acpi_table_mcfg *)header;
|
||||
- mptr = (struct acpi_mcfg_allocation *) &mcfg[1];
|
||||
+ mcfg_table = (struct acpi_table_mcfg *)header;
|
||||
+ mptr = (struct acpi_mcfg_allocation *) &mcfg_table[1];
|
||||
|
||||
arr = kcalloc(n, sizeof(*arr), GFP_KERNEL);
|
||||
if (!arr)
|
||||
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
|
||||
index 6a67ab9..43604fc 100644
|
||||
--- a/include/asm-generic/vmlinux.lds.h
|
||||
+++ b/include/asm-generic/vmlinux.lds.h
|
||||
@@ -300,6 +300,13 @@
|
||||
VMLINUX_SYMBOL(__end_pci_fixups_suspend_late) = .; \
|
||||
} \
|
||||
\
|
||||
+ /* ACPI MCFG quirks */ \
|
||||
+ .acpi_fixup : AT(ADDR(.acpi_fixup) - LOAD_OFFSET) { \
|
||||
+ VMLINUX_SYMBOL(__start_acpi_mcfg_fixups) = .; \
|
||||
+ *(.acpi_fixup_mcfg) \
|
||||
+ VMLINUX_SYMBOL(__end_acpi_mcfg_fixups) = .; \
|
||||
+ } \
|
||||
+ \
|
||||
/* Built-in firmware blobs */ \
|
||||
.builtin_fw : AT(ADDR(.builtin_fw) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__start_builtin_fw) = .; \
|
||||
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
|
||||
index 7d63a66..c8a6559 100644
|
||||
--- a/include/linux/pci-acpi.h
|
||||
+++ b/include/linux/pci-acpi.h
|
||||
@@ -25,6 +25,7 @@ static inline acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev)
|
||||
extern phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle);
|
||||
|
||||
extern phys_addr_t pci_mcfg_lookup(u16 domain, struct resource *bus_res);
|
||||
+extern struct pci_ecam_ops *pci_mcfg_get_ops(struct acpi_pci_root *root);
|
||||
|
||||
static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
|
||||
{
|
||||
@@ -72,6 +73,25 @@ struct acpi_pci_root_ops {
|
||||
int (*prepare_resources)(struct acpi_pci_root_info *info);
|
||||
};
|
||||
|
||||
+struct pci_cfg_fixup {
|
||||
+ struct pci_ecam_ops *ops;
|
||||
+ char *oem_id;
|
||||
+ char *oem_table_id;
|
||||
+ int domain;
|
||||
+ int bus_num;
|
||||
+};
|
||||
+
|
||||
+#define PCI_MCFG_DOMAIN_ANY -1
|
||||
+#define PCI_MCFG_BUS_ANY -1
|
||||
+
|
||||
+/* Designate a routine to fix up buggy MCFG */
|
||||
+#define DECLARE_ACPI_MCFG_FIXUP(ops, oem_id, oem_table_id, dom, bus) \
|
||||
+ static const struct pci_cfg_fixup \
|
||||
+ __mcfg_fixup_##oem_id##oem_table_id##dom##bus \
|
||||
+ __used __attribute__((__section__(".acpi_fixup_mcfg"), \
|
||||
+ aligned((sizeof(void *))))) = \
|
||||
+ { ops, oem_id, oem_table_id, dom, bus };
|
||||
+
|
||||
extern int acpi_pci_probe_root_resources(struct acpi_pci_root_info *info);
|
||||
extern struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root,
|
||||
struct acpi_pci_root_ops *ops,
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From 4f86a9b006b25dd7336043dab26058ed6fb2802d Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Tue, 5 Jul 2016 23:52:46 +0100
|
||||
Subject: [PATCH 2/4] pci_generic_ecam_ops is used by default. Since there are
|
||||
platforms which have non-compliant ECAM space we need to overwrite these
|
||||
accessors prior to PCI buses enumeration. In order to do that we call
|
||||
pci_mcfg_get_ops to retrieve pci_ecam_ops structure so that we can use proper
|
||||
PCI config space accessors and bus_shift.
|
||||
|
||||
pci_generic_ecam_ops is still used for platforms free from quirks.
|
||||
|
||||
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
|
||||
---
|
||||
arch/arm64/kernel/pci.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
|
||||
index 94cd43c..a891bda 100644
|
||||
--- a/arch/arm64/kernel/pci.c
|
||||
+++ b/arch/arm64/kernel/pci.c
|
||||
@@ -139,6 +139,7 @@ pci_acpi_setup_ecam_mapping(struct acpi_pci_root *root)
|
||||
struct pci_config_window *cfg;
|
||||
struct resource cfgres;
|
||||
unsigned int bsz;
|
||||
+ struct pci_ecam_ops *ops;
|
||||
|
||||
/* Use address from _CBA if present, otherwise lookup MCFG */
|
||||
if (!root->mcfg_addr)
|
||||
@@ -150,12 +151,12 @@ pci_acpi_setup_ecam_mapping(struct acpi_pci_root *root)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- bsz = 1 << pci_generic_ecam_ops.bus_shift;
|
||||
+ ops = pci_mcfg_get_ops(root);
|
||||
+ bsz = 1 << ops->bus_shift;
|
||||
cfgres.start = root->mcfg_addr + bus_res->start * bsz;
|
||||
cfgres.end = cfgres.start + resource_size(bus_res) * bsz - 1;
|
||||
cfgres.flags = IORESOURCE_MEM;
|
||||
- cfg = pci_ecam_create(&root->device->dev, &cfgres, bus_res,
|
||||
- &pci_generic_ecam_ops);
|
||||
+ cfg = pci_ecam_create(&root->device->dev, &cfgres, bus_res, ops);
|
||||
if (IS_ERR(cfg)) {
|
||||
dev_err(&root->device->dev, "%04x:%pR error %ld mapping ECAM\n",
|
||||
seg, bus_res, PTR_ERR(cfg));
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From cbdbd697bd6d716eb9d1705ee55445432e73eabb Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Tue, 5 Jul 2016 23:53:59 +0100
|
||||
Subject: [PATCH 3/4] The ECAM quirk matching criteria per the discussion on
|
||||
https://lkml.org/lkml/2016/6/13/944 includes: OEM ID, OEM Table ID and OEM
|
||||
Revision. So this patch adds OEM Table ID into the check to match platform
|
||||
specific ECAM quirks as well.
|
||||
|
||||
This patch also improve strncmp check using strlen and
|
||||
min_t to ignore the padding spaces in OEM ID and OEM
|
||||
Table ID.
|
||||
|
||||
Signed-off-by: Duc Dang <dhdang@apm.com>
|
||||
---
|
||||
drivers/acpi/pci_mcfg.c | 7 +++++--
|
||||
include/linux/pci-acpi.h | 7 ++++---
|
||||
2 files changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index deb0077..307ca9a 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -62,9 +62,12 @@ struct pci_ecam_ops *pci_mcfg_get_ops(struct acpi_pci_root *root)
|
||||
if ((f->domain == domain || f->domain == PCI_MCFG_DOMAIN_ANY) &&
|
||||
(f->bus_num == bus_num || f->bus_num == PCI_MCFG_BUS_ANY) &&
|
||||
(!strncmp(f->oem_id, mcfg_table->header.oem_id,
|
||||
- ACPI_OEM_ID_SIZE)) &&
|
||||
+ min_t(size_t, strlen(f->oem_id),
|
||||
+ ACPI_OEM_ID_SIZE))) &&
|
||||
(!strncmp(f->oem_table_id, mcfg_table->header.oem_table_id,
|
||||
- ACPI_OEM_TABLE_ID_SIZE)))
|
||||
+ min_t(size_t, strlen(f->oem_table_id),
|
||||
+ ACPI_OEM_TABLE_ID_SIZE))) &&
|
||||
+ (f->oem_revision == mcfg_table->header.oem_revision))
|
||||
return f->ops;
|
||||
}
|
||||
/* No quirks, use ECAM */
|
||||
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
|
||||
index c8a6559..5148c8d 100644
|
||||
--- a/include/linux/pci-acpi.h
|
||||
+++ b/include/linux/pci-acpi.h
|
||||
@@ -77,6 +77,7 @@ struct pci_cfg_fixup {
|
||||
struct pci_ecam_ops *ops;
|
||||
char *oem_id;
|
||||
char *oem_table_id;
|
||||
+ u32 oem_revision;
|
||||
int domain;
|
||||
int bus_num;
|
||||
};
|
||||
@@ -85,12 +86,12 @@ struct pci_cfg_fixup {
|
||||
#define PCI_MCFG_BUS_ANY -1
|
||||
|
||||
/* Designate a routine to fix up buggy MCFG */
|
||||
-#define DECLARE_ACPI_MCFG_FIXUP(ops, oem_id, oem_table_id, dom, bus) \
|
||||
+#define DECLARE_ACPI_MCFG_FIXUP(ops, oem_id, oem_table_id, rev, dom, bus) \
|
||||
static const struct pci_cfg_fixup \
|
||||
- __mcfg_fixup_##oem_id##oem_table_id##dom##bus \
|
||||
+ __mcfg_fixup_##oem_id##oem_table_id##rev##dom##bus \
|
||||
__used __attribute__((__section__(".acpi_fixup_mcfg"), \
|
||||
aligned((sizeof(void *))))) = \
|
||||
- { ops, oem_id, oem_table_id, dom, bus };
|
||||
+ { ops, oem_id, oem_table_id, rev, dom, bus };
|
||||
|
||||
extern int acpi_pci_probe_root_resources(struct acpi_pci_root_info *info);
|
||||
extern struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root,
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From 78766cf255bc6aafac2f57372a0446f78322da19 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Tue, 5 Jul 2016 23:55:11 +0100
|
||||
Subject: [PATCH 4/4] X-Gene PCIe controller does not fully support ECAM. This
|
||||
patch adds required ECAM fixup to allow X-Gene PCIe controller to be
|
||||
functional in ACPI boot mode.
|
||||
|
||||
Signed-off-by: Duc Dang <dhdang@apm.com>
|
||||
---
|
||||
drivers/pci/host/Makefile | 2 +-
|
||||
drivers/pci/host/pci-xgene-ecam.c | 194 ++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 195 insertions(+), 1 deletion(-)
|
||||
create mode 100644 drivers/pci/host/pci-xgene-ecam.c
|
||||
|
||||
diff --git a/drivers/pci/host/Makefile b/drivers/pci/host/Makefile
|
||||
index 9c8698e..3480696 100644
|
||||
--- a/drivers/pci/host/Makefile
|
||||
+++ b/drivers/pci/host/Makefile
|
||||
@@ -14,7 +14,7 @@ obj-$(CONFIG_PCIE_SPEAR13XX) += pcie-spear13xx.o
|
||||
obj-$(CONFIG_PCI_KEYSTONE) += pci-keystone-dw.o pci-keystone.o
|
||||
obj-$(CONFIG_PCIE_XILINX) += pcie-xilinx.o
|
||||
obj-$(CONFIG_PCIE_XILINX_NWL) += pcie-xilinx-nwl.o
|
||||
-obj-$(CONFIG_PCI_XGENE) += pci-xgene.o
|
||||
+obj-$(CONFIG_PCI_XGENE) += pci-xgene.o pci-xgene-ecam.o
|
||||
obj-$(CONFIG_PCI_XGENE_MSI) += pci-xgene-msi.o
|
||||
obj-$(CONFIG_PCI_LAYERSCAPE) += pci-layerscape.o
|
||||
obj-$(CONFIG_PCI_VERSATILE) += pci-versatile.o
|
||||
diff --git a/drivers/pci/host/pci-xgene-ecam.c b/drivers/pci/host/pci-xgene-ecam.c
|
||||
new file mode 100644
|
||||
index 0000000..1bea63f
|
||||
--- /dev/null
|
||||
+++ b/drivers/pci/host/pci-xgene-ecam.c
|
||||
@@ -0,0 +1,194 @@
|
||||
+/*
|
||||
+ * APM X-Gene PCIe ECAM fixup driver
|
||||
+ *
|
||||
+ * Copyright (c) 2016, Applied Micro Circuits Corporation
|
||||
+ * Author:
|
||||
+ * Duc Dang <dhdang@apm.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of_address.h>
|
||||
+#include <linux/of_pci.h>
|
||||
+#include <linux/pci-acpi.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/pci-ecam.h>
|
||||
+
|
||||
+#ifdef CONFIG_ACPI
|
||||
+#define RTDID 0x160
|
||||
+#define ROOT_CAP_AND_CTRL 0x5C
|
||||
+
|
||||
+/* PCIe IP version */
|
||||
+#define XGENE_PCIE_IP_VER_UNKN 0
|
||||
+#define XGENE_PCIE_IP_VER_1 1
|
||||
+
|
||||
+#define APM_OEM_ID "APM"
|
||||
+#define APM_XGENE_OEM_TABLE_ID "XGENE"
|
||||
+#define APM_XGENE_OEM_REV 0x00000002
|
||||
+
|
||||
+struct xgene_pcie_acpi_root {
|
||||
+ void __iomem *csr_base;
|
||||
+ u32 version;
|
||||
+};
|
||||
+
|
||||
+static acpi_status xgene_pcie_find_csr_base(struct acpi_resource *acpi_res,
|
||||
+ void *data)
|
||||
+{
|
||||
+ struct xgene_pcie_acpi_root *root = data;
|
||||
+ struct acpi_resource_fixed_memory32 *fixed32;
|
||||
+
|
||||
+ if (acpi_res->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) {
|
||||
+ fixed32 = &acpi_res->data.fixed_memory32;
|
||||
+ root->csr_base = ioremap(fixed32->address,
|
||||
+ fixed32->address_length);
|
||||
+ return AE_CTRL_TERMINATE;
|
||||
+ }
|
||||
+
|
||||
+ return AE_OK;
|
||||
+}
|
||||
+
|
||||
+static int xgene_pcie_ecam_init(struct pci_config_window *cfg)
|
||||
+{
|
||||
+ struct xgene_pcie_acpi_root *xgene_root;
|
||||
+ struct device *dev = cfg->parent;
|
||||
+ struct acpi_device *adev = to_acpi_device(dev);
|
||||
+ acpi_handle handle = acpi_device_handle(adev);
|
||||
+
|
||||
+ xgene_root = devm_kzalloc(dev, sizeof(*xgene_root), GFP_KERNEL);
|
||||
+ if (!xgene_root)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ acpi_walk_resources(handle, METHOD_NAME__CRS,
|
||||
+ xgene_pcie_find_csr_base, xgene_root);
|
||||
+
|
||||
+ if (!xgene_root->csr_base) {
|
||||
+ kfree(xgene_root);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->version = XGENE_PCIE_IP_VER_1;
|
||||
+
|
||||
+ cfg->priv = xgene_root;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * For Configuration request, RTDID register is used as Bus Number,
|
||||
+ * Device Number and Function number of the header fields.
|
||||
+ */
|
||||
+static void xgene_pcie_set_rtdid_reg(struct pci_bus *bus, uint devfn)
|
||||
+{
|
||||
+ struct pci_config_window *cfg = bus->sysdata;
|
||||
+ struct xgene_pcie_acpi_root *port = cfg->priv;
|
||||
+ unsigned int b, d, f;
|
||||
+ u32 rtdid_val = 0;
|
||||
+
|
||||
+ b = bus->number;
|
||||
+ d = PCI_SLOT(devfn);
|
||||
+ f = PCI_FUNC(devfn);
|
||||
+
|
||||
+ if (!pci_is_root_bus(bus))
|
||||
+ rtdid_val = (b << 8) | (d << 3) | f;
|
||||
+
|
||||
+ writel(rtdid_val, port->csr_base + RTDID);
|
||||
+ /* read the register back to ensure flush */
|
||||
+ readl(port->csr_base + RTDID);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * X-Gene PCIe port uses BAR0-BAR1 of RC's configuration space as
|
||||
+ * the translation from PCI bus to native BUS. Entire DDR region
|
||||
+ * is mapped into PCIe space using these registers, so it can be
|
||||
+ * reached by DMA from EP devices. The BAR0/1 of bridge should be
|
||||
+ * hidden during enumeration to avoid the sizing and resource allocation
|
||||
+ * by PCIe core.
|
||||
+ */
|
||||
+static bool xgene_pcie_hide_rc_bars(struct pci_bus *bus, int offset)
|
||||
+{
|
||||
+ if (pci_is_root_bus(bus) && ((offset == PCI_BASE_ADDRESS_0) ||
|
||||
+ (offset == PCI_BASE_ADDRESS_1)))
|
||||
+ return true;
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+void __iomem *xgene_pcie_ecam_map_bus(struct pci_bus *bus,
|
||||
+ unsigned int devfn, int where)
|
||||
+{
|
||||
+ struct pci_config_window *cfg = bus->sysdata;
|
||||
+ unsigned int busn = bus->number;
|
||||
+ void __iomem *base;
|
||||
+
|
||||
+ if (busn < cfg->busr.start || busn > cfg->busr.end)
|
||||
+ return NULL;
|
||||
+
|
||||
+ if ((pci_is_root_bus(bus) && devfn != 0) ||
|
||||
+ xgene_pcie_hide_rc_bars(bus, where))
|
||||
+ return NULL;
|
||||
+
|
||||
+ xgene_pcie_set_rtdid_reg(bus, devfn);
|
||||
+
|
||||
+ if (busn > cfg->busr.start)
|
||||
+ base = cfg->win + (1 << cfg->ops->bus_shift);
|
||||
+ else
|
||||
+ base = cfg->win;
|
||||
+
|
||||
+ return base + where;
|
||||
+}
|
||||
+
|
||||
+static int xgene_pcie_config_read32(struct pci_bus *bus, unsigned int devfn,
|
||||
+ int where, int size, u32 *val)
|
||||
+{
|
||||
+ struct pci_config_window *cfg = bus->sysdata;
|
||||
+ struct xgene_pcie_acpi_root *port = cfg->priv;
|
||||
+
|
||||
+ if (pci_generic_config_read32(bus, devfn, where & ~0x3, 4, val) !=
|
||||
+ PCIBIOS_SUCCESSFUL)
|
||||
+ return PCIBIOS_DEVICE_NOT_FOUND;
|
||||
+
|
||||
+ /*
|
||||
+ * The v1 controller has a bug in its Configuration Request
|
||||
+ * Retry Status (CRS) logic: when CRS is enabled and we read the
|
||||
+ * Vendor and Device ID of a non-existent device, the controller
|
||||
+ * fabricates return data of 0xFFFF0001 ("device exists but is not
|
||||
+ * ready") instead of 0xFFFFFFFF ("device does not exist"). This
|
||||
+ * causes the PCI core to retry the read until it times out.
|
||||
+ * Avoid this by not claiming to support CRS.
|
||||
+ */
|
||||
+ if (pci_is_root_bus(bus) && (port->version == XGENE_PCIE_IP_VER_1) &&
|
||||
+ ((where & ~0x3) == ROOT_CAP_AND_CTRL))
|
||||
+ *val &= ~(PCI_EXP_RTCAP_CRSVIS << 16);
|
||||
+
|
||||
+ if (size <= 2)
|
||||
+ *val = (*val >> (8 * (where & 3))) & ((1 << (size * 8)) - 1);
|
||||
+
|
||||
+ return PCIBIOS_SUCCESSFUL;
|
||||
+}
|
||||
+
|
||||
+static struct pci_ecam_ops xgene_pcie_ecam_ops = {
|
||||
+ .bus_shift = 16,
|
||||
+ .init = xgene_pcie_ecam_init,
|
||||
+ .pci_ops = {
|
||||
+ .map_bus = xgene_pcie_ecam_map_bus,
|
||||
+ .read = xgene_pcie_config_read32,
|
||||
+ .write = pci_generic_config_write,
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+DECLARE_ACPI_MCFG_FIXUP(&xgene_pcie_ecam_ops, APM_OEM_ID,
|
||||
+ APM_XGENE_OEM_TABLE_ID, APM_XGENE_OEM_REV,
|
||||
+ PCI_MCFG_DOMAIN_ANY, PCI_MCFG_BUS_ANY);
|
||||
+#endif
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,977 @@
|
|||
From 5c4f8b5b68451e5d208a5aefb195fdd108629da4 Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Nowicki <tn@semihalf.com>
|
||||
Date: Fri, 9 Sep 2016 21:24:03 +0200
|
||||
Subject: [PATCH 1/6] PCI/ACPI: Extend pci_mcfg_lookup() responsibilities
|
||||
|
||||
In preparation for adding MCFG platform specific quirk handling move
|
||||
CFG resource calculation and ECAM ops assignment to pci_mcfg_lookup().
|
||||
It becomes the gate for further ops and CFG resource manipulation
|
||||
in arch-agnostic code (drivers/acpi/pci_mcfg.c).
|
||||
|
||||
No functionality changes in this patch.
|
||||
|
||||
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
|
||||
---
|
||||
arch/arm64/kernel/pci.c | 17 +++++------------
|
||||
drivers/acpi/pci_mcfg.c | 28 +++++++++++++++++++++++++---
|
||||
include/linux/pci-acpi.h | 4 +++-
|
||||
3 files changed, 33 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
|
||||
index acf3872..fb439c7 100644
|
||||
--- a/arch/arm64/kernel/pci.c
|
||||
+++ b/arch/arm64/kernel/pci.c
|
||||
@@ -125,24 +125,17 @@ pci_acpi_setup_ecam_mapping(struct acpi_pci_root *root)
|
||||
u16 seg = root->segment;
|
||||
struct pci_config_window *cfg;
|
||||
struct resource cfgres;
|
||||
- unsigned int bsz;
|
||||
+ struct pci_ecam_ops *ecam_ops;
|
||||
+ int ret;
|
||||
|
||||
- /* Use address from _CBA if present, otherwise lookup MCFG */
|
||||
- if (!root->mcfg_addr)
|
||||
- root->mcfg_addr = pci_mcfg_lookup(seg, bus_res);
|
||||
-
|
||||
- if (!root->mcfg_addr) {
|
||||
+ ret = pci_mcfg_lookup(root, &cfgres, &ecam_ops);
|
||||
+ if (ret) {
|
||||
dev_err(&root->device->dev, "%04x:%pR ECAM region not found\n",
|
||||
seg, bus_res);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- bsz = 1 << pci_generic_ecam_ops.bus_shift;
|
||||
- cfgres.start = root->mcfg_addr + bus_res->start * bsz;
|
||||
- cfgres.end = cfgres.start + resource_size(bus_res) * bsz - 1;
|
||||
- cfgres.flags = IORESOURCE_MEM;
|
||||
- cfg = pci_ecam_create(&root->device->dev, &cfgres, bus_res,
|
||||
- &pci_generic_ecam_ops);
|
||||
+ cfg = pci_ecam_create(&root->device->dev, &cfgres, bus_res, ecam_ops);
|
||||
if (IS_ERR(cfg)) {
|
||||
dev_err(&root->device->dev, "%04x:%pR error %ld mapping ECAM\n",
|
||||
seg, bus_res, PTR_ERR(cfg));
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index b5b376e..ffcc651 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/pci-acpi.h>
|
||||
+#include <linux/pci-ecam.h>
|
||||
|
||||
/* Structure to hold entries from the MCFG table */
|
||||
struct mcfg_entry {
|
||||
@@ -35,9 +36,18 @@ struct mcfg_entry {
|
||||
/* List to save MCFG entries */
|
||||
static LIST_HEAD(pci_mcfg_list);
|
||||
|
||||
-phys_addr_t pci_mcfg_lookup(u16 seg, struct resource *bus_res)
|
||||
+int pci_mcfg_lookup(struct acpi_pci_root *root, struct resource *cfgres,
|
||||
+ struct pci_ecam_ops **ecam_ops)
|
||||
{
|
||||
+ struct pci_ecam_ops *ops = &pci_generic_ecam_ops;
|
||||
+ struct resource *bus_res = &root->secondary;
|
||||
+ u16 seg = root->segment;
|
||||
struct mcfg_entry *e;
|
||||
+ struct resource res;
|
||||
+
|
||||
+ /* Use address from _CBA if present, otherwise lookup MCFG */
|
||||
+ if (root->mcfg_addr)
|
||||
+ goto skip_lookup;
|
||||
|
||||
/*
|
||||
* We expect exact match, unless MCFG entry end bus covers more than
|
||||
@@ -45,10 +55,22 @@ phys_addr_t pci_mcfg_lookup(u16 seg, struct resource *bus_res)
|
||||
*/
|
||||
list_for_each_entry(e, &pci_mcfg_list, list) {
|
||||
if (e->segment == seg && e->bus_start == bus_res->start &&
|
||||
- e->bus_end >= bus_res->end)
|
||||
- return e->addr;
|
||||
+ e->bus_end >= bus_res->end) {
|
||||
+ root->mcfg_addr = e->addr;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
+ if (!root->mcfg_addr)
|
||||
+ return -ENXIO;
|
||||
+
|
||||
+skip_lookup:
|
||||
+ memset(&res, 0, sizeof(res));
|
||||
+ res.start = root->mcfg_addr + (bus_res->start << 20);
|
||||
+ res.end = res.start + (resource_size(bus_res) << 20) - 1;
|
||||
+ res.flags = IORESOURCE_MEM;
|
||||
+ *cfgres = res;
|
||||
+ *ecam_ops = ops;
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
|
||||
index 7d63a66..7a4e83a 100644
|
||||
--- a/include/linux/pci-acpi.h
|
||||
+++ b/include/linux/pci-acpi.h
|
||||
@@ -24,7 +24,9 @@ static inline acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev)
|
||||
}
|
||||
extern phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle);
|
||||
|
||||
-extern phys_addr_t pci_mcfg_lookup(u16 domain, struct resource *bus_res);
|
||||
+struct pci_ecam_ops;
|
||||
+extern int pci_mcfg_lookup(struct acpi_pci_root *root, struct resource *cfgres,
|
||||
+ struct pci_ecam_ops **ecam_ops);
|
||||
|
||||
static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
|
||||
{
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 16c02d9cc0e67b48c343aecc4b5566e729a97683 Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Nowicki <tn@semihalf.com>
|
||||
Date: Fri, 9 Sep 2016 21:24:04 +0200
|
||||
Subject: [PATCH 2/6] PCI/ACPI: Check platform specific ECAM quirks
|
||||
|
||||
Some platforms may not be fully compliant with generic set of PCI config
|
||||
accessors. For these cases we implement the way to overwrite CFG accessors
|
||||
set and configuration space range.
|
||||
|
||||
In first place pci_mcfg_parse() saves machine's IDs and revision number
|
||||
(these come from MCFG header) in order to match against known quirk entries.
|
||||
Then the algorithm traverses available quirk list (static array),
|
||||
matches against <oem_id, oem_table_id, rev, domain, bus number range> and
|
||||
returns custom PCI config ops and/or CFG resource structure.
|
||||
|
||||
When adding new quirk there are two possibilities:
|
||||
1. Override default pci_generic_ecam_ops ops but CFG resource comes from MCFG
|
||||
{ "OEM_ID", "OEM_TABLE_ID", <REV>, <DOMAIN>, <BUS_NR>, &foo_ops, MCFG_RES_EMPTY },
|
||||
2. Override default pci_generic_ecam_ops ops and CFG resource. For this case
|
||||
it is also allowed get CFG resource from quirk entry w/o having it in MCFG.
|
||||
{ "OEM_ID", "OEM_TABLE_ID", <REV>, <DOMAIN>, <BUS_NR>, &boo_ops,
|
||||
DEFINE_RES_MEM(START, SIZE) },
|
||||
|
||||
pci_generic_ecam_ops and MCFG entries will be used for platforms
|
||||
free from quirks.
|
||||
|
||||
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
|
||||
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Signed-off-by: Christopher Covington <cov@codeaurora.org>
|
||||
---
|
||||
drivers/acpi/pci_mcfg.c | 80 +++++++++++++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 74 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index ffcc651..2b8acc7 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -32,6 +32,59 @@ struct mcfg_entry {
|
||||
u8 bus_start;
|
||||
u8 bus_end;
|
||||
};
|
||||
+struct mcfg_fixup {
|
||||
+ char oem_id[ACPI_OEM_ID_SIZE + 1];
|
||||
+ char oem_table_id[ACPI_OEM_TABLE_ID_SIZE + 1];
|
||||
+ u32 oem_revision;
|
||||
+ u16 seg;
|
||||
+ struct resource bus_range;
|
||||
+ struct pci_ecam_ops *ops;
|
||||
+ struct resource cfgres;
|
||||
+};
|
||||
+
|
||||
+#define MCFG_DOM_ANY (-1)
|
||||
+#define MCFG_BUS_RANGE(start, end) DEFINE_RES_NAMED((start), \
|
||||
+ ((end) - (start) + 1), \
|
||||
+ NULL, IORESOURCE_BUS)
|
||||
+#define MCFG_BUS_ANY MCFG_BUS_RANGE(0x0, 0xff)
|
||||
+#define MCFG_RES_EMPTY DEFINE_RES_NAMED(0, 0, NULL, 0)
|
||||
+
|
||||
+static struct mcfg_fixup mcfg_quirks[] = {
|
||||
+/* { OEM_ID, OEM_TABLE_ID, REV, DOMAIN, BUS_RANGE, cfgres, ops }, */
|
||||
+};
|
||||
+
|
||||
+static char mcfg_oem_id[ACPI_OEM_ID_SIZE];
|
||||
+static char mcfg_oem_table_id[ACPI_OEM_TABLE_ID_SIZE];
|
||||
+static u32 mcfg_oem_revision;
|
||||
+
|
||||
+static void pci_mcfg_match_quirks(struct acpi_pci_root *root,
|
||||
+ struct resource *cfgres,
|
||||
+ struct pci_ecam_ops **ecam_ops)
|
||||
+{
|
||||
+ struct mcfg_fixup *f;
|
||||
+ int i;
|
||||
+
|
||||
+ /*
|
||||
+ * First match against PCI topology <domain:bus> then use OEM ID, OEM
|
||||
+ * table ID, and OEM revision from MCFG table standard header.
|
||||
+ */
|
||||
+ for (i = 0, f = mcfg_quirks; i < ARRAY_SIZE(mcfg_quirks); i++, f++) {
|
||||
+ if (f->seg == root->segment &&
|
||||
+ resource_contains(&f->bus_range, &root->secondary) &&
|
||||
+ !memcmp(f->oem_id, mcfg_oem_id, ACPI_OEM_ID_SIZE) &&
|
||||
+ !memcmp(f->oem_table_id, mcfg_oem_table_id,
|
||||
+ ACPI_OEM_TABLE_ID_SIZE) &&
|
||||
+ f->oem_revision == mcfg_oem_revision) {
|
||||
+ if (f->cfgres.start)
|
||||
+ *cfgres = f->cfgres;
|
||||
+ if (f->ops)
|
||||
+ *ecam_ops = f->ops;
|
||||
+ dev_info(&root->device->dev, "Applying PCI MCFG quirks for %s %s rev: %d\n",
|
||||
+ f->oem_id, f->oem_table_id, f->oem_revision);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
||||
/* List to save MCFG entries */
|
||||
static LIST_HEAD(pci_mcfg_list);
|
||||
@@ -61,14 +114,24 @@ int pci_mcfg_lookup(struct acpi_pci_root *root, struct resource *cfgres,
|
||||
|
||||
}
|
||||
|
||||
- if (!root->mcfg_addr)
|
||||
- return -ENXIO;
|
||||
-
|
||||
skip_lookup:
|
||||
memset(&res, 0, sizeof(res));
|
||||
- res.start = root->mcfg_addr + (bus_res->start << 20);
|
||||
- res.end = res.start + (resource_size(bus_res) << 20) - 1;
|
||||
- res.flags = IORESOURCE_MEM;
|
||||
+ if (root->mcfg_addr) {
|
||||
+ res.start = root->mcfg_addr + (bus_res->start << 20);
|
||||
+ res.end = res.start + (resource_size(bus_res) << 20) - 1;
|
||||
+ res.flags = IORESOURCE_MEM;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Let to override default ECAM ops and CFG resource range.
|
||||
+ * Also, this might even retrieve CFG resource range in case MCFG
|
||||
+ * does not have it. Invalid CFG start address means MCFG firmware bug
|
||||
+ * or we need another quirk in array.
|
||||
+ */
|
||||
+ pci_mcfg_match_quirks(root, &res, &ops);
|
||||
+ if (!res.start)
|
||||
+ return -ENXIO;
|
||||
+
|
||||
*cfgres = res;
|
||||
*ecam_ops = ops;
|
||||
return 0;
|
||||
@@ -101,6 +164,11 @@ static __init int pci_mcfg_parse(struct acpi_table_header *header)
|
||||
list_add(&e->list, &pci_mcfg_list);
|
||||
}
|
||||
|
||||
+ /* Save MCFG IDs and revision for quirks matching */
|
||||
+ memcpy(mcfg_oem_id, header->oem_id, ACPI_OEM_ID_SIZE);
|
||||
+ memcpy(mcfg_oem_table_id, header->oem_table_id, ACPI_OEM_TABLE_ID_SIZE);
|
||||
+ mcfg_oem_revision = header->revision;
|
||||
+
|
||||
pr_info("MCFG table detected, %d entries\n", n);
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 2243ab64c12a873e47b72c8e636b40ed09c5f0d4 Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Nowicki <tn@semihalf.com>
|
||||
Date: Fri, 9 Sep 2016 21:24:05 +0200
|
||||
Subject: [PATCH 3/6] PCI: thunder-pem: Allow to probe PEM-specific register
|
||||
range for ACPI case
|
||||
|
||||
thunder-pem driver stands for being ACPI based PCI host controller.
|
||||
However, there is no standard way to describe its PEM-specific register
|
||||
ranges in ACPI tables. Thus we add thunder_pem_init() ACPI extension
|
||||
to obtain hardcoded addresses from static resource array.
|
||||
Although it is not pretty, it prevents from creating standard mechanism to
|
||||
handle similar cases in future.
|
||||
|
||||
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
|
||||
---
|
||||
drivers/pci/host/pci-thunder-pem.c | 61 ++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 48 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/host/pci-thunder-pem.c b/drivers/pci/host/pci-thunder-pem.c
|
||||
index 6abaf80..b048761 100644
|
||||
--- a/drivers/pci/host/pci-thunder-pem.c
|
||||
+++ b/drivers/pci/host/pci-thunder-pem.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_pci.h>
|
||||
+#include <linux/pci-acpi.h>
|
||||
#include <linux/pci-ecam.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
@@ -284,6 +285,40 @@ static int thunder_pem_config_write(struct pci_bus *bus, unsigned int devfn,
|
||||
return pci_generic_config_write(bus, devfn, where, size, val);
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_ACPI
|
||||
+static struct resource thunder_pem_reg_res[] = {
|
||||
+ [4] = DEFINE_RES_MEM(0x87e0c0000000UL, SZ_16M),
|
||||
+ [5] = DEFINE_RES_MEM(0x87e0c1000000UL, SZ_16M),
|
||||
+ [6] = DEFINE_RES_MEM(0x87e0c2000000UL, SZ_16M),
|
||||
+ [7] = DEFINE_RES_MEM(0x87e0c3000000UL, SZ_16M),
|
||||
+ [8] = DEFINE_RES_MEM(0x87e0c4000000UL, SZ_16M),
|
||||
+ [9] = DEFINE_RES_MEM(0x87e0c5000000UL, SZ_16M),
|
||||
+ [14] = DEFINE_RES_MEM(0x97e0c0000000UL, SZ_16M),
|
||||
+ [15] = DEFINE_RES_MEM(0x97e0c1000000UL, SZ_16M),
|
||||
+ [16] = DEFINE_RES_MEM(0x97e0c2000000UL, SZ_16M),
|
||||
+ [17] = DEFINE_RES_MEM(0x97e0c3000000UL, SZ_16M),
|
||||
+ [18] = DEFINE_RES_MEM(0x97e0c4000000UL, SZ_16M),
|
||||
+ [19] = DEFINE_RES_MEM(0x97e0c5000000UL, SZ_16M),
|
||||
+};
|
||||
+
|
||||
+static struct resource *thunder_pem_acpi_res(struct pci_config_window *cfg)
|
||||
+{
|
||||
+ struct acpi_device *adev = to_acpi_device(cfg->parent);
|
||||
+ struct acpi_pci_root *root = acpi_driver_data(adev);
|
||||
+
|
||||
+ if ((root->segment >= 4 && root->segment <= 9) ||
|
||||
+ (root->segment >= 14 && root->segment <= 19))
|
||||
+ return &thunder_pem_reg_res[root->segment];
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+#else
|
||||
+static struct resource *thunder_pem_acpi_res(struct pci_config_window *cfg)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static int thunder_pem_init(struct pci_config_window *cfg)
|
||||
{
|
||||
struct device *dev = cfg->parent;
|
||||
@@ -292,24 +327,24 @@ static int thunder_pem_init(struct pci_config_window *cfg)
|
||||
struct thunder_pem_pci *pem_pci;
|
||||
struct platform_device *pdev;
|
||||
|
||||
- /* Only OF support for now */
|
||||
- if (!dev->of_node)
|
||||
- return -EINVAL;
|
||||
-
|
||||
pem_pci = devm_kzalloc(dev, sizeof(*pem_pci), GFP_KERNEL);
|
||||
if (!pem_pci)
|
||||
return -ENOMEM;
|
||||
|
||||
- pdev = to_platform_device(dev);
|
||||
-
|
||||
- /*
|
||||
- * The second register range is the PEM bridge to the PCIe
|
||||
- * bus. It has a different config access method than those
|
||||
- * devices behind the bridge.
|
||||
- */
|
||||
- res_pem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
+ if (acpi_disabled) {
|
||||
+ pdev = to_platform_device(dev);
|
||||
+
|
||||
+ /*
|
||||
+ * The second register range is the PEM bridge to the PCIe
|
||||
+ * bus. It has a different config access method than those
|
||||
+ * devices behind the bridge.
|
||||
+ */
|
||||
+ res_pem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
+ } else {
|
||||
+ res_pem = thunder_pem_acpi_res(cfg);
|
||||
+ }
|
||||
if (!res_pem) {
|
||||
- dev_err(dev, "missing \"reg[1]\"property\n");
|
||||
+ dev_err(dev, "missing configuration region\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 443d85d47ee00b3f0b6f39d470a11e7eb116817d Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Nowicki <tn@semihalf.com>
|
||||
Date: Fri, 9 Sep 2016 21:24:06 +0200
|
||||
Subject: [PATCH 4/6] PCI: thunder: Enable ACPI PCI controller for ThunderX
|
||||
pass2.x silicon version
|
||||
|
||||
ThunderX PCIe controller to off-chip devices (so-called PEM) is not fully
|
||||
compliant with ECAM standard. It uses non-standard configuration space
|
||||
accessors (see pci_thunder_pem_ops) and custom configuration space granulation
|
||||
(see bus_shift = 24). In order to access configuration space and
|
||||
probe PEM as ACPI based PCI host controller we need to add MCFG quirk
|
||||
infrastructure. This involves:
|
||||
1. Export PEM pci_thunder_pem_ops structure so it is visible to MCFG quirk
|
||||
code.
|
||||
2. New quirk entries for each PEM segment. Each contains platform IDs,
|
||||
mentioned pci_thunder_pem_ops and CFG resources.
|
||||
|
||||
Quirk is considered for ThunderX silicon pass2.x only which is identified
|
||||
via MCFG revision 1.
|
||||
|
||||
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
|
||||
---
|
||||
drivers/acpi/pci_mcfg.c | 27 +++++++++++++++++++++++++++
|
||||
drivers/pci/host/pci-thunder-pem.c | 2 +-
|
||||
include/linux/pci-ecam.h | 4 ++++
|
||||
3 files changed, 32 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index 2b8acc7..1f73d7b 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -51,6 +51,33 @@ struct mcfg_fixup {
|
||||
|
||||
static struct mcfg_fixup mcfg_quirks[] = {
|
||||
/* { OEM_ID, OEM_TABLE_ID, REV, DOMAIN, BUS_RANGE, cfgres, ops }, */
|
||||
+#ifdef CONFIG_PCI_HOST_THUNDER_PEM
|
||||
+ /* SoC pass2.x */
|
||||
+ { "CAVIUM", "THUNDERX", 1, 4, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x88001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 5, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x884057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 6, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x88808f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 7, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x89001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 8, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x894057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 9, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x89808f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 14, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x98001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 15, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x984057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 16, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x98808f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 17, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x99001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 18, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x994057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 19, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x99808f000000UL, 0x39 * SZ_16M) },
|
||||
+#endif
|
||||
};
|
||||
|
||||
static char mcfg_oem_id[ACPI_OEM_ID_SIZE];
|
||||
diff --git a/drivers/pci/host/pci-thunder-pem.c b/drivers/pci/host/pci-thunder-pem.c
|
||||
index b048761..d7c10cc 100644
|
||||
--- a/drivers/pci/host/pci-thunder-pem.c
|
||||
+++ b/drivers/pci/host/pci-thunder-pem.c
|
||||
@@ -367,7 +367,7 @@ static int thunder_pem_init(struct pci_config_window *cfg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static struct pci_ecam_ops pci_thunder_pem_ops = {
|
||||
+struct pci_ecam_ops pci_thunder_pem_ops = {
|
||||
.bus_shift = 24,
|
||||
.init = thunder_pem_init,
|
||||
.pci_ops = {
|
||||
diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
|
||||
index 7adad20..65505ea 100644
|
||||
--- a/include/linux/pci-ecam.h
|
||||
+++ b/include/linux/pci-ecam.h
|
||||
@@ -58,6 +58,10 @@ void __iomem *pci_ecam_map_bus(struct pci_bus *bus, unsigned int devfn,
|
||||
int where);
|
||||
/* default ECAM ops */
|
||||
extern struct pci_ecam_ops pci_generic_ecam_ops;
|
||||
+/* ECAM ops for known quirks */
|
||||
+#ifdef CONFIG_PCI_HOST_THUNDER_PEM
|
||||
+extern struct pci_ecam_ops pci_thunder_pem_ops;
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HOST_GENERIC
|
||||
/* for DT-based PCI controllers that support ECAM */
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 6eca99cc392a11bb07b9ef88bca71a85f8bbe273 Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Nowicki <tn@semihalf.com>
|
||||
Date: Fri, 9 Sep 2016 21:24:07 +0200
|
||||
Subject: [PATCH 5/6] PCI: thunder: Enable ACPI PCI controller for ThunderX
|
||||
pass1.x silicon version
|
||||
|
||||
ThunderX pass1.x requires to emulate the EA headers for on-chip devices
|
||||
hence it has to use custom pci_thunder_ecam_ops for accessing PCI config
|
||||
space (pci-thuner-ecam.c). Add new entries to MCFG quirk array where they
|
||||
can be applied while probing ACPI based PCI host controller.
|
||||
|
||||
ThunderX pass1.x is using the same way for accessing off-chip devices
|
||||
(so-called PEM) as silicon pass-2.x so we need to add PEM quirk
|
||||
entries too.
|
||||
|
||||
Quirk is considered for ThunderX silicon pass1.x only which is identified
|
||||
via MCFG revision 2.
|
||||
|
||||
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
|
||||
---
|
||||
drivers/acpi/pci_mcfg.c | 45 +++++++++++++++++++++++++++++++++++++
|
||||
drivers/pci/host/pci-thunder-ecam.c | 2 +-
|
||||
include/linux/pci-ecam.h | 3 +++
|
||||
3 files changed, 49 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index 1f73d7b..eb14f74 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -77,6 +77,51 @@ static struct mcfg_fixup mcfg_quirks[] = {
|
||||
DEFINE_RES_MEM(0x994057000000UL, 0x39 * SZ_16M) },
|
||||
{ "CAVIUM", "THUNDERX", 1, 19, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
DEFINE_RES_MEM(0x99808f000000UL, 0x39 * SZ_16M) },
|
||||
+
|
||||
+ /* SoC pass1.x */
|
||||
+ { "CAVIUM", "THUNDERX", 2, 4, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x88001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 5, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x884057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 6, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x88808f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 7, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x89001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 8, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x894057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 9, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x89808f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 14, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x98001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 15, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x984057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 16, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x98808f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 17, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x99001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 18, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x994057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 19, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x99808f000000UL, 0x39 * SZ_16M) },
|
||||
+#endif
|
||||
+#ifdef CONFIG_PCI_HOST_THUNDER_ECAM
|
||||
+ /* SoC pass1.x */
|
||||
+ { "CAVIUM", "THUNDERX", 2, 0, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 1, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 2, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 3, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 10, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 11, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 12, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 13, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
#endif
|
||||
};
|
||||
|
||||
diff --git a/drivers/pci/host/pci-thunder-ecam.c b/drivers/pci/host/pci-thunder-ecam.c
|
||||
index d50a3dc..b6c17e2 100644
|
||||
--- a/drivers/pci/host/pci-thunder-ecam.c
|
||||
+++ b/drivers/pci/host/pci-thunder-ecam.c
|
||||
@@ -346,7 +346,7 @@ static int thunder_ecam_config_write(struct pci_bus *bus, unsigned int devfn,
|
||||
return pci_generic_config_write(bus, devfn, where, size, val);
|
||||
}
|
||||
|
||||
-static struct pci_ecam_ops pci_thunder_ecam_ops = {
|
||||
+struct pci_ecam_ops pci_thunder_ecam_ops = {
|
||||
.bus_shift = 20,
|
||||
.pci_ops = {
|
||||
.map_bus = pci_ecam_map_bus,
|
||||
diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
|
||||
index 65505ea..35f0e81 100644
|
||||
--- a/include/linux/pci-ecam.h
|
||||
+++ b/include/linux/pci-ecam.h
|
||||
@@ -62,6 +62,9 @@ extern struct pci_ecam_ops pci_generic_ecam_ops;
|
||||
#ifdef CONFIG_PCI_HOST_THUNDER_PEM
|
||||
extern struct pci_ecam_ops pci_thunder_pem_ops;
|
||||
#endif
|
||||
+#ifdef CONFIG_PCI_HOST_THUNDER_ECAM
|
||||
+extern struct pci_ecam_ops pci_thunder_ecam_ops;
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HOST_GENERIC
|
||||
/* for DT-based PCI controllers that support ECAM */
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 3080ac5bb527155ccdf8490ce221b1c6ad01f502 Mon Sep 17 00:00:00 2001
|
||||
From: Duc Dang <dhdang@apm.com>
|
||||
Date: Sat, 17 Sep 2016 07:24:38 -0700
|
||||
Subject: [PATCH 6/6] PCI/ACPI: xgene: Add ECAM quirk for X-Gene PCIe
|
||||
controller
|
||||
|
||||
PCIe controller in X-Gene SoCs is not ECAM compliant: software
|
||||
needs to configure additional concontroller register to address
|
||||
device at bus:dev:function.
|
||||
|
||||
This patch depends on "ECAM quirks handling for ARM64 platforms"
|
||||
series (http://www.spinics.net/lists/arm-kernel/msg530692.html)
|
||||
to address the limitation above for X-Gene PCIe controller.
|
||||
|
||||
The quirk will only be applied for X-Gene PCIe MCFG table with
|
||||
OEM revison 1, 2, 3 or 4 (PCIe controller v1 and v2 on X-Gene SoCs).
|
||||
|
||||
Signed-off-by: Duc Dang <dhdang@apm.com>
|
||||
---
|
||||
drivers/acpi/pci_mcfg.c | 32 +++++
|
||||
drivers/pci/host/Makefile | 2 +-
|
||||
drivers/pci/host/pci-xgene-ecam.c | 280 ++++++++++++++++++++++++++++++++++++++
|
||||
include/linux/pci-ecam.h | 5 +
|
||||
4 files changed, 318 insertions(+), 1 deletion(-)
|
||||
create mode 100644 drivers/pci/host/pci-xgene-ecam.c
|
||||
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index eb14f74..635ab24 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -123,6 +123,38 @@ static struct mcfg_fixup mcfg_quirks[] = {
|
||||
{ "CAVIUM", "THUNDERX", 2, 13, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
MCFG_RES_EMPTY},
|
||||
#endif
|
||||
+#ifdef CONFIG_PCI_XGENE
|
||||
+ {"APM ", "XGENE ", 1, 0, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 1, 1, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 1, 2, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 1, 3, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 1, 4, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 2, 0, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 2, 1, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 2, 2, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 2, 3, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 2, 4, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 3, 0, MCFG_BUS_ANY,
|
||||
+ &xgene_v2_1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 3, 1, MCFG_BUS_ANY,
|
||||
+ &xgene_v2_1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 4, 0, MCFG_BUS_ANY,
|
||||
+ &xgene_v2_2_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 4, 1, MCFG_BUS_ANY,
|
||||
+ &xgene_v2_2_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 4, 2, MCFG_BUS_ANY,
|
||||
+ &xgene_v2_2_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+#endif
|
||||
};
|
||||
|
||||
static char mcfg_oem_id[ACPI_OEM_ID_SIZE];
|
||||
diff --git a/drivers/pci/host/Makefile b/drivers/pci/host/Makefile
|
||||
index 8843410..af4f505 100644
|
||||
--- a/drivers/pci/host/Makefile
|
||||
+++ b/drivers/pci/host/Makefile
|
||||
@@ -15,7 +15,7 @@ obj-$(CONFIG_PCIE_SPEAR13XX) += pcie-spear13xx.o
|
||||
obj-$(CONFIG_PCI_KEYSTONE) += pci-keystone-dw.o pci-keystone.o
|
||||
obj-$(CONFIG_PCIE_XILINX) += pcie-xilinx.o
|
||||
obj-$(CONFIG_PCIE_XILINX_NWL) += pcie-xilinx-nwl.o
|
||||
-obj-$(CONFIG_PCI_XGENE) += pci-xgene.o
|
||||
+obj-$(CONFIG_PCI_XGENE) += pci-xgene.o pci-xgene-ecam.o
|
||||
obj-$(CONFIG_PCI_XGENE_MSI) += pci-xgene-msi.o
|
||||
obj-$(CONFIG_PCI_LAYERSCAPE) += pci-layerscape.o
|
||||
obj-$(CONFIG_PCI_VERSATILE) += pci-versatile.o
|
||||
diff --git a/drivers/pci/host/pci-xgene-ecam.c b/drivers/pci/host/pci-xgene-ecam.c
|
||||
new file mode 100644
|
||||
index 0000000..b66a04f
|
||||
--- /dev/null
|
||||
+++ b/drivers/pci/host/pci-xgene-ecam.c
|
||||
@@ -0,0 +1,280 @@
|
||||
+/*
|
||||
+ * APM X-Gene PCIe ECAM fixup driver
|
||||
+ *
|
||||
+ * Copyright (c) 2016, Applied Micro Circuits Corporation
|
||||
+ * Author:
|
||||
+ * Duc Dang <dhdang@apm.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of_address.h>
|
||||
+#include <linux/of_pci.h>
|
||||
+#include <linux/pci-acpi.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/pci-ecam.h>
|
||||
+
|
||||
+#ifdef CONFIG_ACPI
|
||||
+#define RTDID 0x160
|
||||
+#define ROOT_CAP_AND_CTRL 0x5C
|
||||
+
|
||||
+/* PCIe IP version */
|
||||
+#define XGENE_PCIE_IP_VER_UNKN 0
|
||||
+#define XGENE_PCIE_IP_VER_1 1
|
||||
+#define XGENE_PCIE_IP_VER_2 2
|
||||
+
|
||||
+#define XGENE_CSR_LENGTH 0x10000
|
||||
+
|
||||
+struct xgene_pcie_acpi_root {
|
||||
+ void __iomem *csr_base;
|
||||
+ u32 version;
|
||||
+};
|
||||
+
|
||||
+static int xgene_v1_pcie_ecam_init(struct pci_config_window *cfg)
|
||||
+{
|
||||
+ struct xgene_pcie_acpi_root *xgene_root;
|
||||
+ struct device *dev = cfg->parent;
|
||||
+ u32 csr_base;
|
||||
+
|
||||
+ xgene_root = devm_kzalloc(dev, sizeof(*xgene_root), GFP_KERNEL);
|
||||
+ if (!xgene_root)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ switch (cfg->res.start) {
|
||||
+ case 0xE0D0000000ULL:
|
||||
+ csr_base = 0x1F2B0000;
|
||||
+ break;
|
||||
+ case 0xD0D0000000ULL:
|
||||
+ csr_base = 0x1F2C0000;
|
||||
+ break;
|
||||
+ case 0x90D0000000ULL:
|
||||
+ csr_base = 0x1F2D0000;
|
||||
+ break;
|
||||
+ case 0xA0D0000000ULL:
|
||||
+ csr_base = 0x1F500000;
|
||||
+ break;
|
||||
+ case 0xC0D0000000ULL:
|
||||
+ csr_base = 0x1F510000;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->csr_base = ioremap(csr_base, XGENE_CSR_LENGTH);
|
||||
+ if (!xgene_root->csr_base) {
|
||||
+ kfree(xgene_root);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->version = XGENE_PCIE_IP_VER_1;
|
||||
+
|
||||
+ cfg->priv = xgene_root;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int xgene_v2_1_pcie_ecam_init(struct pci_config_window *cfg)
|
||||
+{
|
||||
+ struct xgene_pcie_acpi_root *xgene_root;
|
||||
+ struct device *dev = cfg->parent;
|
||||
+ resource_size_t csr_base;
|
||||
+
|
||||
+ xgene_root = devm_kzalloc(dev, sizeof(*xgene_root), GFP_KERNEL);
|
||||
+ if (!xgene_root)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ switch (cfg->res.start) {
|
||||
+ case 0xC0D0000000ULL:
|
||||
+ csr_base = 0x1F2B0000;
|
||||
+ break;
|
||||
+ case 0xA0D0000000ULL:
|
||||
+ csr_base = 0x1F2C0000;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->csr_base = ioremap(csr_base, XGENE_CSR_LENGTH);
|
||||
+ if (!xgene_root->csr_base) {
|
||||
+ kfree(xgene_root);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->version = XGENE_PCIE_IP_VER_2;
|
||||
+
|
||||
+ cfg->priv = xgene_root;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int xgene_v2_2_pcie_ecam_init(struct pci_config_window *cfg)
|
||||
+{
|
||||
+ struct xgene_pcie_acpi_root *xgene_root;
|
||||
+ struct device *dev = cfg->parent;
|
||||
+ resource_size_t csr_base;
|
||||
+
|
||||
+ xgene_root = devm_kzalloc(dev, sizeof(*xgene_root), GFP_KERNEL);
|
||||
+ if (!xgene_root)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ switch (cfg->res.start) {
|
||||
+ case 0xE0D0000000ULL:
|
||||
+ csr_base = 0x1F2B0000;
|
||||
+ break;
|
||||
+ case 0xA0D0000000ULL:
|
||||
+ csr_base = 0x1F500000;
|
||||
+ break;
|
||||
+ case 0x90D0000000ULL:
|
||||
+ csr_base = 0x1F2D0000;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->csr_base = ioremap(csr_base, XGENE_CSR_LENGTH);
|
||||
+ if (!xgene_root->csr_base) {
|
||||
+ kfree(xgene_root);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->version = XGENE_PCIE_IP_VER_2;
|
||||
+
|
||||
+ cfg->priv = xgene_root;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+/*
|
||||
+ * For Configuration request, RTDID register is used as Bus Number,
|
||||
+ * Device Number and Function number of the header fields.
|
||||
+ */
|
||||
+static void xgene_pcie_set_rtdid_reg(struct pci_bus *bus, uint devfn)
|
||||
+{
|
||||
+ struct pci_config_window *cfg = bus->sysdata;
|
||||
+ struct xgene_pcie_acpi_root *port = cfg->priv;
|
||||
+ unsigned int b, d, f;
|
||||
+ u32 rtdid_val = 0;
|
||||
+
|
||||
+ b = bus->number;
|
||||
+ d = PCI_SLOT(devfn);
|
||||
+ f = PCI_FUNC(devfn);
|
||||
+
|
||||
+ if (!pci_is_root_bus(bus))
|
||||
+ rtdid_val = (b << 8) | (d << 3) | f;
|
||||
+
|
||||
+ writel(rtdid_val, port->csr_base + RTDID);
|
||||
+ /* read the register back to ensure flush */
|
||||
+ readl(port->csr_base + RTDID);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * X-Gene PCIe port uses BAR0-BAR1 of RC's configuration space as
|
||||
+ * the translation from PCI bus to native BUS. Entire DDR region
|
||||
+ * is mapped into PCIe space using these registers, so it can be
|
||||
+ * reached by DMA from EP devices. The BAR0/1 of bridge should be
|
||||
+ * hidden during enumeration to avoid the sizing and resource allocation
|
||||
+ * by PCIe core.
|
||||
+ */
|
||||
+static bool xgene_pcie_hide_rc_bars(struct pci_bus *bus, int offset)
|
||||
+{
|
||||
+ if (pci_is_root_bus(bus) && ((offset == PCI_BASE_ADDRESS_0) ||
|
||||
+ (offset == PCI_BASE_ADDRESS_1)))
|
||||
+ return true;
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+void __iomem *xgene_pcie_ecam_map_bus(struct pci_bus *bus,
|
||||
+ unsigned int devfn, int where)
|
||||
+{
|
||||
+ struct pci_config_window *cfg = bus->sysdata;
|
||||
+ unsigned int busn = bus->number;
|
||||
+ void __iomem *base;
|
||||
+
|
||||
+ if (busn < cfg->busr.start || busn > cfg->busr.end)
|
||||
+ return NULL;
|
||||
+
|
||||
+ if ((pci_is_root_bus(bus) && devfn != 0) ||
|
||||
+ xgene_pcie_hide_rc_bars(bus, where))
|
||||
+ return NULL;
|
||||
+
|
||||
+ xgene_pcie_set_rtdid_reg(bus, devfn);
|
||||
+
|
||||
+ if (busn > cfg->busr.start)
|
||||
+ base = cfg->win + (1 << cfg->ops->bus_shift);
|
||||
+ else
|
||||
+ base = cfg->win;
|
||||
+
|
||||
+ return base + where;
|
||||
+}
|
||||
+
|
||||
+static int xgene_pcie_config_read32(struct pci_bus *bus, unsigned int devfn,
|
||||
+ int where, int size, u32 *val)
|
||||
+{
|
||||
+ struct pci_config_window *cfg = bus->sysdata;
|
||||
+ struct xgene_pcie_acpi_root *port = cfg->priv;
|
||||
+
|
||||
+ if (pci_generic_config_read32(bus, devfn, where & ~0x3, 4, val) !=
|
||||
+ PCIBIOS_SUCCESSFUL)
|
||||
+ return PCIBIOS_DEVICE_NOT_FOUND;
|
||||
+
|
||||
+ /*
|
||||
+ * The v1 controller has a bug in its Configuration Request
|
||||
+ * Retry Status (CRS) logic: when CRS is enabled and we read the
|
||||
+ * Vendor and Device ID of a non-existent device, the controller
|
||||
+ * fabricates return data of 0xFFFF0001 ("device exists but is not
|
||||
+ * ready") instead of 0xFFFFFFFF ("device does not exist"). This
|
||||
+ * causes the PCI core to retry the read until it times out.
|
||||
+ * Avoid this by not claiming to support CRS.
|
||||
+ */
|
||||
+ if (pci_is_root_bus(bus) && (port->version == XGENE_PCIE_IP_VER_1) &&
|
||||
+ ((where & ~0x3) == ROOT_CAP_AND_CTRL))
|
||||
+ *val &= ~(PCI_EXP_RTCAP_CRSVIS << 16);
|
||||
+
|
||||
+ if (size <= 2)
|
||||
+ *val = (*val >> (8 * (where & 3))) & ((1 << (size * 8)) - 1);
|
||||
+
|
||||
+ return PCIBIOS_SUCCESSFUL;
|
||||
+}
|
||||
+
|
||||
+struct pci_ecam_ops xgene_v1_pcie_ecam_ops = {
|
||||
+ .bus_shift = 16,
|
||||
+ .init = xgene_v1_pcie_ecam_init,
|
||||
+ .pci_ops = {
|
||||
+ .map_bus = xgene_pcie_ecam_map_bus,
|
||||
+ .read = xgene_pcie_config_read32,
|
||||
+ .write = pci_generic_config_write,
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+struct pci_ecam_ops xgene_v2_1_pcie_ecam_ops = {
|
||||
+ .bus_shift = 16,
|
||||
+ .init = xgene_v2_1_pcie_ecam_init,
|
||||
+ .pci_ops = {
|
||||
+ .map_bus = xgene_pcie_ecam_map_bus,
|
||||
+ .read = xgene_pcie_config_read32,
|
||||
+ .write = pci_generic_config_write,
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+struct pci_ecam_ops xgene_v2_2_pcie_ecam_ops = {
|
||||
+ .bus_shift = 16,
|
||||
+ .init = xgene_v2_2_pcie_ecam_init,
|
||||
+ .pci_ops = {
|
||||
+ .map_bus = xgene_pcie_ecam_map_bus,
|
||||
+ .read = xgene_pcie_config_read32,
|
||||
+ .write = pci_generic_config_write,
|
||||
+ }
|
||||
+};
|
||||
+#endif
|
||||
diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
|
||||
index 35f0e81..40da3e7 100644
|
||||
--- a/include/linux/pci-ecam.h
|
||||
+++ b/include/linux/pci-ecam.h
|
||||
@@ -65,6 +65,11 @@ extern struct pci_ecam_ops pci_thunder_pem_ops;
|
||||
#ifdef CONFIG_PCI_HOST_THUNDER_ECAM
|
||||
extern struct pci_ecam_ops pci_thunder_ecam_ops;
|
||||
#endif
|
||||
+#ifdef CONFIG_PCI_XGENE
|
||||
+extern struct pci_ecam_ops xgene_v1_pcie_ecam_ops;
|
||||
+extern struct pci_ecam_ops xgene_v2_1_pcie_ecam_ops;
|
||||
+extern struct pci_ecam_ops xgene_v2_2_pcie_ecam_ops;
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HOST_GENERIC
|
||||
/* for DT-based PCI controllers that support ECAM */
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
From 32f701d40657cc3c982b8cba4bf73452ccdd6697 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Mar 2012 08:46:50 -0500
|
||||
Subject: [PATCH 05/20] asus-wmi: Restrict debugfs interface when module
|
||||
loading is restricted
|
||||
|
||||
We have no way of validating what all of the Asus WMI methods do on a
|
||||
given machine, and there's a risk that some will allow hardware state to
|
||||
be manipulated in such a way that arbitrary code can be executed in the
|
||||
kernel, circumventing module loading restrictions. Prevent that if any of
|
||||
these features are enabled.
|
||||
|
||||
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
---
|
||||
drivers/platform/x86/asus-wmi.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
|
||||
index efbc3f0c592b..071171be4b7f 100644
|
||||
--- a/drivers/platform/x86/asus-wmi.c
|
||||
+++ b/drivers/platform/x86/asus-wmi.c
|
||||
@@ -1868,6 +1868,9 @@ static int show_dsts(struct seq_file *m, void *data)
|
||||
int err;
|
||||
u32 retval = -1;
|
||||
|
||||
+ if (secure_modules())
|
||||
+ return -EPERM;
|
||||
+
|
||||
err = asus_wmi_get_devstate(asus, asus->debug.dev_id, &retval);
|
||||
|
||||
if (err < 0)
|
||||
@@ -1884,6 +1887,9 @@ static int show_devs(struct seq_file *m, void *data)
|
||||
int err;
|
||||
u32 retval = -1;
|
||||
|
||||
+ if (secure_modules())
|
||||
+ return -EPERM;
|
||||
+
|
||||
err = asus_wmi_set_devstate(asus->debug.dev_id, asus->debug.ctrl_param,
|
||||
&retval);
|
||||
|
||||
@@ -1908,6 +1914,9 @@ static int show_call(struct seq_file *m, void *data)
|
||||
union acpi_object *obj;
|
||||
acpi_status status;
|
||||
|
||||
+ if (secure_modules())
|
||||
+ return -EPERM;
|
||||
+
|
||||
status = wmi_evaluate_method(ASUS_WMI_MGMT_GUID,
|
||||
1, asus->debug.method_id,
|
||||
&input, &output);
|
||||
--
|
||||
2.4.3
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
From: "kernel-team@fedoraproject.org" <kernel-team@fedoraproject.org>
|
||||
Date: Wed, 6 Feb 2013 09:57:47 -0500
|
||||
Subject: [PATCH] ath9k: rx dma stop check
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/mac.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
|
||||
index bba85d1a6cd1..ebbee8f17130 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/mac.c
|
||||
@@ -693,7 +693,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset)
|
||||
{
|
||||
#define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
- u32 mac_status, last_mac_status = 0;
|
||||
+ u32 mac_status = 0, last_mac_status = 0;
|
||||
int i;
|
||||
|
||||
/* Enable access to the DMA observation bus */
|
||||
@@ -723,6 +723,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset)
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
+ if (!AR_SREV_9300_20_OR_LATER(ah) &&
|
||||
+ (mac_status & 0x700) == 0) {
|
||||
+ /*
|
||||
+ * DMA is idle but the MAC is still stuck
|
||||
+ * processing events
|
||||
+ */
|
||||
+ *reset = true;
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
ath_err(common,
|
||||
"DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n",
|
||||
AH_RX_STOP_DMA_TIMEOUT / 1000,
|
|
@ -0,0 +1,153 @@
|
|||
From a2858804c7f5f4585b718543236b7ba3b3ec813a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Mon, 29 Aug 2016 09:14:15 +0100
|
||||
Subject: [PATCH] ARM: bcm283x: Add devicetree for the Raspberry Pi 3.
|
||||
|
||||
For now this doesn't support the new hardware present on the Pi 3 (BT,
|
||||
wifi, GPIO expander).
|
||||
|
||||
Rebased to the patch that went upstream for ARM64
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 3 +-
|
||||
arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 30 ++++++++++++++
|
||||
arch/arm/boot/dts/bcm2837.dtsi | 76 +++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 108 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm/boot/dts/bcm2837-rpi-3-b.dts
|
||||
create mode 100644 arch/arm/boot/dts/bcm2837.dtsi
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index faacd52..ec41888 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -69,7 +69,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
|
||||
bcm2835-rpi-b-rev2.dtb \
|
||||
bcm2835-rpi-b-plus.dtb \
|
||||
bcm2835-rpi-a-plus.dtb \
|
||||
- bcm2836-rpi-2-b.dtb
|
||||
+ bcm2836-rpi-2-b.dtb \
|
||||
+ bcm2837-rpi-3-b.dtb
|
||||
dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm4708-asus-rt-ac56u.dtb \
|
||||
bcm4708-asus-rt-ac68u.dtb \
|
||||
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
|
||||
new file mode 100644
|
||||
index 0000000..7841b72
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
|
||||
@@ -0,0 +1,30 @@
|
||||
+/dts-v1/;
|
||||
+#include "bcm2837.dtsi"
|
||||
+#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9514.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
|
||||
+ model = "Raspberry Pi 3 Model B";
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0 0x40000000>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ act {
|
||||
+ gpios = <&gpio 47 0>;
|
||||
+ };
|
||||
+
|
||||
+ pwr {
|
||||
+ label = "PWR";
|
||||
+ gpios = <&gpio 35 0>;
|
||||
+ default-state = "keep";
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/bcm2837.dtsi b/arch/arm/boot/dts/bcm2837.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..8216bbb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm2837.dtsi
|
||||
@@ -0,0 +1,76 @@
|
||||
+#include "bcm283x.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "brcm,bcm2836";
|
||||
+
|
||||
+ soc {
|
||||
+ ranges = <0x7e000000 0x3f000000 0x1000000>,
|
||||
+ <0x40000000 0x40000000 0x00001000>;
|
||||
+ dma-ranges = <0xc0000000 0x00000000 0x3f000000>;
|
||||
+
|
||||
+ local_intc: local_intc {
|
||||
+ compatible = "brcm,bcm2836-l1-intc";
|
||||
+ reg = <0x40000000 0x100>;
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <1>;
|
||||
+ interrupt-parent = <&local_intc>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ timer {
|
||||
+ compatible = "arm,armv7-timer";
|
||||
+ interrupt-parent = <&local_intc>;
|
||||
+ interrupts = <0>, // PHYS_SECURE_PPI
|
||||
+ <1>, // PHYS_NONSECURE_PPI
|
||||
+ <3>, // VIRT_PPI
|
||||
+ <2>; // HYP_PPI
|
||||
+ always-on;
|
||||
+ };
|
||||
+
|
||||
+ cpus: cpus {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ cpu0: cpu@0 {
|
||||
+ device_type = "cpu";
|
||||
+ compatible = "arm,cortex-a53";
|
||||
+ reg = <0>;
|
||||
+ enable-method = "spin-table";
|
||||
+ cpu-release-addr = <0x0 0x000000d8>;
|
||||
+ };
|
||||
+
|
||||
+ cpu1: cpu@1 {
|
||||
+ device_type = "cpu";
|
||||
+ compatible = "arm,cortex-a53";
|
||||
+ reg = <1>;
|
||||
+ enable-method = "spin-table";
|
||||
+ cpu-release-addr = <0x0 0x000000e0>;
|
||||
+ };
|
||||
+
|
||||
+ cpu2: cpu@2 {
|
||||
+ device_type = "cpu";
|
||||
+ compatible = "arm,cortex-a53";
|
||||
+ reg = <2>;
|
||||
+ enable-method = "spin-table";
|
||||
+ cpu-release-addr = <0x0 0x000000e8>;
|
||||
+ };
|
||||
+
|
||||
+ cpu3: cpu@3 {
|
||||
+ device_type = "cpu";
|
||||
+ compatible = "arm,cortex-a53";
|
||||
+ reg = <3>;
|
||||
+ enable-method = "spin-table";
|
||||
+ cpu-release-addr = <0x0 0x000000f0>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+/* Make the BCM2835-style global interrupt controller be a child of the
|
||||
+ * CPU-local interrupt controller.
|
||||
+ */
|
||||
+&intc {
|
||||
+ compatible = "brcm,bcm2836-armctrl-ic";
|
||||
+ reg = <0x7e00b200 0x200>;
|
||||
+ interrupt-parent = <&local_intc>;
|
||||
+ interrupts = <8>;
|
||||
+};
|
||||
--
|
||||
2.9.3
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,682 @@
|
|||
From 9db79f3a51c97e0cfcde1b25299e8db9ee3d64ab Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Wed, 14 Sep 2016 19:21:29 +0100
|
||||
Subject: [PATCH 1/4] drm/vc4: Fall back to using an EDID probe in the absence
|
||||
of a GPIO.
|
||||
|
||||
On Pi0/1/2, we use an external GPIO line for hotplug detection, since
|
||||
the HDMI_HOTPLUG register isn't connected to anything. However, with
|
||||
the Pi3 the HPD GPIO line has moved off to a GPIO expander that will
|
||||
be tricky to get to (the firmware is constantly polling the expander
|
||||
using i2c0, so we'll need to coordinate with it).
|
||||
|
||||
As a stop-gap, if we don't have a GPIO line, use an EDID probe to
|
||||
detect connection. Fixes HDMI display on the pi3.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_hdmi.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
index 4452f36..5adc0c7 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
@@ -174,6 +174,9 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force)
|
||||
return connector_status_disconnected;
|
||||
}
|
||||
|
||||
+ if (drm_probe_ddc(vc4->hdmi->ddc))
|
||||
+ return connector_status_connected;
|
||||
+
|
||||
if (HDMI_READ(VC4_HDMI_HOTPLUG) & VC4_HDMI_HOTPLUG_CONNECTED)
|
||||
return connector_status_connected;
|
||||
else
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 7b4c39f34fbbdfe0cd0e626686ee01ab96601598 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Fri, 16 Sep 2016 10:59:45 +0100
|
||||
Subject: [PATCH 2/4] drm/vc4: Enable limited range RGB output on HDMI with CEA
|
||||
modes.
|
||||
|
||||
Fixes broken grayscale ramps on many HDMI monitors, where large areas
|
||||
at the ends of the ramp would all appear as black or white.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_hdmi.c | 31 +++++++++++++++++++++++++++++--
|
||||
drivers/gpu/drm/vc4/vc4_regs.h | 9 ++++++++-
|
||||
2 files changed, 37 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
index 5adc0c7..5df4e74 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
@@ -276,6 +276,7 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
struct drm_display_mode *unadjusted_mode,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
+ struct vc4_hdmi_encoder *vc4_encoder = to_vc4_hdmi_encoder(encoder);
|
||||
struct drm_device *dev = encoder->dev;
|
||||
struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
bool debug_dump_regs = false;
|
||||
@@ -291,6 +292,7 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
u32 vertb = (VC4_SET_FIELD(0, VC4_HDMI_VERTB_VSPO) |
|
||||
VC4_SET_FIELD(mode->vtotal - mode->vsync_end,
|
||||
VC4_HDMI_VERTB_VBP));
|
||||
+ u32 csc_ctl;
|
||||
|
||||
if (debug_dump_regs) {
|
||||
DRM_INFO("HDMI regs before:\n");
|
||||
@@ -329,9 +331,34 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
(vsync_pos ? 0 : VC4_HD_VID_CTL_VSYNC_LOW) |
|
||||
(hsync_pos ? 0 : VC4_HD_VID_CTL_HSYNC_LOW));
|
||||
|
||||
+ csc_ctl = VC4_SET_FIELD(VC4_HD_CSC_CTL_ORDER_BGR,
|
||||
+ VC4_HD_CSC_CTL_ORDER);
|
||||
+
|
||||
+ if (vc4_encoder->hdmi_monitor && drm_match_cea_mode(mode) > 1) {
|
||||
+ /* CEA VICs other than #1 requre limited range RGB
|
||||
+ * output. Apply a colorspace conversion to squash
|
||||
+ * 0-255 down to 16-235. The matrix here is:
|
||||
+ *
|
||||
+ * [ 0 0 0.8594 16]
|
||||
+ * [ 0 0.8594 0 16]
|
||||
+ * [ 0.8594 0 0 16]
|
||||
+ * [ 0 0 0 1]
|
||||
+ */
|
||||
+ csc_ctl |= VC4_HD_CSC_CTL_ENABLE;
|
||||
+ csc_ctl |= VC4_HD_CSC_CTL_RGB2YCC;
|
||||
+ csc_ctl |= VC4_SET_FIELD(VC4_HD_CSC_CTL_MODE_CUSTOM,
|
||||
+ VC4_HD_CSC_CTL_MODE);
|
||||
+
|
||||
+ HD_WRITE(VC4_HD_CSC_12_11, (0x000 << 16) | 0x000);
|
||||
+ HD_WRITE(VC4_HD_CSC_14_13, (0x100 << 16) | 0x6e0);
|
||||
+ HD_WRITE(VC4_HD_CSC_22_21, (0x6e0 << 16) | 0x000);
|
||||
+ HD_WRITE(VC4_HD_CSC_24_23, (0x100 << 16) | 0x000);
|
||||
+ HD_WRITE(VC4_HD_CSC_32_31, (0x000 << 16) | 0x6e0);
|
||||
+ HD_WRITE(VC4_HD_CSC_34_33, (0x100 << 16) | 0x000);
|
||||
+ }
|
||||
+
|
||||
/* The RGB order applies even when CSC is disabled. */
|
||||
- HD_WRITE(VC4_HD_CSC_CTL, VC4_SET_FIELD(VC4_HD_CSC_CTL_ORDER_BGR,
|
||||
- VC4_HD_CSC_CTL_ORDER));
|
||||
+ HD_WRITE(VC4_HD_CSC_CTL, csc_ctl);
|
||||
|
||||
HDMI_WRITE(VC4_HDMI_FIFO_CTL, VC4_HDMI_FIFO_CTL_MASTER_SLAVE_N);
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
index 160942a..9ecd6ff 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
@@ -528,10 +528,17 @@
|
||||
# define VC4_HD_CSC_CTL_MODE_SHIFT 2
|
||||
# define VC4_HD_CSC_CTL_MODE_RGB_TO_SD_YPRPB 0
|
||||
# define VC4_HD_CSC_CTL_MODE_RGB_TO_HD_YPRPB 1
|
||||
-# define VC4_HD_CSC_CTL_MODE_CUSTOM 2
|
||||
+# define VC4_HD_CSC_CTL_MODE_CUSTOM 3
|
||||
# define VC4_HD_CSC_CTL_RGB2YCC BIT(1)
|
||||
# define VC4_HD_CSC_CTL_ENABLE BIT(0)
|
||||
|
||||
+#define VC4_HD_CSC_12_11 0x044
|
||||
+#define VC4_HD_CSC_14_13 0x048
|
||||
+#define VC4_HD_CSC_22_21 0x04c
|
||||
+#define VC4_HD_CSC_24_23 0x050
|
||||
+#define VC4_HD_CSC_32_31 0x054
|
||||
+#define VC4_HD_CSC_34_33 0x058
|
||||
+
|
||||
#define VC4_HD_FRAME_COUNT 0x068
|
||||
|
||||
/* HVS display list information. */
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From f379f5432e4b74e3d1d894ce2fefbe1b8a3c24fd Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Wed, 28 Sep 2016 19:20:44 -0700
|
||||
Subject: [PATCH 4/4] drm/vc4: Increase timeout for HDMI_SCHEDULER_CONTROL
|
||||
changes.
|
||||
|
||||
Fixes occasional debug spew at boot when connected directly through
|
||||
HDMI, and probably confusing the HDMI state machine when we go trying
|
||||
to poke registers for the enable sequence too soon.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
index 5df4e74..9a6883d 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
@@ -399,7 +399,7 @@ static void vc4_hdmi_encoder_enable(struct drm_encoder *encoder)
|
||||
VC4_HDMI_SCHEDULER_CONTROL_MODE_HDMI);
|
||||
|
||||
ret = wait_for(HDMI_READ(VC4_HDMI_SCHEDULER_CONTROL) &
|
||||
- VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE, 1);
|
||||
+ VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE, 1000);
|
||||
WARN_ONCE(ret, "Timeout waiting for "
|
||||
"VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE\n");
|
||||
} else {
|
||||
@@ -411,7 +411,7 @@ static void vc4_hdmi_encoder_enable(struct drm_encoder *encoder)
|
||||
~VC4_HDMI_SCHEDULER_CONTROL_MODE_HDMI);
|
||||
|
||||
ret = wait_for(!(HDMI_READ(VC4_HDMI_SCHEDULER_CONTROL) &
|
||||
- VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE), 1);
|
||||
+ VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE), 1000);
|
||||
WARN_ONCE(ret, "Timeout waiting for "
|
||||
"!VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE\n");
|
||||
}
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From bd712d14886c37eb804036b2ac3036df79d33476 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Thu, 29 Sep 2016 15:34:43 -0700
|
||||
Subject: [PATCH] drm/vc4: Set up the AVI and SPD infoframes.
|
||||
|
||||
Fixes a purple bar on the left side of the screen with my Dell
|
||||
2408WFP. It will also be required for supporting the double-clocked
|
||||
video modes.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_hdmi.c | 136 +++++++++++++++++++++++++++++++++++++++--
|
||||
drivers/gpu/drm/vc4/vc4_regs.h | 5 ++
|
||||
2 files changed, 136 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
index 9a6883d..f722334 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
@@ -62,6 +62,8 @@ struct vc4_hdmi {
|
||||
struct vc4_hdmi_encoder {
|
||||
struct vc4_encoder base;
|
||||
bool hdmi_monitor;
|
||||
+ bool limited_rgb_range;
|
||||
+ bool rgb_range_selectable;
|
||||
};
|
||||
|
||||
static inline struct vc4_hdmi_encoder *
|
||||
@@ -205,6 +207,12 @@ static int vc4_hdmi_connector_get_modes(struct drm_connector *connector)
|
||||
return -ENODEV;
|
||||
|
||||
vc4_encoder->hdmi_monitor = drm_detect_hdmi_monitor(edid);
|
||||
+
|
||||
+ if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) {
|
||||
+ vc4_encoder->rgb_range_selectable =
|
||||
+ drm_rgb_quant_range_selectable(edid);
|
||||
+ }
|
||||
+
|
||||
drm_mode_connector_update_edid_property(connector, edid);
|
||||
ret = drm_add_edid_modes(connector, edid);
|
||||
|
||||
@@ -272,6 +280,117 @@ static const struct drm_encoder_funcs vc4_hdmi_encoder_funcs = {
|
||||
.destroy = vc4_hdmi_encoder_destroy,
|
||||
};
|
||||
|
||||
+static int vc4_hdmi_stop_packet(struct drm_encoder *encoder,
|
||||
+ enum hdmi_infoframe_type type)
|
||||
+{
|
||||
+ struct drm_device *dev = encoder->dev;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ u32 packet_id = type - 0x80;
|
||||
+
|
||||
+ HDMI_WRITE(VC4_HDMI_RAM_PACKET_CONFIG,
|
||||
+ HDMI_READ(VC4_HDMI_RAM_PACKET_CONFIG) & ~BIT(packet_id));
|
||||
+
|
||||
+ return wait_for(!(HDMI_READ(VC4_HDMI_RAM_PACKET_STATUS) &
|
||||
+ BIT(packet_id)), 100);
|
||||
+}
|
||||
+
|
||||
+static void vc4_hdmi_write_infoframe(struct drm_encoder *encoder,
|
||||
+ union hdmi_infoframe *frame)
|
||||
+{
|
||||
+ struct drm_device *dev = encoder->dev;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ u32 packet_id = frame->any.type - 0x80;
|
||||
+ u32 packet_reg = VC4_HDMI_GCP_0 + VC4_HDMI_PACKET_STRIDE * packet_id;
|
||||
+ uint8_t buffer[VC4_HDMI_PACKET_STRIDE];
|
||||
+ ssize_t len, i;
|
||||
+ int ret;
|
||||
+
|
||||
+ WARN_ONCE(!(HDMI_READ(VC4_HDMI_RAM_PACKET_CONFIG) &
|
||||
+ VC4_HDMI_RAM_PACKET_ENABLE),
|
||||
+ "Packet RAM has to be on to store the packet.");
|
||||
+
|
||||
+ len = hdmi_infoframe_pack(frame, buffer, sizeof(buffer));
|
||||
+ if (len < 0)
|
||||
+ return;
|
||||
+
|
||||
+ ret = vc4_hdmi_stop_packet(encoder, frame->any.type);
|
||||
+ if (ret) {
|
||||
+ DRM_ERROR("Failed to wait for infoframe to go idle: %d\n", ret);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < len; i += 7) {
|
||||
+ HDMI_WRITE(packet_reg,
|
||||
+ buffer[i + 0] << 0 |
|
||||
+ buffer[i + 1] << 8 |
|
||||
+ buffer[i + 2] << 16);
|
||||
+ packet_reg += 4;
|
||||
+
|
||||
+ HDMI_WRITE(packet_reg,
|
||||
+ buffer[i + 3] << 0 |
|
||||
+ buffer[i + 4] << 8 |
|
||||
+ buffer[i + 5] << 16 |
|
||||
+ buffer[i + 6] << 24);
|
||||
+ packet_reg += 4;
|
||||
+ }
|
||||
+
|
||||
+ HDMI_WRITE(VC4_HDMI_RAM_PACKET_CONFIG,
|
||||
+ HDMI_READ(VC4_HDMI_RAM_PACKET_CONFIG) | BIT(packet_id));
|
||||
+ ret = wait_for((HDMI_READ(VC4_HDMI_RAM_PACKET_STATUS) &
|
||||
+ BIT(packet_id)), 100);
|
||||
+ if (ret)
|
||||
+ DRM_ERROR("Failed to wait for infoframe to start: %d\n", ret);
|
||||
+}
|
||||
+
|
||||
+static void vc4_hdmi_set_avi_infoframe(struct drm_encoder *encoder)
|
||||
+{
|
||||
+ struct vc4_hdmi_encoder *vc4_encoder = to_vc4_hdmi_encoder(encoder);
|
||||
+ struct drm_crtc *crtc = encoder->crtc;
|
||||
+ const struct drm_display_mode *mode = &crtc->state->adjusted_mode;
|
||||
+ union hdmi_infoframe frame;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi, mode);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_ERROR("couldn't fill AVI infoframe\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (vc4_encoder->rgb_range_selectable) {
|
||||
+ if (vc4_encoder->limited_rgb_range) {
|
||||
+ frame.avi.quantization_range =
|
||||
+ HDMI_QUANTIZATION_RANGE_LIMITED;
|
||||
+ } else {
|
||||
+ frame.avi.quantization_range =
|
||||
+ HDMI_QUANTIZATION_RANGE_FULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ vc4_hdmi_write_infoframe(encoder, &frame);
|
||||
+}
|
||||
+
|
||||
+static void vc4_hdmi_set_spd_infoframe(struct drm_encoder *encoder)
|
||||
+{
|
||||
+ union hdmi_infoframe frame;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = hdmi_spd_infoframe_init(&frame.spd, "Broadcom", "Videocore");
|
||||
+ if (ret < 0) {
|
||||
+ DRM_ERROR("couldn't fill SPD infoframe\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ frame.spd.sdi = HDMI_SPD_SDI_PC;
|
||||
+
|
||||
+ vc4_hdmi_write_infoframe(encoder, &frame);
|
||||
+}
|
||||
+
|
||||
+static void vc4_hdmi_set_infoframes(struct drm_encoder *encoder)
|
||||
+{
|
||||
+ vc4_hdmi_set_avi_infoframe(encoder);
|
||||
+ vc4_hdmi_set_spd_infoframe(encoder);
|
||||
+}
|
||||
+
|
||||
static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
struct drm_display_mode *unadjusted_mode,
|
||||
struct drm_display_mode *mode)
|
||||
@@ -336,8 +455,9 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
|
||||
if (vc4_encoder->hdmi_monitor && drm_match_cea_mode(mode) > 1) {
|
||||
/* CEA VICs other than #1 requre limited range RGB
|
||||
- * output. Apply a colorspace conversion to squash
|
||||
- * 0-255 down to 16-235. The matrix here is:
|
||||
+ * output unless overridden by an AVI infoframe.
|
||||
+ * Apply a colorspace conversion to squash 0-255 down
|
||||
+ * to 16-235. The matrix here is:
|
||||
*
|
||||
* [ 0 0 0.8594 16]
|
||||
* [ 0 0.8594 0 16]
|
||||
@@ -355,6 +475,9 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
HD_WRITE(VC4_HD_CSC_24_23, (0x100 << 16) | 0x000);
|
||||
HD_WRITE(VC4_HD_CSC_32_31, (0x000 << 16) | 0x6e0);
|
||||
HD_WRITE(VC4_HD_CSC_34_33, (0x100 << 16) | 0x000);
|
||||
+ vc4_encoder->limited_rgb_range = true;
|
||||
+ } else {
|
||||
+ vc4_encoder->limited_rgb_range = false;
|
||||
}
|
||||
|
||||
/* The RGB order applies even when CSC is disabled. */
|
||||
@@ -373,6 +496,8 @@ static void vc4_hdmi_encoder_disable(struct drm_encoder *encoder)
|
||||
struct drm_device *dev = encoder->dev;
|
||||
struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
|
||||
+ HDMI_WRITE(VC4_HDMI_RAM_PACKET_CONFIG, 0);
|
||||
+
|
||||
HDMI_WRITE(VC4_HDMI_TX_PHY_RESET_CTL, 0xf << 16);
|
||||
HD_WRITE(VC4_HD_VID_CTL,
|
||||
HD_READ(VC4_HD_VID_CTL) & ~VC4_HD_VID_CTL_ENABLE);
|
||||
@@ -425,9 +550,10 @@ static void vc4_hdmi_encoder_enable(struct drm_encoder *encoder)
|
||||
HDMI_READ(VC4_HDMI_SCHEDULER_CONTROL) |
|
||||
VC4_HDMI_SCHEDULER_CONTROL_VERT_ALWAYS_KEEPOUT);
|
||||
|
||||
- /* XXX: Set HDMI_RAM_PACKET_CONFIG (1 << 16) and set
|
||||
- * up the infoframe.
|
||||
- */
|
||||
+ HDMI_WRITE(VC4_HDMI_RAM_PACKET_CONFIG,
|
||||
+ VC4_HDMI_RAM_PACKET_ENABLE);
|
||||
+
|
||||
+ vc4_hdmi_set_infoframes(encoder);
|
||||
|
||||
drift = HDMI_READ(VC4_HDMI_FIFO_CTL);
|
||||
drift &= VC4_HDMI_FIFO_VALID_WRITE_MASK;
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
index 9ecd6ff..a4b5370 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
@@ -438,6 +438,8 @@
|
||||
#define VC4_HDMI_RAM_PACKET_CONFIG 0x0a0
|
||||
# define VC4_HDMI_RAM_PACKET_ENABLE BIT(16)
|
||||
|
||||
+#define VC4_HDMI_RAM_PACKET_STATUS 0x0a4
|
||||
+
|
||||
#define VC4_HDMI_HORZA 0x0c4
|
||||
# define VC4_HDMI_HORZA_VPOS BIT(14)
|
||||
# define VC4_HDMI_HORZA_HPOS BIT(13)
|
||||
@@ -499,6 +501,9 @@
|
||||
|
||||
#define VC4_HDMI_TX_PHY_RESET_CTL 0x2c0
|
||||
|
||||
+#define VC4_HDMI_GCP_0 0x400
|
||||
+#define VC4_HDMI_PACKET_STRIDE 0x24
|
||||
+
|
||||
#define VC4_HD_M_CTL 0x00c
|
||||
# define VC4_HD_M_REGISTER_FILE_STANDBY (3 << 6)
|
||||
# define VC4_HD_M_RAM_STANDBY (3 << 4)
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From c4e634ce412d97f0e61223b2a5b3f8f9600cd4dc Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Fri, 30 Sep 2016 10:07:27 -0700
|
||||
Subject: clk: bcm2835: Clamp the PLL's requested rate to the hardware limits.
|
||||
|
||||
Fixes setting low-resolution video modes on HDMI. Now the PLLH_PIX
|
||||
divider adjusts itself until the PLLH is within bounds.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 11 ++++-------
|
||||
1 file changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
|
||||
index b68bf57..8c7763f 100644
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -502,8 +502,12 @@ static long bcm2835_pll_rate_from_divisors(unsigned long parent_rate,
|
||||
static long bcm2835_pll_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *parent_rate)
|
||||
{
|
||||
+ struct bcm2835_pll *pll = container_of(hw, struct bcm2835_pll, hw);
|
||||
+ const struct bcm2835_pll_data *data = pll->data;
|
||||
u32 ndiv, fdiv;
|
||||
|
||||
+ rate = clamp(rate, data->min_rate, data->max_rate);
|
||||
+
|
||||
bcm2835_pll_choose_ndiv_and_fdiv(rate, *parent_rate, &ndiv, &fdiv);
|
||||
|
||||
return bcm2835_pll_rate_from_divisors(*parent_rate, ndiv, fdiv, 1);
|
||||
@@ -608,13 +612,6 @@ static int bcm2835_pll_set_rate(struct clk_hw *hw,
|
||||
u32 ana[4];
|
||||
int i;
|
||||
|
||||
- if (rate < data->min_rate || rate > data->max_rate) {
|
||||
- dev_err(cprman->dev, "%s: rate out of spec: %lu vs (%lu, %lu)\n",
|
||||
- clk_hw_get_name(hw), rate,
|
||||
- data->min_rate, data->max_rate);
|
||||
- return -EINVAL;
|
||||
- }
|
||||
-
|
||||
if (rate > data->max_fb_rate) {
|
||||
use_fb_prediv = true;
|
||||
rate /= 2;
|
||||
--
|
||||
cgit v0.12
|
||||
|
||||
From e69fdcca836f0b81a2260b69429c8622a80ea891 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Wed, 1 Jun 2016 12:05:33 -0700
|
||||
Subject: clk: bcm2835: Mark the VPU clock as critical
|
||||
|
||||
The VPU clock is also the clock for our AXI bus, so we really can't
|
||||
disable it. This might have happened during boot if, for example,
|
||||
uart1 (aux_uart clock) probed and was then disabled before the other
|
||||
consumers of the VPU clock had probed.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Acked-by: Martin Sperl <kernel@martin.sperl.org>
|
||||
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
|
||||
index 7a79708..d9db03c 100644
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -443,6 +443,8 @@ struct bcm2835_clock_data {
|
||||
/* Number of fractional bits in the divider */
|
||||
u32 frac_bits;
|
||||
|
||||
+ u32 flags;
|
||||
+
|
||||
bool is_vpu_clock;
|
||||
bool is_mash_clock;
|
||||
};
|
||||
@@ -1230,7 +1232,7 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman,
|
||||
init.parent_names = parents;
|
||||
init.num_parents = data->num_mux_parents;
|
||||
init.name = data->name;
|
||||
- init.flags = CLK_IGNORE_UNUSED;
|
||||
+ init.flags = data->flags | CLK_IGNORE_UNUSED;
|
||||
|
||||
if (data->is_vpu_clock) {
|
||||
init.ops = &bcm2835_vpu_clock_clk_ops;
|
||||
@@ -1649,6 +1651,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = {
|
||||
.div_reg = CM_VPUDIV,
|
||||
.int_bits = 12,
|
||||
.frac_bits = 8,
|
||||
+ .flags = CLK_IS_CRITICAL,
|
||||
.is_vpu_clock = true),
|
||||
|
||||
/* clocks with per parent mux */
|
||||
--
|
||||
cgit v0.12
|
||||
|
||||
From eddcbe8398fc7103fccd22aa6df6917caf0123bf Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Wed, 1 Jun 2016 12:05:34 -0700
|
||||
Subject: clk: bcm2835: Mark GPIO clocks enabled at boot as critical
|
||||
|
||||
These divide off of PLLD_PER and are used for the ethernet and wifi
|
||||
PHYs source PLLs. Neither of them is currently represented by a phy
|
||||
device that would grab the clock for us.
|
||||
|
||||
This keeps other drivers from killing the networking PHYs when they
|
||||
disable their own clocks and trigger PLLD_PER's refcount going to 0.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Acked-by: Martin Sperl <kernel@martin.sperl.org>
|
||||
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
|
||||
index d9db03c..400615b 100644
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -1239,6 +1239,12 @@ static struct clk *bcm2835_register_clock(struct bcm2835_cprman *cprman,
|
||||
} else {
|
||||
init.ops = &bcm2835_clock_clk_ops;
|
||||
init.flags |= CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE;
|
||||
+
|
||||
+ /* If the clock wasn't actually enabled at boot, it's not
|
||||
+ * critical.
|
||||
+ */
|
||||
+ if (!(cprman_read(cprman, data->ctl_reg) & CM_ENABLE))
|
||||
+ init.flags &= ~CLK_IS_CRITICAL;
|
||||
}
|
||||
|
||||
clock = devm_kzalloc(cprman->dev, sizeof(*clock), GFP_KERNEL);
|
||||
@@ -1708,13 +1714,15 @@ static const struct bcm2835_clk_desc clk_desc_array[] = {
|
||||
.div_reg = CM_GP1DIV,
|
||||
.int_bits = 12,
|
||||
.frac_bits = 12,
|
||||
+ .flags = CLK_IS_CRITICAL,
|
||||
.is_mash_clock = true),
|
||||
[BCM2835_CLOCK_GP2] = REGISTER_PER_CLK(
|
||||
.name = "gp2",
|
||||
.ctl_reg = CM_GP2CTL,
|
||||
.div_reg = CM_GP2DIV,
|
||||
.int_bits = 12,
|
||||
- .frac_bits = 12),
|
||||
+ .frac_bits = 12,
|
||||
+ .flags = CLK_IS_CRITICAL),
|
||||
|
||||
/* HDMI state machine */
|
||||
[BCM2835_CLOCK_HSM] = REGISTER_PER_CLK(
|
||||
--
|
||||
cgit v0.12
|
||||
|
||||
From 9e400c5cc5c105e35216ac59a346f20cdd7613be Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Wed, 1 Jun 2016 12:05:35 -0700
|
||||
Subject: clk: bcm2835: Mark the CM SDRAM clock's parent as critical
|
||||
|
||||
While the SDRAM is being driven by its dedicated PLL most of the time,
|
||||
there is a little loop running in the firmware that periodically turns
|
||||
on the CM SDRAM clock (using its pre-initialized parent) and switches
|
||||
SDRAM to using the CM clock to do PVT recalibration.
|
||||
|
||||
This avoids system hangs if we choose SDRAM's parent for some other
|
||||
clock, then disable that clock.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Acked-by: Martin Sperl <kernel@martin.sperl.org>
|
||||
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
|
||||
---
|
||||
drivers/clk/bcm/clk-bcm2835.c | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
|
||||
index 400615b..c6420b3 100644
|
||||
--- a/drivers/clk/bcm/clk-bcm2835.c
|
||||
+++ b/drivers/clk/bcm/clk-bcm2835.c
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/clkdev.h>
|
||||
+#include <linux/clk.h>
|
||||
#include <linux/clk/bcm2835.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/module.h>
|
||||
@@ -1801,6 +1802,25 @@ static const struct bcm2835_clk_desc clk_desc_array[] = {
|
||||
.ctl_reg = CM_PERIICTL),
|
||||
};
|
||||
|
||||
+/*
|
||||
+ * Permanently take a reference on the parent of the SDRAM clock.
|
||||
+ *
|
||||
+ * While the SDRAM is being driven by its dedicated PLL most of the
|
||||
+ * time, there is a little loop running in the firmware that
|
||||
+ * periodically switches the SDRAM to using our CM clock to do PVT
|
||||
+ * recalibration, with the assumption that the previously configured
|
||||
+ * SDRAM parent is still enabled and running.
|
||||
+ */
|
||||
+static int bcm2835_mark_sdc_parent_critical(struct clk *sdc)
|
||||
+{
|
||||
+ struct clk *parent = clk_get_parent(sdc);
|
||||
+
|
||||
+ if (IS_ERR(parent))
|
||||
+ return PTR_ERR(parent);
|
||||
+
|
||||
+ return clk_prepare_enable(parent);
|
||||
+}
|
||||
+
|
||||
static int bcm2835_clk_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
@@ -1810,6 +1830,7 @@ static int bcm2835_clk_probe(struct platform_device *pdev)
|
||||
const struct bcm2835_clk_desc *desc;
|
||||
const size_t asize = ARRAY_SIZE(clk_desc_array);
|
||||
size_t i;
|
||||
+ int ret;
|
||||
|
||||
cprman = devm_kzalloc(dev,
|
||||
sizeof(*cprman) + asize * sizeof(*clks),
|
||||
@@ -1840,6 +1861,10 @@ static int bcm2835_clk_probe(struct platform_device *pdev)
|
||||
clks[i] = desc->clk_register(cprman, desc->data);
|
||||
}
|
||||
|
||||
+ ret = bcm2835_mark_sdc_parent_critical(clks[BCM2835_CLOCK_SDRAM]);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
return of_clk_add_provider(dev->of_node, of_clk_src_onecell_get,
|
||||
&cprman->onecell);
|
||||
}
|
||||
--
|
||||
cgit v0.12
|
||||
|
||||
From 30772942cc1095c3129eecfa182e2c568e566b9d Mon Sep 17 00:00:00 2001
|
||||
From: Dan Carpenter <dan.carpenter@oracle.com>
|
||||
Date: Thu, 13 Oct 2016 11:54:31 +0300
|
||||
Subject: [PATCH] drm/vc4: Fix a couple error codes in vc4_cl_lookup_bos()
|
||||
|
||||
If the allocation fails the current code returns success. If
|
||||
copy_from_user() fails it returns the number of bytes remaining instead
|
||||
of -EFAULT.
|
||||
|
||||
Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.")
|
||||
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
|
||||
Reviewed-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_gem.c | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
|
||||
index ae1609e..4050540 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_gem.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
|
||||
@@ -548,14 +548,15 @@ vc4_cl_lookup_bos(struct drm_device *dev,
|
||||
|
||||
handles = drm_malloc_ab(exec->bo_count, sizeof(uint32_t));
|
||||
if (!handles) {
|
||||
+ ret = -ENOMEM;
|
||||
DRM_ERROR("Failed to allocate incoming GEM handles\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
- ret = copy_from_user(handles,
|
||||
- (void __user *)(uintptr_t)args->bo_handles,
|
||||
- exec->bo_count * sizeof(uint32_t));
|
||||
- if (ret) {
|
||||
+ if (copy_from_user(handles,
|
||||
+ (void __user *)(uintptr_t)args->bo_handles,
|
||||
+ exec->bo_count * sizeof(uint32_t))) {
|
||||
+ ret = -EFAULT;
|
||||
DRM_ERROR("Failed to copy in GEM handles\n");
|
||||
goto fail;
|
||||
}
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
From a08748fb2221ef03d54071e5ddfcc1b0cee6961c Mon Sep 17 00:00:00 2001
|
||||
From: Tejun Heo <tj@kernel.org>
|
||||
Date: Sat, 5 Sep 2015 15:47:36 -0400
|
||||
Subject: [PATCH] block: blkg_destroy_all() should clear q->root_blkg and
|
||||
->root_rl.blkg
|
||||
|
||||
While making the root blkg unconditional, ec13b1d6f0a0 ("blkcg: always
|
||||
create the blkcg_gq for the root blkcg") removed the part which clears
|
||||
q->root_blkg and ->root_rl.blkg during q exit. This leaves the two
|
||||
pointers dangling after blkg_destroy_all(). blk-throttle exit path
|
||||
performs blkg traversals and dereferences ->root_blkg and can lead to
|
||||
the following oops.
|
||||
|
||||
BUG: unable to handle kernel NULL pointer dereference at 0000000000000558
|
||||
IP: [<ffffffff81389746>] __blkg_lookup+0x26/0x70
|
||||
...
|
||||
task: ffff88001b4e2580 ti: ffff88001ac0c000 task.ti: ffff88001ac0c000
|
||||
RIP: 0010:[<ffffffff81389746>] [<ffffffff81389746>] __blkg_lookup+0x26/0x70
|
||||
...
|
||||
Call Trace:
|
||||
[<ffffffff8138d14a>] blk_throtl_drain+0x5a/0x110
|
||||
[<ffffffff8138a108>] blkcg_drain_queue+0x18/0x20
|
||||
[<ffffffff81369a70>] __blk_drain_queue+0xc0/0x170
|
||||
[<ffffffff8136a101>] blk_queue_bypass_start+0x61/0x80
|
||||
[<ffffffff81388c59>] blkcg_deactivate_policy+0x39/0x100
|
||||
[<ffffffff8138d328>] blk_throtl_exit+0x38/0x50
|
||||
[<ffffffff8138a14e>] blkcg_exit_queue+0x3e/0x50
|
||||
[<ffffffff8137016e>] blk_release_queue+0x1e/0xc0
|
||||
...
|
||||
|
||||
While the bug is a straigh-forward use-after-free bug, it is tricky to
|
||||
reproduce because blkg release is RCU protected and the rest of exit
|
||||
path usually finishes before RCU grace period.
|
||||
|
||||
This patch fixes the bug by updating blkg_destro_all() to clear
|
||||
q->root_blkg and ->root_rl.blkg.
|
||||
|
||||
Signed-off-by: Tejun Heo <tj@kernel.org>
|
||||
Reported-by: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Reported-by: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Link: http://lkml.kernel.org/g/CA+5PVA5rzQ0s4723n5rHBcxQa9t0cW8BPPBekr_9aMRoWt2aYg@mail.gmail.com
|
||||
Fixes: ec13b1d6f0a0 ("blkcg: always create the blkcg_gq for the root blkcg")
|
||||
Cc: stable@vger.kernel.org # v4.2+
|
||||
---
|
||||
block/blk-cgroup.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
|
||||
index d6283b3f5db5..9cc48d1d7abb 100644
|
||||
--- a/block/blk-cgroup.c
|
||||
+++ b/block/blk-cgroup.c
|
||||
@@ -387,6 +387,9 @@ static void blkg_destroy_all(struct request_queue *q)
|
||||
blkg_destroy(blkg);
|
||||
spin_unlock(&blkcg->lock);
|
||||
}
|
||||
+
|
||||
+ q->root_blkg = NULL;
|
||||
+ q->root_rl.blkg = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
2.4.3
|
||||
|
149
check-kabi
149
check-kabi
|
@ -1,149 +0,0 @@
|
|||
#!/usr/bin/python3
|
||||
#
|
||||
# check-kabi - Red Hat kABI reference checking tool
|
||||
#
|
||||
# We use this script to check against reference Module.kabi files.
|
||||
#
|
||||
# Author: Jon Masters <jcm@redhat.com>
|
||||
# Copyright (C) 2007-2009 Red Hat, Inc.
|
||||
#
|
||||
# This software may be freely redistributed under the terms of the GNU
|
||||
# General Public License (GPL).
|
||||
|
||||
# Changelog:
|
||||
#
|
||||
# 2018/06/01 - Update for python3 by Petr Oros.
|
||||
# 2009/08/15 - Updated for use in RHEL6.
|
||||
# 2007/06/13 - Initial rewrite in python by Jon Masters.
|
||||
|
||||
__author__ = "Jon Masters <jcm@redhat.com>"
|
||||
__version__ = "2.0"
|
||||
__date__ = "2009/08/15"
|
||||
__copyright__ = "Copyright (C) 2007-2009 Red Hat, Inc"
|
||||
__license__ = "GPL"
|
||||
|
||||
import getopt
|
||||
import string
|
||||
import sys
|
||||
|
||||
true = 1
|
||||
false = 0
|
||||
|
||||
|
||||
def load_symvers(symvers, filename):
|
||||
"""Load a Module.symvers file."""
|
||||
|
||||
symvers_file = open(filename, "r")
|
||||
|
||||
while true:
|
||||
in_line = symvers_file.readline()
|
||||
if in_line == "":
|
||||
break
|
||||
if in_line == "\n":
|
||||
continue
|
||||
checksum, symbol, directory, type = in_line.split()
|
||||
|
||||
symvers[symbol] = in_line[0:-1]
|
||||
|
||||
|
||||
def load_kabi(kabi, filename):
|
||||
"""Load a Module.kabi file."""
|
||||
|
||||
kabi_file = open(filename, "r")
|
||||
|
||||
while true:
|
||||
in_line = kabi_file.readline()
|
||||
if in_line == "":
|
||||
break
|
||||
if in_line == "\n":
|
||||
continue
|
||||
checksum, symbol, directory, type = in_line.split()
|
||||
|
||||
kabi[symbol] = in_line[0:-1]
|
||||
|
||||
|
||||
def check_kabi(symvers, kabi):
|
||||
"""Check Module.kabi and Module.symvers files."""
|
||||
|
||||
fail = 0
|
||||
warn = 0
|
||||
changed_symbols = []
|
||||
moved_symbols = []
|
||||
|
||||
for symbol in kabi:
|
||||
abi_hash, abi_sym, abi_dir, abi_type = kabi[symbol].split()
|
||||
if symbol in symvers:
|
||||
sym_hash, sym_sym, sym_dir, sym_type = symvers[symbol].split()
|
||||
if abi_hash != sym_hash:
|
||||
fail = 1
|
||||
changed_symbols.append(symbol)
|
||||
|
||||
if abi_dir != sym_dir:
|
||||
warn = 1
|
||||
moved_symbols.append(symbol)
|
||||
else:
|
||||
fail = 1
|
||||
changed_symbols.append(symbol)
|
||||
|
||||
if fail:
|
||||
print("*** ERROR - ABI BREAKAGE WAS DETECTED ***")
|
||||
print("")
|
||||
print("The following symbols have been changed (this will cause an ABI breakage):")
|
||||
print("")
|
||||
for symbol in changed_symbols:
|
||||
print(symbol)
|
||||
print("")
|
||||
|
||||
if warn:
|
||||
print("*** WARNING - ABI SYMBOLS MOVED ***")
|
||||
print("")
|
||||
print("The following symbols moved (typically caused by moving a symbol from being")
|
||||
print("provided by the kernel vmlinux out to a loadable module):")
|
||||
print("")
|
||||
for symbol in moved_symbols:
|
||||
print(symbol)
|
||||
print("")
|
||||
|
||||
"""Halt the build, if we got errors and/or warnings. In either case,
|
||||
double-checkig is required to avoid introducing / concealing
|
||||
KABI inconsistencies."""
|
||||
if fail or warn:
|
||||
sys.exit(1)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def usage():
|
||||
print("""
|
||||
check-kabi: check Module.kabi and Module.symvers files.
|
||||
|
||||
check-kabi [ -k Module.kabi ] [ -s Module.symvers ]
|
||||
|
||||
""")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
symvers_file = ""
|
||||
kabi_file = ""
|
||||
|
||||
opts, args = getopt.getopt(sys.argv[1:], 'hk:s:')
|
||||
|
||||
for o, v in opts:
|
||||
if o == "-s":
|
||||
symvers_file = v
|
||||
if o == "-h":
|
||||
usage()
|
||||
sys.exit(0)
|
||||
if o == "-k":
|
||||
kabi_file = v
|
||||
|
||||
if (symvers_file == "") or (kabi_file == ""):
|
||||
usage()
|
||||
sys.exit(1)
|
||||
|
||||
symvers = {}
|
||||
kabi = {}
|
||||
|
||||
load_symvers(symvers, symvers_file)
|
||||
load_kabi(kabi, kabi_file)
|
||||
check_kabi(symvers, kabi)
|
|
@ -0,0 +1,708 @@
|
|||
CONFIG_KUSER_HELPERS=y
|
||||
# CONFIG_VDSO is not set
|
||||
# CONFIG_ASYMMETRIC_KEY_TYPE is not set
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST=y
|
||||
CONFIG_FB_SSD1307=m
|
||||
CONFIG_HW_PERF_EVENTS=y
|
||||
CONFIG_FORCE_MAX_ZONEORDER=11
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_ARMTHUMB=y
|
||||
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_SCHED_SMT=y
|
||||
|
||||
CONFIG_CC_STACKPROTECTOR=y
|
||||
|
||||
# CONFIG_PID_IN_CONTEXTIDR is not set
|
||||
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
# CONFIG_BIG_LITTLE is not set
|
||||
# CONFIG_ARM_BIG_LITTLE_CPUIDLE is not set
|
||||
# CONFIG_IWMMXT is not set
|
||||
|
||||
# https://fedoraproject.org/wiki/Features/Checkpoint_Restore
|
||||
CONFIG_CHECKPOINT_RESTORE=y
|
||||
|
||||
CONFIG_ARM_CPUIDLE=y
|
||||
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RESET_GPIO=y
|
||||
|
||||
CONFIG_RCU_FANOUT_LEAF=16
|
||||
CONFIG_BACKLIGHT_PWM=m
|
||||
CONFIG_BACKLIGHT_GENERIC=m
|
||||
CONFIG_INPUT_PWM_BEEPER=m
|
||||
CONFIG_ARM_SP805_WATCHDOG=m
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_FB_SIMPLE=y
|
||||
|
||||
CONFIG_HAVE_PERF_REGS=y
|
||||
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
|
||||
|
||||
CONFIG_ARM_PMU=y
|
||||
|
||||
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
|
||||
|
||||
# ARM AMBA generic HW
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_KERNEL_MODE_NEON=y
|
||||
CONFIG_ARM_CCI=y
|
||||
CONFIG_ARM_CCN=y
|
||||
CONFIG_ARM_CCI400_PMU=y
|
||||
CONFIG_ARM_CCI5xx_PMU=y
|
||||
CONFIG_ARM_DMA_USE_IOMMU=y
|
||||
CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GIC_V2M=y
|
||||
CONFIG_ARM_GIC_V3=y
|
||||
CONFIG_ARM_GIC_V3_ITS=y
|
||||
CONFIG_ARM_GLOBAL_TIMER=y
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_MMC_ARMMMCI=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIO_AMBAKMI=y
|
||||
CONFIG_FB_ARMCLCD=y
|
||||
CONFIG_RTC_DRV_PL031=y
|
||||
CONFIG_PL330_DMA=m
|
||||
CONFIG_GPIO_PL061=y
|
||||
CONFIG_USB_ISP1760=m
|
||||
CONFIG_ARM_PL172_MPMC=m
|
||||
CONFIG_DRM_HDLCD=m
|
||||
CONFIG_DRM_MALI_DISPLAY=m
|
||||
# CONFIG_DRM_HDLCD_SHOW_UNDERRUN is not set
|
||||
|
||||
# HW crypto and rng
|
||||
CONFIG_ARM_CRYPTO=y
|
||||
CONFIG_CRYPTO_AES_ARM=y
|
||||
CONFIG_CRYPTO_AES_ARM_BS=y
|
||||
CONFIG_CRYPTO_SHA1_ARM=y
|
||||
CONFIG_CRYPTO_SHA256_ARM=y
|
||||
CONFIG_CRYPTO_SHA1_ARM_NEON=y
|
||||
CONFIG_CRYPTO_SHA512_ARM=y
|
||||
CONFIG_TCG_TIS_I2C_ATMEL=m
|
||||
|
||||
# EDAC
|
||||
CONFIG_EDAC=y
|
||||
CONFIG_EDAC_MM_EDAC=m
|
||||
CONFIG_EDAC_LEGACY_SYSFS=y
|
||||
|
||||
# Regulators
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_GPIO=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_VIRTUAL_CONSUMER=m
|
||||
CONFIG_REGULATOR_USERSPACE_CONSUMER=m
|
||||
CONFIG_REGULATOR_PWM=m
|
||||
CONFIG_RFKILL_REGULATOR=m
|
||||
|
||||
# ARM VExpress
|
||||
CONFIG_ARCH_VEXPRESS=y
|
||||
CONFIG_MFD_VEXPRESS_SYSREG=y
|
||||
CONFIG_VEXPRESS_SYSCFG=y
|
||||
CONFIG_COMMON_CLK_VERSATILE=y
|
||||
CONFIG_ARM_TIMER_SP804=y
|
||||
CONFIG_CLK_SP810=y
|
||||
CONFIG_CLK_VEXPRESS_OSC=y
|
||||
CONFIG_I2C_VERSATILE=m
|
||||
CONFIG_POWER_RESET_VEXPRESS=y
|
||||
CONFIG_REGULATOR_VEXPRESS=m
|
||||
CONFIG_SENSORS_VEXPRESS=m
|
||||
CONFIG_CLKSRC_VERSATILE=y
|
||||
CONFIG_POWER_RESET_VERSATILE=y
|
||||
# CONFIG_ARM_CHARLCD is not set
|
||||
|
||||
# Broadcom
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BCM2835=y
|
||||
# CONFIG_ARCH_BCM_CYGNUS is not set
|
||||
# CONFIG_ARCH_BCM_NSP is not set
|
||||
# CONFIG_ARCH_BCM_5301X is not set
|
||||
# CONFIG_ARCH_BCM_281XX is not set
|
||||
# CONFIG_ARCH_BCM_21664 is not set
|
||||
# CONFIG_ARCH_BCM_63XX is not set
|
||||
# CONFIG_ARCH_BRCMSTB is not set
|
||||
# CONFIG_ARCH_BERLIN is not set
|
||||
# CONFIG_ARCH_BCM_CYGNUS is not set
|
||||
# CONFIG_ARCH_BCM_NSP is not set
|
||||
# CONFIG_ARCH_BCM_5301X is not set
|
||||
# CONFIG_ARCH_BCM_281XX is not set
|
||||
# CONFIG_ARCH_BCM_21664 is not set
|
||||
# CONFIG_ARCH_BCM_63XX is not set
|
||||
# CONFIG_ARCH_BCM_23550 is not set
|
||||
# CONFIG_ARCH_BRCMSTB is not set
|
||||
# CONFIG_ARCH_BERLIN is not set
|
||||
# BCM 283x
|
||||
CONFIG_SERIAL_8250_BCM2835AUX=y
|
||||
CONFIG_DMA_BCM2835=m
|
||||
CONFIG_MMC_SDHCI_IPROC=m
|
||||
CONFIG_MMC_BCM2835_SDHOST=m
|
||||
CONFIG_BCM2835_MBOX=y
|
||||
CONFIG_PWM_BCM2835=m
|
||||
CONFIG_HW_RANDOM_BCM2835=m
|
||||
CONFIG_I2C_BCM2835=m
|
||||
CONFIG_SPI_BCM2835=m
|
||||
CONFIG_SPI_BCM2835AUX=m
|
||||
CONFIG_BCM2835_WDT=m
|
||||
CONFIG_SND_BCM2835_SOC_I2S=m
|
||||
CONFIG_DRM_VC4=m
|
||||
CONFIG_RASPBERRYPI_FIRMWARE=y
|
||||
CONFIG_RASPBERRYPI_POWER=y
|
||||
# popular digital audio HATs
|
||||
CONFIG_SND_SOC_PCM512x=m
|
||||
CONFIG_SND_SOC_PCM512x_I2C=m
|
||||
CONFIG_SND_SOC_PCM512x_SPI=m
|
||||
CONFIG_SND_SOC_TPA6130A2=m
|
||||
CONFIG_SND_SOC_WM8804=m
|
||||
CONFIG_SND_SOC_WM8804_I2C=m
|
||||
CONFIG_SND_SOC_WM8804_SPI=m
|
||||
|
||||
# Marvell EBU
|
||||
CONFIG_ARCH_MVEBU=y
|
||||
CONFIG_SERIAL_MVEBU_UART=y
|
||||
CONFIG_SERIAL_MVEBU_CONSOLE=y
|
||||
CONFIG_MVEBU_DEVBUS=y
|
||||
CONFIG_MVEBU_MBUS=y
|
||||
CONFIG_PCI_MVEBU=y
|
||||
CONFIG_PCI_AARDVARK=y
|
||||
CONFIG_PCIE_ARMADA_8K=y
|
||||
CONFIG_MV_XOR=y
|
||||
CONFIG_CRYPTO_DEV_MV_CESA=m
|
||||
CONFIG_CRYPTO_DEV_MARVELL_CESA=m
|
||||
CONFIG_ARMADA_THERMAL=m
|
||||
CONFIG_MMC_SDHCI_PXAV3=m
|
||||
CONFIG_MV643XX_ETH=m
|
||||
CONFIG_PINCTRL_MVEBU=y
|
||||
CONFIG_EDAC_MV64X60=m
|
||||
CONFIG_RTC_DRV_S35390A=m
|
||||
CONFIG_RTC_DRV_88PM80X=m
|
||||
CONFIG_RTC_DRV_ISL12057=m
|
||||
CONFIG_RTC_DRV_MV=m
|
||||
CONFIG_RTC_DRV_ARMADA38X=m
|
||||
CONFIG_MVNETA=m
|
||||
CONFIG_MVNETA_BM_ENABLE=m
|
||||
CONFIG_GPIO_MVEBU=y
|
||||
CONFIG_MVEBU_CLK_CORE=y
|
||||
CONFIG_MVEBU_CLK_COREDIV=y
|
||||
CONFIG_MMC_MVSDIO=m
|
||||
CONFIG_SPI_ORION=m
|
||||
CONFIG_USB_MV_UDC=m
|
||||
CONFIG_USB_XHCI_MVEBU=m
|
||||
CONFIG_PHY_MVEBU_SATA=y
|
||||
CONFIG_AHCI_MVEBU=m
|
||||
CONFIG_I2C_PXA=m
|
||||
# CONFIG_CACHE_FEROCEON_L2 is not set
|
||||
# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
|
||||
|
||||
# Rockchips
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_I2C_RK3X=m
|
||||
CONFIG_SPI_ROCKCHIP=m
|
||||
CONFIG_PWM_ROCKCHIP=m
|
||||
CONFIG_ROCKCHIP_SARADC=m
|
||||
CONFIG_ROCKCHIP_IODOMAIN=m
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_EMAC_ROCKCHIP=m
|
||||
CONFIG_MFD_RK808=m
|
||||
CONFIG_COMMON_CLK_RK808=m
|
||||
CONFIG_REGULATOR_RK808=m
|
||||
CONFIG_RTC_DRV_RK808=m
|
||||
CONFIG_RTC_DRV_HYM8563=m
|
||||
CONFIG_ROCKCHIP_SARADC=m
|
||||
CONFIG_ROCKCHIP_IOMMU=y
|
||||
CONFIG_ROCKCHIP_THERMAL=m
|
||||
CONFIG_DRM_ROCKCHIP=m
|
||||
CONFIG_ROCKCHIP_ANALOGIX_DP=m
|
||||
CONFIG_ROCKCHIP_DW_HDMI=m
|
||||
CONFIG_ROCKCHIP_DW_MIPI_DSI=m
|
||||
CONFIG_ROCKCHIP_INNO_HDMI=m
|
||||
CONFIG_DRM_ANALOGIX_DP=m
|
||||
CONFIG_PHY_ROCKCHIP_USB=m
|
||||
CONFIG_DWMAC_ROCKCHIP=m
|
||||
CONFIG_SND_SOC_ROCKCHIP=m
|
||||
CONFIG_SND_SOC_ROCKCHIP_I2S=m
|
||||
CONFIG_SND_SOC_ROCKCHIP_MAX98090=m
|
||||
CONFIG_SND_SOC_ROCKCHIP_RT5645=m
|
||||
CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
|
||||
CONFIG_REGULATOR_ACT8865=m
|
||||
CONFIG_ROCKCHIP_PM_DOMAINS=y
|
||||
CONFIG_CRYPTO_DEV_ROCKCHIP=m
|
||||
CONFIG_ROCKCHIP_EFUSE=m
|
||||
CONFIG_PHY_ROCKCHIP_EMMC=m
|
||||
CONFIG_PHY_ROCKCHIP_DP=m
|
||||
CONFIG_ROCKCHIP_MBOX=y
|
||||
|
||||
# Tegra
|
||||
CONFIG_TEGRA_MC=y
|
||||
CONFIG_TEGRA124_EMC=y
|
||||
CONFIG_TEGRA_IOMMU_SMMU=y
|
||||
CONFIG_TEGRA_AHB=y
|
||||
CONFIG_TEGRA20_APB_DMA=y
|
||||
CONFIG_TRUSTED_FOUNDATIONS=y
|
||||
CONFIG_SERIAL_TEGRA=y
|
||||
CONFIG_PCI_TEGRA=y
|
||||
CONFIG_AHCI_TEGRA=m
|
||||
CONFIG_MMC_SDHCI_TEGRA=m
|
||||
CONFIG_TEGRA_WATCHDOG=m
|
||||
CONFIG_GPIO_TEGRA=y
|
||||
CONFIG_I2C_TEGRA=m
|
||||
CONFIG_SPI_TEGRA114=m
|
||||
CONFIG_PWM_TEGRA=m
|
||||
CONFIG_KEYBOARD_TEGRA=m
|
||||
CONFIG_USB_EHCI_TEGRA=m
|
||||
CONFIG_RTC_DRV_TEGRA=m
|
||||
CONFIG_ARM_TEGRA_DEVFREQ=m
|
||||
CONFIG_ARM_TEGRA124_CPUFREQ=m
|
||||
CONFIG_TEGRA_SOCTHERM=m
|
||||
CONFIG_PHY_TEGRA_XUSB=m
|
||||
CONFIG_USB_XHCI_TEGRA=m
|
||||
|
||||
CONFIG_TEGRA_HOST1X=m
|
||||
CONFIG_TEGRA_HOST1X_FIREWALL=y
|
||||
CONFIG_DRM_TEGRA=m
|
||||
# CONFIG_DRM_TEGRA_DEBUG is not set
|
||||
CONFIG_DRM_TEGRA_STAGING=y
|
||||
CONFIG_NOUVEAU_PLATFORM_DRIVER=y
|
||||
CONFIG_SND_HDA_TEGRA=m
|
||||
CONFIG_RTC_DRV_MAX77686=m
|
||||
|
||||
# CONFIG_ARM_TEGRA20_CPUFREQ is not set
|
||||
# CONFIG_MFD_NVEC is not set
|
||||
|
||||
# Qualcomm - Don't currently support IPQ router devices
|
||||
# CONFIG_IPQ_GCC_806X is not set
|
||||
# CONFIG_IPQ_LCC_806X is not set
|
||||
# CONFIG_IPQ_GCC_4019 is not set
|
||||
# CONFIG_PHY_QCOM_IPQ806X_SATA is not set
|
||||
# CONFIG_DWMAC_IPQ806X is not set
|
||||
# CONFIG_PINCTRL_IPQ8064 is not set
|
||||
# CONFIG_PINCTRL_IPQ4019 is not set
|
||||
# CONFIG_REGULATOR_QCOM_SPMI is not set
|
||||
# CONFIG_QCOM_SPMI_IADC is not set
|
||||
# CONFIG_QCOM_SPMI_VADC is not set
|
||||
|
||||
# Virt
|
||||
CONFIG_PARAVIRT=y
|
||||
CONFIG_PARAVIRT_TIME_ACCOUNTING=y
|
||||
|
||||
CONFIG_EFI=y
|
||||
CONFIG_EFI_VARS=y
|
||||
CONFIG_EFIVAR_FS=y
|
||||
CONFIG_EFI_VARS_PSTORE=y
|
||||
CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y
|
||||
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
|
||||
# CONFIG_EFI_CAPSULE_LOADER is not set
|
||||
|
||||
# Power management / thermal / cpu scaling
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_ARM_PSCI=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_CLOCK_THERMAL=y
|
||||
CONFIG_CPUFREQ_DT=m
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
CONFIG_DEVFREQ_THERMAL=y
|
||||
# CONFIG_ARM_DT_BL_CPUFREQ is not set
|
||||
# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set
|
||||
CONFIG_SPMI=m
|
||||
CONFIG_MFD_SPMI_PMIC=m
|
||||
CONFIG_REGMAP_SPMI=m
|
||||
|
||||
# Device tree
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_OF=y
|
||||
# CONFIG_OF_UNITTEST is not set
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_DYNAMIC=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IOMMU=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_MTD=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_OF_OVERLAY=y
|
||||
CONFIG_OF_PCI_IRQ=m
|
||||
CONFIG_OF_PCI=m
|
||||
CONFIG_PCI_HOST_GENERIC=y
|
||||
CONFIG_OF_RESERVED_MEM=y
|
||||
CONFIG_OF_RESOLVE=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
CONFIG_PATA_OF_PLATFORM=m
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
|
||||
# CONFIG_OF_MDIO is not set
|
||||
# CONFIG_MDIO_BUS_MUX_GPIO is not set
|
||||
# CONFIG_MDIO_BUS_MUX_MMIOREG is not set
|
||||
|
||||
# Mailbox
|
||||
CONFIG_MAILBOX=y
|
||||
CONFIG_ARM_MHU=m
|
||||
# CONFIG_PL320_MBOX is not set
|
||||
CONFIG_ARM_SCPI_PROTOCOL=m
|
||||
CONFIG_ARM_SCPI_POWER_DOMAIN=m
|
||||
|
||||
# NVMem
|
||||
CONFIG_NVMEM=m
|
||||
|
||||
# SPI
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_GPIO=m
|
||||
CONFIG_SPI_SPIDEV=m
|
||||
CONFIG_SPI_BITBANG=m
|
||||
CONFIG_SPI_DESIGNWARE=m
|
||||
# CONFIG_SPI_CADENCE is not set
|
||||
# CONFIG_SPI_SUN4I is not set
|
||||
# CONFIG_SPI_SUN6I is not set
|
||||
# CONFIG_SPI_TEGRA20_SFLASH is not set
|
||||
# CONFIG_SPI_TEGRA20_SLINK is not set
|
||||
# CONFIG_SPI_ZYNQMP_GQSPI is not set
|
||||
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_SYSFS=y
|
||||
# CONFIG_PWM_FSL_FTM is not set
|
||||
|
||||
# USB
|
||||
CONFIG_USB_OHCI_HCD_PLATFORM=m
|
||||
CONFIG_USB_EHCI_HCD_PLATFORM=m
|
||||
CONFIG_USB_XHCI_PLATFORM=m
|
||||
CONFIG_USB_ULPI=y
|
||||
|
||||
# usb gadget
|
||||
CONFIG_USB_OTG=y
|
||||
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
|
||||
CONFIG_USB_GADGET=m
|
||||
CONFIG_USB_GADGET_VBUS_DRAW=100
|
||||
CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
|
||||
CONFIG_U_SERIAL_CONSOLE=y
|
||||
CONFIG_USB_MUSB_HDRC=m
|
||||
CONFIG_USB_MUSB_DUAL_ROLE=y
|
||||
CONFIG_USB_MUSB_DSPS=m
|
||||
# CONFIG_MUSB_PIO_ONLY is not set
|
||||
# CONFIG_USB_MUSB_TUSB6010 is not set
|
||||
# CONFIG_USB_MUSB_UX500 is not set
|
||||
CONFIG_USB_GPIO_VBUS=m
|
||||
CONFIG_USB_CONFIGFS=m
|
||||
CONFIG_USB_CONFIGFS_ACM=y
|
||||
CONFIG_USB_CONFIGFS_ECM=y
|
||||
CONFIG_USB_CONFIGFS_ECM_SUBSET=y
|
||||
CONFIG_USB_CONFIGFS_EEM=y
|
||||
CONFIG_USB_CONFIGFS_F_TCM=y
|
||||
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
|
||||
CONFIG_USB_CONFIGFS_NCM=y
|
||||
CONFIG_USB_CONFIGFS_OBEX=y
|
||||
# CONFIG_USB_CONFIGFS_RNDIS is not set
|
||||
CONFIG_USB_CONFIGFS_SERIAL=y
|
||||
# CONFIG_USB_CONFIGFS_F_LB_SS is not set
|
||||
# CONFIG_USB_CONFIGFS_F_FS is not set
|
||||
# CONFIG_USB_CONFIGFS_F_UAC1 is not set
|
||||
# CONFIG_USB_CONFIGFS_F_UAC2 is not set
|
||||
# CONFIG_USB_CONFIGFS_F_MIDI is not set
|
||||
# CONFIG_USB_CONFIGFS_F_HID is not set
|
||||
# CONFIG_USB_CONFIGFS_F_UVC is not set
|
||||
# CONFIG_USB_CONFIGFS_F_PRINTER is not set
|
||||
|
||||
# CONFIG_USB_GADGET_DEBUG is not set
|
||||
# CONFIG_USB_GADGET_DEBUG_FILES is not set
|
||||
# CONFIG_USB_GADGET_DEBUG_FS is not set
|
||||
# CONFIG_USB_GADGET_XILINX is not set
|
||||
# CONFIG_USB_FUSB300 is not set
|
||||
# CONFIG_USB_FOTG210_UDC is not set
|
||||
# CONFIG_USB_R8A66597 is not set
|
||||
# CONFIG_USB_PXA27X is not set
|
||||
# CONFIG_USB_MV_UDC is not set
|
||||
# CONFIG_USB_MV_U3D is not set
|
||||
# CONFIG_USB_BDC_UDC is not set
|
||||
# CONFIG_USB_M66592 is not set
|
||||
# CONFIG_USB_AMD5536UDC is not set
|
||||
# CONFIG_USB_NET2272 is not set
|
||||
# CONFIG_USB_NET2280 is not set
|
||||
# CONFIG_USB_GOKU is not set
|
||||
# CONFIG_USB_EG20T is not set
|
||||
# CONFIG_USB_DUMMY_HCD is not set
|
||||
# CONFIG_USB_ZERO_HNPTEST is not set
|
||||
|
||||
# MMC/SD
|
||||
CONFIG_MMC_SPI=m
|
||||
CONFIG_MMC_SDHCI_OF_ARASAN=m
|
||||
|
||||
# LCD Panels
|
||||
CONFIG_DRM_PANEL=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=m
|
||||
CONFIG_DRM_PANEL_LG_LG4573=m
|
||||
CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=m
|
||||
CONFIG_DRM_PANEL_SHARP_LQ101R1SX01=m
|
||||
CONFIG_DRM_PANEL_SHARP_LS043T1LE01=m
|
||||
CONFIG_DRM_PANEL_SAMSUNG_LD9040=m
|
||||
CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=m
|
||||
|
||||
# Designware (used by numerous devices)
|
||||
CONFIG_MMC_DW=m
|
||||
CONFIG_MMC_DW_PLTFM=y
|
||||
CONFIG_MMC_DW_K3=y
|
||||
CONFIG_MMC_DW_PCI=y
|
||||
CONFIG_SPI_DW_MMIO=m
|
||||
CONFIG_SPI_DW_PCI=m
|
||||
# CONFIG_SPI_DW_MID_DMA is not set
|
||||
# CONFIG_MMC_QCOM_DML is not set
|
||||
CONFIG_USB_DWC2=m
|
||||
CONFIG_USB_DWC2_DUAL_ROLE=y
|
||||
CONFIG_USB_DWC2_PCI=m
|
||||
# CONFIG_USB_DWC2_DEBUG is not set
|
||||
# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set
|
||||
CONFIG_USB_DWC3=m
|
||||
CONFIG_USB_DWC3_DUAL_ROLE=y
|
||||
CONFIG_USB_DWC3_PCI=m
|
||||
CONFIG_USB_DWC3_OF_SIMPLE=m
|
||||
CONFIG_USB_DWC3_ULPI=y
|
||||
CONFIG_DW_WATCHDOG=m
|
||||
CONFIG_PCIE_DW=y
|
||||
# CONFIG_MMC_DW_EXYNOS is not set
|
||||
CONFIG_I2C_DESIGNWARE_CORE=m
|
||||
CONFIG_I2C_DESIGNWARE_PLATFORM=m
|
||||
CONFIG_GPIO_DWAPB=m
|
||||
|
||||
# External Connectors
|
||||
CONFIG_EXTCON=m
|
||||
CONFIG_EXTCON_GPIO=m
|
||||
CONFIG_EXTCON_ADC_JACK=m
|
||||
CONFIG_EXTCON_USB_GPIO=m
|
||||
# CONFIG_EXTCON_MAX3355 is not set
|
||||
# CONFIG_EXTCON_SM5502 is not set
|
||||
# CONFIG_EXTCON_RT8973A is not set
|
||||
|
||||
# MTD
|
||||
# CONFIG_MTD_AFS_PARTS is not set
|
||||
CONFIG_MTD_BLKDEVS=m
|
||||
CONFIG_MTD_BLOCK=m
|
||||
CONFIG_MTD_CFI=m
|
||||
CONFIG_MTD_CFI_INTELEXT=m
|
||||
CONFIG_MTD_CFI_AMDSTD=m
|
||||
CONFIG_MTD_CFI_STAA=m
|
||||
CONFIG_MTD_OF_PARTS=m
|
||||
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
|
||||
CONFIG_MTD_PHYSMAP=m
|
||||
CONFIG_MTD_PHYSMAP_OF=m
|
||||
CONFIG_MTD_PHYSMAP_OF_VERSATILE=y
|
||||
# CONFIG_MTD_PHYSMAP_COMPAT is not set
|
||||
# CONFIG_MTD_LPDDR2_NVM is not set
|
||||
|
||||
# GPIO
|
||||
CONFIG_GPIO_DEVRES=y
|
||||
CONFIG_GPIO_GENERIC=m
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=m
|
||||
CONFIG_GPIO_WATCHDOG=m
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
|
||||
CONFIG_ARCH_REQUIRE_GPIOLIB=y
|
||||
CONFIG_BACKLIGHT_GPIO=m
|
||||
CONFIG_KEYBOARD_GPIO=m
|
||||
CONFIG_KEYBOARD_GPIO_POLLED=m
|
||||
CONFIG_INPUT_SOC_BUTTON_ARRAY=m
|
||||
CONFIG_POWER_RESET_GPIO=y
|
||||
CONFIG_POWER_RESET_GPIO_RESTART=y
|
||||
CONFIG_POWER_RESET_RESTART=y
|
||||
# CONFIG_GPIO_74XX_MMIO is not set
|
||||
|
||||
# Pin stuff
|
||||
CONFIG_PINMUX=y
|
||||
CONFIG_PINCONF=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_PINCTRL_SINGLE=y
|
||||
|
||||
# gpio
|
||||
CONFIG_GPIO_PCA953X=y
|
||||
CONFIG_GPIO_PCA953X_IRQ=y
|
||||
|
||||
#i2c
|
||||
CONFIG_I2C_ARB_GPIO_CHALLENGE=m
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_GPIO=m
|
||||
CONFIG_I2C_MUX=m
|
||||
CONFIG_I2C_MUX_GPIO=m
|
||||
CONFIG_I2C_MUX_PINCTRL=m
|
||||
CONFIG_I2C_MUX_PCA9541=m
|
||||
CONFIG_I2C_MUX_PCA954x=m
|
||||
CONFIG_I2C_MUX_REG=m
|
||||
CONFIG_I2C_MV64XXX=m
|
||||
|
||||
# spi
|
||||
CONFIG_SPI_PL022=m
|
||||
|
||||
# Sensors
|
||||
CONFIG_SENSORS_IIO_HWMON=m
|
||||
CONFIG_IIO_SYSFS_TRIGGER=m
|
||||
CONFIG_SENSORS_ARM_SCPI=m
|
||||
CONFIG_IIO_ST_PRESS=m
|
||||
CONFIG_IIO_ST_PRESS_I2C=m
|
||||
CONFIG_IIO_ST_PRESS_SPI=m
|
||||
CONFIG_TMP006=m
|
||||
CONFIG_BMP280=m
|
||||
CONFIG_TCS3472=m
|
||||
|
||||
# PHY framework
|
||||
CONFIG_GENERIC_PHY=y
|
||||
|
||||
CONFIG_SMC91X=m
|
||||
CONFIG_SMC911X=m
|
||||
|
||||
CONFIG_CPU_THERMAL=y
|
||||
CONFIG_THERMAL_GOV_USER_SPACE=y
|
||||
|
||||
# Contiguous Memory Allocator
|
||||
CONFIG_CMA=y
|
||||
CONFIG_DMA_CMA=y
|
||||
# CONFIG_CMA_DEBUG is not set
|
||||
CONFIG_CMA_DEBUGFS=y
|
||||
CONFIG_CMA_SIZE_MBYTES=64
|
||||
CONFIG_CMA_SIZE_SEL_MBYTES=y
|
||||
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
|
||||
# CONFIG_CMA_SIZE_SEL_MIN is not set
|
||||
# CONFIG_CMA_SIZE_SEL_MAX is not set
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=7
|
||||
|
||||
# VFIO
|
||||
CONFIG_VFIO_PLATFORM=m
|
||||
CONFIG_VFIO_AMBA=m
|
||||
# CONFIG_VFIO_PLATFORM_CALXEDAXGMAC_RESET is not set
|
||||
|
||||
# CONFIG_CRYPTO_TEST is not set
|
||||
# CONFIG_TRANSPARENT_HUGEPAGE is not set
|
||||
# CONFIG_XEN is not set
|
||||
# CONFIG_DRM_RCAR_DU is not set
|
||||
# CONFIG_I2C_RCAR is not set
|
||||
# CONFIG_DRM_SHMOBILE is not set
|
||||
# CONFIG_I2C_SH_MOBILE is not set
|
||||
# CONFIG_I2C_NOMADIK is not set
|
||||
# CONFIG_IRQ_DOMAIN_DEBUG is not set
|
||||
# CONFIG_LOCK_STAT is not set
|
||||
|
||||
# CONFIG_CADENCE_WATCHDOG is not set
|
||||
|
||||
# CONFIG_DRM_ARMADA is not set
|
||||
|
||||
# CONFIG_COMMON_CLK_SI570 is not set
|
||||
# CONFIG_COMMON_CLK_QCOM is not set
|
||||
CONFIG_COMMON_CLK_SCPI=m
|
||||
|
||||
# CONFIG_ARM_PTDUMP is not set
|
||||
|
||||
# CONFIG_PATA_PLATFORM is not set
|
||||
# CONFIG_KEYBOARD_OMAP4 is not set
|
||||
# CONFIG_KEYBOARD_BCM is not set
|
||||
# CONFIG_PHY_SAMSUNG_USB2 is not set
|
||||
# CONFIG_OMAP_GPMC_DEBUG is not set
|
||||
|
||||
### turn off things which make no sense on embedded SoC
|
||||
|
||||
# core
|
||||
|
||||
# CONFIG_ISDN is not set
|
||||
# CONFIG_PCMCIA is not set
|
||||
# CONFIG_PARPORT is not set
|
||||
# CONFIG_FIREWIRE is not set
|
||||
# CONFIG_ATM_DRIVERS is not set
|
||||
# CONFIG_ISDN is not set
|
||||
# CONFIG_GAMEPORT is not set
|
||||
# CONFIG_AGP is not set
|
||||
|
||||
# netdrv
|
||||
|
||||
CONFIG_NET_VENDOR_MELLANOX=y
|
||||
# CONFIG_NET_VENDOR_3COM is not set
|
||||
# CONFIG_NET_VENDOR_ADAPTEC is not set
|
||||
# CONFIG_NET_VENDOR_BROADCOM is not set
|
||||
# CONFIG_NET_VENDOR_BROCADE is not set
|
||||
# CONFIG_NET_VENDOR_CHELSIO is not set
|
||||
# CONFIG_NET_VENDOR_CISCO is not set
|
||||
# CONFIG_NET_VENDOR_DEC is not set
|
||||
# CONFIG_NET_VENDOR_EMULEX is not set
|
||||
# CONFIG_NET_VENDOR_EXAR is not set
|
||||
# CONFIG_NET_VENDOR_QLOGIC is not set
|
||||
# CONFIG_NET_VENDOR_SUN is not set
|
||||
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||
# CONFIG_NET_VENDOR_XIRCOM is not set
|
||||
# CONFIG_TLAN is not set
|
||||
|
||||
# scsi
|
||||
|
||||
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
|
||||
# CONFIG_BLK_DEV_DAC960 is not set
|
||||
# CONFIG_SCSI_3W_SAS is not set
|
||||
# CONFIG_SCSI_PM8001 is not set
|
||||
# CONFIG_SCSI_IPS is not set
|
||||
# CONFIG_SCSI_BFA_FC is not set
|
||||
# CONFIG_FUSION is not set
|
||||
# CONFIG_SCSI_3W_9XXX is not set
|
||||
# CONFIG_SCSI_ACARD is not set
|
||||
# CONFIG_SCSI_AACRAID is not set
|
||||
# CONFIG_SCSI_AIC7XXX is not set
|
||||
# CONFIG_SCSI_AIC79XX is not set
|
||||
# CONFIG_SCSI_MPT2SAS is not set
|
||||
# CONFIG_SCSI_MPT3SAS is not set
|
||||
|
||||
# serial
|
||||
# CONFIG_SERIAL_MAX3100 is not set
|
||||
# CONFIG_SERIAL_MAX310X is not set
|
||||
# CONFIG_SERIAL_IFX6X60 is not set
|
||||
|
||||
# regulator
|
||||
# CONFIG_REGULATOR_AD5398 is not set
|
||||
# CONFIG_REGULATOR_ANATOP is not set
|
||||
# CONFIG_REGULATOR_DA9210 is not set
|
||||
# CONFIG_REGULATOR_DA9211 is not set
|
||||
# CONFIG_REGULATOR_FAN53555 is not set
|
||||
# CONFIG_REGULATOR_ISL9305 is not set
|
||||
# CONFIG_REGULATOR_ISL6271A is not set
|
||||
# CONFIG_REGULATOR_LP3971 is not set
|
||||
# CONFIG_REGULATOR_LP3972 is not set
|
||||
# CONFIG_REGULATOR_LP872X is not set
|
||||
# CONFIG_REGULATOR_LP8755 is not set
|
||||
# CONFIG_REGULATOR_LTC3589 is not set
|
||||
# CONFIG_REGULATOR_MAX1586 is not set
|
||||
# CONFIG_REGULATOR_MAX8649 is not set
|
||||
# CONFIG_REGULATOR_MAX8660 is not set
|
||||
# CONFIG_REGULATOR_MAX8952 is not set
|
||||
# CONFIG_REGULATOR_MAX8973 is not set
|
||||
# CONFIG_REGULATOR_MT6311 is not set
|
||||
# CONFIG_REGULATOR_PFUZE100 is not set
|
||||
# CONFIG_REGULATOR_PV88060 is not set
|
||||
# CONFIG_REGULATOR_PV88080 is not set
|
||||
# CONFIG_REGULATOR_PV88090 is not set
|
||||
# CONFIG_REGULATOR_TPS51632 is not set
|
||||
# CONFIG_REGULATOR_TPS62360 is not set
|
||||
# CONFIG_REGULATOR_TPS65023 is not set
|
||||
# CONFIG_REGULATOR_TPS6507X is not set
|
||||
# CONFIG_REGULATOR_TPS6524X is not set
|
||||
|
||||
# drm
|
||||
# CONFIG_DRM_VMWGFX is not set
|
||||
# CONFIG_IMX_IPUV3_CORE is not set
|
||||
# CONFIG_FB_DA8XX is not set
|
||||
|
||||
# CONFIG_CORESIGHT is not set
|
||||
# CONFIG_LATTICE_ECP3_CONFIG is not set
|
||||
# CONFIG_TI_DAC7512 is not set
|
||||
|
||||
# Bad Intel shit we don't care about
|
||||
# CONFIG_PINCTRL_BAYTRAIL is not set
|
||||
# CONFIG_PINCTRL_CHERRYVIEW is not set
|
||||
# CONFIG_PINCTRL_BROXTON is not set
|
||||
# CONFIG_PINCTRL_SUNRISEPOINT is not set
|
||||
# CONFIG_XILINX_ZYNQMP_DMA is not set
|
||||
|
||||
# CONFIG_HISILICON_IRQ_MBIGEN is not set
|
||||
# CONFIG_QRTR is not set
|
||||
|
||||
# This Xilinx option is now built for arm64 as well as ARM
|
||||
CONFIG_XILINX_VDMA=m
|
|
@ -0,0 +1,318 @@
|
|||
CONFIG_64BIT=y
|
||||
CONFIG_ARM64=y
|
||||
|
||||
# arm64 only SoCs
|
||||
CONFIG_ARCH_HISI=y
|
||||
CONFIG_ARCH_QCOM=y
|
||||
CONFIG_ARCH_SEATTLE=y
|
||||
CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_ARCH_TEGRA=y
|
||||
CONFIG_ARCH_XGENE=y
|
||||
CONFIG_ARCH_THUNDER=y
|
||||
# CONFIG_ARCH_ALPINE is not set
|
||||
# CONFIG_ARCH_BCM_IPROC is not set
|
||||
# CONFIG_ARCH_BERLIN is not set
|
||||
# CONFIG_ARCH_EXYNOS is not set
|
||||
# CONFIG_ARCH_LAYERSCAPE is not set
|
||||
# CONFIG_ARCH_MEDIATEK is not set
|
||||
# CONFIG_ARCH_MESON is not set
|
||||
# CONFIG_ARCH_RENESAS is not set
|
||||
# CONFIG_ARCH_SPRD is not set
|
||||
# CONFIG_ARCH_STRATIX10 is not set
|
||||
# CONFIG_ARCH_VULCAN is not set
|
||||
# CONFIG_ARCH_ZYNQMP is not set
|
||||
# CONFIG_ARCH_UNIPHIER is not set
|
||||
# CONFIG_ARCH_LG1K is not set
|
||||
|
||||
# Erratum
|
||||
CONFIG_ARM64_ERRATUM_826319=y
|
||||
CONFIG_ARM64_ERRATUM_827319=y
|
||||
CONFIG_ARM64_ERRATUM_824069=y
|
||||
CONFIG_ARM64_ERRATUM_819472=y
|
||||
CONFIG_ARM64_ERRATUM_832075=y
|
||||
CONFIG_ARM64_ERRATUM_843419=y
|
||||
CONFIG_ARM64_ERRATUM_834220=y
|
||||
CONFIG_CAVIUM_ERRATUM_22375=y
|
||||
CONFIG_CAVIUM_ERRATUM_23144=y
|
||||
CONFIG_CAVIUM_ERRATUM_23154=y
|
||||
CONFIG_CAVIUM_ERRATUM_27456=y
|
||||
|
||||
# AMBA / VExpress
|
||||
# CONFIG_RTC_DRV_PL030 is not set
|
||||
# CONFIG_SERIAL_AMBA_PL010 is not set
|
||||
# CONFIG_AMBA_PL08X is not set
|
||||
CONFIG_ARM_SMMU_V3=y
|
||||
CONFIG_NR_CPUS=256
|
||||
|
||||
CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
|
||||
CONFIG_ARCH_REQUIRE_GPIOLIB=y
|
||||
CONFIG_ARM64_64K_PAGES=y
|
||||
|
||||
CONFIG_ARM64_HW_AFDBM=y
|
||||
CONFIG_ARM64_PAN=y
|
||||
CONFIG_ARM64_LSE_ATOMICS=y
|
||||
CONFIG_ARM64_VHE=y
|
||||
CONFIG_ARM64_UAO=y
|
||||
|
||||
# Have ARM team revisit
|
||||
# CONFIG_RELOCATABLE is not set
|
||||
# CONFIG_RANDOMIZE_BASE is not set
|
||||
|
||||
CONFIG_ARM64_ACPI_PARKING_PROTOCOL=y
|
||||
|
||||
CONFIG_BCMA_POSSIBLE=y
|
||||
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
|
||||
CONFIG_BRCMUTIL=m
|
||||
CONFIG_BUG=y
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CMDLINE="console=ttyAMA0"
|
||||
# CONFIG_CMDLINE_FORCE is not set
|
||||
CONFIG_CONSOLE_TRANSLATIONS=y
|
||||
|
||||
CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y
|
||||
CONFIG_HVC_DRIVER=y
|
||||
# CONFIG_HVC_DCC is not set
|
||||
CONFIG_HZ=100
|
||||
|
||||
CONFIG_KVM=y
|
||||
CONFIG_KVM_NEW_VGIC=y
|
||||
|
||||
CONFIG_RCU_FANOUT=64
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPARSEMEM_VMEMMAP=y
|
||||
|
||||
# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set
|
||||
|
||||
# CONFIG_SYS_HYPERVISOR is not set
|
||||
|
||||
CONFIG_ARM_SBSA_WATCHDOG=m
|
||||
CONFIG_RTC_DRV_EFI=y
|
||||
|
||||
CONFIG_ACPI=y
|
||||
CONFIG_ACPI_PROCFS_POWER=y
|
||||
CONFIG_ACPI_EC_DEBUGFS=y
|
||||
CONFIG_ACPI_BUTTON=m
|
||||
CONFIG_ACPI_FAN=m
|
||||
CONFIG_ACPI_DOCK=y
|
||||
CONFIG_ACPI_IPMI=y
|
||||
CONFIG_ACPI_CONTAINER=y
|
||||
CONFIG_ACPI_HED=m
|
||||
CONFIG_ACPI_CUSTOM_METHOD=m
|
||||
CONFIG_ACPI_NFIT=m
|
||||
# CONFIG_ACPI_NFIT_DEBUG is not set
|
||||
CONFIG_PCC=y
|
||||
# CONFIG_ACPI_CPPC_CPUFREQ is not set
|
||||
CONFIG_ACPI_PROCESSOR=y
|
||||
CONFIG_ACPI_THERMAL=y
|
||||
CONFIG_I2C_SCMI=m
|
||||
CONFIG_SENSORS_ACPI_POWER=m
|
||||
CONFIG_ACPI_TABLE_UPGRADE=y
|
||||
CONFIG_ACPI_CONFIGFS=m
|
||||
|
||||
CONFIG_NUMA=y
|
||||
CONFIG_ACPI_NUMA=y
|
||||
CONFIG_NUMA_BALANCING=y
|
||||
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
|
||||
CONFIG_NODES_SHIFT=9
|
||||
|
||||
CONFIG_DMI=y
|
||||
CONFIG_DMIID=y
|
||||
CONFIG_DMI_SYSFS=y
|
||||
|
||||
CONFIG_ARM64_CRYPTO=y
|
||||
CONFIG_CRYPTO_SHA1_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA2_ARM64_CE=y
|
||||
CONFIG_CRYPTO_GHASH_ARM64_CE=m
|
||||
CONFIG_CRYPTO_AES_ARM64_CE=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_CRYPTO_CRC32_ARM64=m
|
||||
CONFIG_CRYPTO_DEV_CCP=y
|
||||
CONFIG_CRYPTO_DEV_CCP_DD=m
|
||||
CONFIG_CRYPTO_DEV_CCP_CRYPTO=m
|
||||
|
||||
# APM Xgene
|
||||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_COMMON_CLK_XGENE=y
|
||||
CONFIG_AHCI_XGENE=y
|
||||
CONFIG_PHY_XGENE=y
|
||||
CONFIG_NET_XGENE=m
|
||||
CONFIG_RTC_DRV_XGENE=m
|
||||
CONFIG_HW_RANDOM_XGENE=m
|
||||
CONFIG_GPIO_XGENE=y
|
||||
CONFIG_GPIO_XGENE_SB=m
|
||||
CONFIG_XGENE_DMA=m
|
||||
CONFIG_EDAC_XGENE=m
|
||||
CONFIG_PCI_XGENE=y
|
||||
CONFIG_PCI_XGENE_MSI=y
|
||||
CONFIG_I2C_XGENE_SLIMPRO=m
|
||||
CONFIG_XGENE_SLIMPRO_MBOX=m
|
||||
CONFIG_MDIO_XGENE=m
|
||||
|
||||
# AMD Seattle
|
||||
CONFIG_NET_SB1000=y
|
||||
CONFIG_AMD_XGBE=m
|
||||
CONFIG_AMD_XGBE_DCB=y
|
||||
CONFIG_VFIO_PLATFORM_AMDXGBE_RESET=m
|
||||
CONFIG_PINCTRL_AMD=y
|
||||
|
||||
# HiSilicon
|
||||
CONFIG_HISILICON_IRQ_MBIGEN=y
|
||||
CONFIG_COMMON_CLK_HI6220=y
|
||||
CONFIG_PCI_HISI=y
|
||||
CONFIG_POWER_RESET_HISI=y
|
||||
CONFIG_HISI_THERMAL=m
|
||||
CONFIG_HW_RANDOM_HISI=m
|
||||
CONFIG_STUB_CLK_HI6220=y
|
||||
CONFIG_REGULATOR_HI655X=m
|
||||
CONFIG_PHY_HI6220_USB=m
|
||||
CONFIG_COMMON_RESET_HI6220=m
|
||||
CONFIG_HI6220_MBOX=m
|
||||
CONFIG_RESET_HISI=y
|
||||
CONFIG_MFD_HI655X_PMIC=m
|
||||
CONFIG_DRM_HISI_KIRIN=m
|
||||
CONFIG_HISI_KIRIN_DW_DSI=m
|
||||
CONFIG_MDIO_HISI_FEMAC=m
|
||||
CONFIG_INPUT_HISI_POWERKEY=m
|
||||
|
||||
# Tegra
|
||||
CONFIG_ARCH_TEGRA_132_SOC=y
|
||||
CONFIG_ARCH_TEGRA_210_SOC=y
|
||||
CONFIG_TEGRA210_ADMA=y
|
||||
CONFIG_MFD_MAX77620=y
|
||||
CONFIG_PINCTRL_MAX77620=m
|
||||
CONFIG_REGULATOR_MAX77620=m
|
||||
CONFIG_GPIO_MAX77620=m
|
||||
CONFIG_TEGRA_ACONNECT=y
|
||||
|
||||
# AllWinner
|
||||
CONFIG_MACH_SUN50I=y
|
||||
CONFIG_SUNXI_RSB=m
|
||||
CONFIG_AHCI_SUNXI=m
|
||||
CONFIG_NET_VENDOR_ALLWINNER=y
|
||||
# CONFIG_SUN4I_EMAC is not set
|
||||
CONFIG_SUN8I_EMAC=m
|
||||
# CONFIG_MDIO_SUN4I is not set
|
||||
# CONFIG_KEYBOARD_SUN4I_LRADC is not set
|
||||
# CONFIG_TOUCHSCREEN_SUN4I is not set
|
||||
# CONFIG_SERIO_SUN4I_PS2 is not set
|
||||
CONFIG_SUNXI_WATCHDOG=m
|
||||
CONFIG_MFD_SUN6I_PRCM=y
|
||||
CONFIG_IR_SUNXI=m
|
||||
CONFIG_MMC_SUNXI=m
|
||||
CONFIG_RTC_DRV_SUN6I=m
|
||||
CONFIG_PWM_SUN4I=m
|
||||
# CONFIG_PHY_SUN4I_USB is not set
|
||||
# CONFIG_PHY_SUN9I_USB is not set
|
||||
CONFIG_NVMEM_SUNXI_SID=m
|
||||
CONFIG_SUNXI_CCU=y
|
||||
# CONFIG_SUN8I_H3_CCU is not set
|
||||
|
||||
# qcom
|
||||
# MSM8996 = SD-820, MSM8916 = SD-410
|
||||
CONFIG_SERIAL_MSM=y
|
||||
CONFIG_SERIAL_MSM_CONSOLE=y
|
||||
CONFIG_QCOM_GSBI=y
|
||||
CONFIG_PCIE_QCOM=y
|
||||
CONFIG_POWER_RESET_MSM=y
|
||||
CONFIG_MMC_SDHCI_MSM=m
|
||||
CONFIG_I2C_QUP=m
|
||||
CONFIG_SPI_QUP=m
|
||||
CONFIG_QCOM_WDT=m
|
||||
CONFIG_MFD_QCOM_RPM=m
|
||||
CONFIG_PINCTRL_MSM=y
|
||||
CONFIG_PINCTRL_MSM8916=y
|
||||
CONFIG_PINCTRL_MSM8996=y
|
||||
CONFIG_REGULATOR_QCOM_RPM=m
|
||||
CONFIG_REGULATOR_QCOM_SMD_RPM=m
|
||||
CONFIG_QCOM_BAM_DMA=y
|
||||
CONFIG_HWSPINLOCK_QCOM=m
|
||||
CONFIG_HW_RANDOM_MSM=m
|
||||
CONFIG_CRYPTO_DEV_QCE=m
|
||||
CONFIG_RTC_DRV_PM8XXX=m
|
||||
CONFIG_QCOM_QFPROM=m
|
||||
CONFIG_QCOM_SMEM=m
|
||||
CONFIG_QCOM_SMP2P=m
|
||||
CONFIG_QCOM_SMSM=m
|
||||
CONFIG_QCOM_SMD=m
|
||||
CONFIG_QCOM_SMD_RPM=m
|
||||
CONFIG_PINCTRL_QCOM_SPMI_PMIC=m
|
||||
CONFIG_REGULATOR_QCOM_SPMI=m
|
||||
CONFIG_QCOM_SPMI_TEMP_ALARM=m
|
||||
CONFIG_QCOM_SPMI_IADC=m
|
||||
CONFIG_QCOM_SPMI_VADC=m
|
||||
CONFIG_SPMI_MSM_PMIC_ARB=m
|
||||
CONFIG_USB_QCOM_8X16_PHY=m
|
||||
CONFIG_USB_EHCI_MSM=m
|
||||
CONFIG_USB_CHIPIDEA=m
|
||||
CONFIG_USB_CHIPIDEA_UDC=y
|
||||
CONFIG_USB_CHIPIDEA_HOST=y
|
||||
CONFIG_USB_MSM_OTG=m
|
||||
CONFIG_DRM_MSM=m
|
||||
# CONFIG_DRM_MSM_DSI is not set
|
||||
CONFIG_DRM_MSM_HDMI_HDCP=y
|
||||
# CONFIG_DRM_MSM_REGISTER_LOGGING is not set
|
||||
CONFIG_QCOM_WCNSS_CTRL=m
|
||||
CONFIG_QCOM_COINCELL=m
|
||||
# CONFIG_PHY_QCOM_APQ8064_SATA is not set
|
||||
# CONFIG_PHY_QCOM_UFS is not set
|
||||
# CONFIG_PINCTRL_QCOM_SSBI_PMIC is not set
|
||||
# CONFIG_PINCTRL_APQ8064 is not set
|
||||
# CONFIG_PINCTRL_APQ8084 is not set
|
||||
# CONFIG_PINCTRL_MSM8660 is not set
|
||||
# CONFIG_PINCTRL_MSM8960 is not set
|
||||
# CONFIG_PINCTRL_MDM9615 is not set
|
||||
# CONFIG_PINCTRL_MSM8X74 is not set
|
||||
# CONFIG_PINCTRL_QDF2XXX is not set
|
||||
# CONFIG_INPUT_PM8941_PWRKEY is not set
|
||||
# CONFIG_INPUT_REGULATOR_HAPTIC is not set
|
||||
# CONFIG_CHARGER_MANAGER is not set
|
||||
# CONFIG_SENSORS_LTC2978_REGULATOR is not set
|
||||
# CONFIG_QCOM_Q6V5_PIL is not set
|
||||
|
||||
# mvebu
|
||||
# CONFIG_MV_XOR_V2 is not set
|
||||
|
||||
# ThunderX
|
||||
# CONFIG_MDIO_OCTEON is not set
|
||||
CONFIG_MDIO_THUNDER=m
|
||||
CONFIG_PCI_HOST_THUNDER_PEM=y
|
||||
CONFIG_PCI_HOST_THUNDER_ECAM=y
|
||||
CONFIG_NET_VENDOR_CAVIUM=y
|
||||
CONFIG_THUNDER_NIC_PF=m
|
||||
CONFIG_THUNDER_NIC_VF=m
|
||||
CONFIG_THUNDER_NIC_BGX=m
|
||||
# CONFIG_LIQUIDIO is not set
|
||||
|
||||
CONFIG_SATA_AHCI_PLATFORM=y
|
||||
CONFIG_SATA_AHCI_SEATTLE=m
|
||||
|
||||
CONFIG_LIBNVDIMM=m
|
||||
CONFIG_BTT=y
|
||||
CONFIG_ND_BTT=m
|
||||
CONFIG_ND_BLK=m
|
||||
|
||||
# CONFIG_PMIC_OPREGION is not set
|
||||
# CONFIG_DEBUG_RODATA is not set
|
||||
|
||||
CONFIG_DEBUG_SECTION_MISMATCH=y
|
||||
|
||||
# CONFIG_SND_SOC is not set
|
||||
|
||||
# busted build for various reasons
|
||||
# uses pci_* for some reason to allocate DMA buffers
|
||||
# CONFIG_DVB_B2C2_FLEXCOP_USB is not set
|
||||
# weird include chain resulting in missing u64 type
|
||||
# CONFIG_USB_SPEEDTOUCH is not set
|
||||
# dma issues in headers
|
||||
# CONFIG_PARPORT_PC is not set
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
|
||||
# CONFIG_HOTPLUG_PCI_SHPC is not set
|
||||
|
||||
# CONFIG_FSL_MC_BUS is not set
|
||||
# CONFIG_FUJITSU_ES is not set
|
||||
# CONFIG_IMX_THERMAL is not set
|
||||
# CONFIG_PNP_DEBUG_MESSAGES is not set
|
||||
# CONFIG_BCM_PDC_MBOX is not set
|
|
@ -0,0 +1,626 @@
|
|||
# ARM unified arch kernel
|
||||
|
||||
# CONFIG_ARCH_BERLIN is not set
|
||||
# CONFIG_ARCH_KEYSTONE is not set
|
||||
CONFIG_ARCH_MXC=y
|
||||
CONFIG_ARCH_MMP=y
|
||||
CONFIG_ARCH_OMAP3=y
|
||||
CONFIG_ARCH_OMAP4=y
|
||||
CONFIG_ARCH_QCOM=y
|
||||
CONFIG_ARCH_TEGRA=y
|
||||
CONFIG_ARCH_ZYNQ=y
|
||||
# CONFIG_ARCH_MDM9615 is not set
|
||||
|
||||
# These are supported in the LPAE kernel
|
||||
# CONFIG_ARM_LPAE is not set
|
||||
# CONFIG_XEN is not set
|
||||
# CONFIG_ARM_VIRT_EXT is not set
|
||||
# CONFIG_VIRTUALIZATION is not set
|
||||
|
||||
# omap
|
||||
CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
|
||||
CONFIG_SOC_OMAP5=y
|
||||
# CONFIG_SOC_DRA7XX is not set
|
||||
CONFIG_SOC_OMAP3430=y
|
||||
CONFIG_SOC_TI81XX=y
|
||||
# CONFIG_MACH_NOKIA_RX51 is not set
|
||||
# CONFIG_MACH_OMAP_LDP is not set
|
||||
# CONFIG_MACH_OMAP3517EVM is not set
|
||||
# CONFIG_MACH_OMAP3_PANDORA is not set
|
||||
CONFIG_OMAP5_ERRATA_801819=y
|
||||
|
||||
CONFIG_SOC_HAS_REALTIME_COUNTER=y
|
||||
CONFIG_OMAP_RESET_CLOCKS=y
|
||||
CONFIG_OMAP_MUX=y
|
||||
CONFIG_OMAP_MUX_WARNINGS=y
|
||||
CONFIG_OMAP_32K_TIMER=y
|
||||
CONFIG_OMAP_PACKAGE_CBB=y
|
||||
CONFIG_OMAP_PACKAGE_CUS=y
|
||||
# CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set
|
||||
|
||||
CONFIG_OMAP2PLUS_MBOX=m
|
||||
CONFIG_OMAP_MBOX_KFIFO_SIZE=256
|
||||
CONFIG_DMA_OMAP=m
|
||||
CONFIG_OMAP_IOMMU=y
|
||||
CONFIG_HWSPINLOCK_OMAP=m
|
||||
# CONFIG_OMAP3_SDRC_AC_TIMING is not set
|
||||
# CONFIG_PHY_DM816X_USB is not set
|
||||
|
||||
CONFIG_SERIAL_OMAP=y
|
||||
CONFIG_SERIAL_OMAP_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_OMAP=m
|
||||
|
||||
# Needed by omap_hsmmc for card detect on at least the am33xx (BBone) platforms (changed in 4.2)
|
||||
CONFIG_GPIO_OMAP=y
|
||||
CONFIG_GPIO_TWL4030=m
|
||||
CONFIG_GPIO_TWL6040=m
|
||||
CONFIG_I2C_OMAP=m
|
||||
CONFIG_CHARGER_TWL4030=m
|
||||
CONFIG_CHARGER_ISP1704=m
|
||||
CONFIG_CHARGER_BQ2415X=m
|
||||
CONFIG_OMAP_WATCHDOG=m
|
||||
CONFIG_TWL4030_CORE=y
|
||||
CONFIG_TWL4030_MADC=m
|
||||
CONFIG_TWL4030_POWER=y
|
||||
CONFIG_TWL4030_WATCHDOG=m
|
||||
CONFIG_BATTERY_TWL4030_MADC=m
|
||||
CONFIG_BATTERY_BQ27XXX=m
|
||||
CONFIG_BATTERY_BQ27XXX_I2C=y
|
||||
CONFIG_OMAP_USB2=m
|
||||
CONFIG_OMAP_CONTROL_PHY=m
|
||||
CONFIG_TI_PIPE3=m
|
||||
CONFIG_PCI_DRA7XX=y
|
||||
CONFIG_TWL4030_USB=m
|
||||
CONFIG_TWL6030_USB=m
|
||||
CONFIG_TWL6040_CORE=y
|
||||
CONFIG_CLK_TWL6040=m
|
||||
# DM814x such as hp-t410
|
||||
CONFIG_COMMON_CLK_TI_ADPLL=m
|
||||
CONFIG_OMAP_INTERCONNECT=m
|
||||
CONFIG_MFD_OMAP_USB_HOST=y
|
||||
CONFIG_HDQ_MASTER_OMAP=m
|
||||
CONFIG_REGULATOR_TWL4030=y
|
||||
CONFIG_BACKLIGHT_PANDORA=m
|
||||
CONFIG_OMAP_OCP2SCP=m
|
||||
CONFIG_USB_EHCI_HCD_OMAP=m
|
||||
CONFIG_USB_OHCI_HCD_OMAP3=m
|
||||
CONFIG_USB_MUSB_AM35X=m
|
||||
CONFIG_USB_MUSB_OMAP2PLUS=m
|
||||
CONFIG_USB_INVENTRA_DMA=y
|
||||
CONFIG_USB_DWC3_OMAP=m
|
||||
CONFIG_MMC_OMAP=m
|
||||
CONFIG_RTC_DRV_MAX8907=m
|
||||
# CONFIG_RTC_DRV_TWL92330 is not set
|
||||
CONFIG_RTC_DRV_TWL4030=y
|
||||
CONFIG_RTC_DRV_OMAP=y
|
||||
CONFIG_SENSORS_TWL4030_MADC=m
|
||||
CONFIG_TWL6030_GPADC=m
|
||||
CONFIG_BATTERY_RX51=m
|
||||
# CONFIG_IR_RX51 is not set
|
||||
|
||||
# OMAP5 (possibly other devices too)
|
||||
CONFIG_MFD_PALMAS=y
|
||||
CONFIG_EXTCON_PALMAS=m
|
||||
CONFIG_GPIO_PALMAS=y
|
||||
CONFIG_PINCTRL_PALMAS=y
|
||||
CONFIG_REGULATOR_PALMAS=y
|
||||
CONFIG_REGULATOR_PBIAS=m
|
||||
CONFIG_RTC_DRV_PALMAS=m
|
||||
CONFIG_OMAP5_DSS_HDMI=y
|
||||
CONFIG_COMMON_CLK_PALMAS=m
|
||||
CONFIG_INPUT_PALMAS_PWRBUTTON=m
|
||||
CONFIG_PALMAS_GPADC=m
|
||||
|
||||
CONFIG_MFD_WL1273_CORE=m
|
||||
CONFIG_NFC_WILINK=m
|
||||
|
||||
CONFIG_MTD_ONENAND_OMAP2=m
|
||||
CONFIG_MTD_NAND_OMAP2=m
|
||||
CONFIG_MTD_NAND_OMAP_BCH=y
|
||||
CONFIG_SPI_OMAP24XX=m
|
||||
CONFIG_SPI_TI_QSPI=m
|
||||
|
||||
CONFIG_INPUT_TWL4030_PWRBUTTON=m
|
||||
CONFIG_INPUT_TWL4030_VIBRA=m
|
||||
CONFIG_INPUT_TWL6040_VIBRA=m
|
||||
CONFIG_KEYBOARD_OMAP4=m
|
||||
CONFIG_KEYBOARD_TWL4030=m
|
||||
CONFIG_LEDS_TCA6507=m
|
||||
|
||||
# OMAP thermal temp.
|
||||
CONFIG_OMAP4_THERMAL=y
|
||||
CONFIG_OMAP5_THERMAL=y
|
||||
|
||||
# OMAP3 thermal/power
|
||||
CONFIG_POWER_AVS=y
|
||||
CONFIG_POWER_AVS_OMAP=y
|
||||
CONFIG_POWER_AVS_OMAP_CLASS3=y
|
||||
# CPUFREQ_CPU0 is used for scaling on DT OMAP
|
||||
# CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set
|
||||
|
||||
CONFIG_PWM_TIECAP=m
|
||||
CONFIG_PWM_TIEHRPWM=m
|
||||
CONFIG_PWM_TWL=m
|
||||
CONFIG_PWM_TWL_LED=m
|
||||
CONFIG_PWM_OMAP_DMTIMER=m
|
||||
# CONFIG_PWM_STMPE is not set
|
||||
|
||||
CONFIG_CRYPTO_DEV_OMAP_SHAM=m
|
||||
# Disable for the moment, terribly broken upstream
|
||||
# CONFIG_CRYPTO_DEV_OMAP_AES is not set
|
||||
CONFIG_CRYPTO_DEV_OMAP_DES=m
|
||||
CONFIG_HW_RANDOM_OMAP=m
|
||||
CONFIG_HW_RANDOM_OMAP3_ROM=m
|
||||
|
||||
CONFIG_DRM_OMAP=m
|
||||
CONFIG_DRM_OMAP_NUM_CRTCS=2
|
||||
CONFIG_OMAP2_VRFB=y
|
||||
CONFIG_DRM_OMAP_ENCODER_OPA362=m
|
||||
CONFIG_DRM_OMAP_ENCODER_TFP410=m
|
||||
CONFIG_DRM_OMAP_ENCODER_TPD12S015=m
|
||||
CONFIG_DRM_OMAP_CONNECTOR_DVI=m
|
||||
CONFIG_DRM_OMAP_CONNECTOR_HDMI=m
|
||||
CONFIG_DRM_OMAP_CONNECTOR_ANALOG_TV=m
|
||||
CONFIG_DRM_OMAP_PANEL_DPI=m
|
||||
CONFIG_DRM_OMAP_PANEL_DSI_CM=m
|
||||
CONFIG_DRM_OMAP_PANEL_SONY_ACX565AKM=m
|
||||
CONFIG_DRM_OMAP_PANEL_LGPHILIPS_LB035Q02=m
|
||||
CONFIG_DRM_OMAP_PANEL_SHARP_LS037V7DW01=m
|
||||
CONFIG_DRM_OMAP_PANEL_TPO_TD028TTEC1=m
|
||||
CONFIG_DRM_OMAP_PANEL_TPO_TD043MTEA1=m
|
||||
CONFIG_DRM_OMAP_PANEL_NEC_NL8048HL11=m
|
||||
|
||||
CONFIG_OMAP2_DSS=m
|
||||
# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set
|
||||
CONFIG_OMAP2_DSS_DPI=y
|
||||
CONFIG_OMAP2_DSS_RFBI=y
|
||||
CONFIG_OMAP2_DSS_VENC=y
|
||||
CONFIG_OMAP4_DSS_HDMI=y
|
||||
CONFIG_OMAP2_DSS_SDI=y
|
||||
CONFIG_OMAP2_DSS_DSI=y
|
||||
CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
|
||||
CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y
|
||||
|
||||
# Enable V4L2 drivers for OMAP2+
|
||||
CONFIG_V4L_PLATFORM_DRIVERS=y
|
||||
# CONFIG_VIDEO_OMAP2_VOUT is not set
|
||||
CONFIG_VIDEO_OMAP3=m
|
||||
CONFIG_VIDEO_ADP1653=m
|
||||
# CONFIG_VIDEO_OMAP4 is not set
|
||||
# The ones below are for TI Davinci
|
||||
# CONFIG_VIDEO_DM6446_CCDC is not set
|
||||
# CONFIG_VIDEO_DM355_CCDC is not set
|
||||
|
||||
CONFIG_SND_OMAP_SOC=m
|
||||
CONFIG_SND_SOC_I2C_AND_SPI=m
|
||||
CONFIG_SND_OMAP_SOC_AM3517EVM=m
|
||||
CONFIG_SND_OMAP_SOC_DMIC=m
|
||||
CONFIG_SND_OMAP_SOC_HDMI_AUDIO=m
|
||||
CONFIG_SND_OMAP_SOC_MCBSP=m
|
||||
CONFIG_SND_OMAP_SOC_MCPDM=m
|
||||
CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m
|
||||
CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
|
||||
CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
|
||||
CONFIG_SND_OMAP_SOC_RX51=m
|
||||
CONFIG_SND_SOC_TLV320AIC23=m
|
||||
CONFIG_SND_SOC_TLV320AIC23_I2C=m
|
||||
CONFIG_SND_SOC_TLV320AIC23_SPI=m
|
||||
CONFIG_SND_SOC_TLV320AIC3X=m
|
||||
CONFIG_SND_SOC_TLV320AIC31XX=m
|
||||
CONFIG_SND_SOC_TWL4030=m
|
||||
CONFIG_SND_SOC_TWL6040=m
|
||||
CONFIG_RADIO_WL128X=m
|
||||
|
||||
CONFIG_OMAP_REMOTEPROC=m
|
||||
CONFIG_TI_SYSCON_RESET=m
|
||||
|
||||
# CONFIG_OMAP2_DSS_DEBUGFS is not set
|
||||
# CONFIG_OMAP_IOMMU_DEBUG is not set
|
||||
# CONFIG_OMAP_MUX_DEBUG is not set
|
||||
# CONFIG_VIDEO_OMAP3_DEBUG is not set
|
||||
|
||||
# AM33xx/43xx
|
||||
CONFIG_SOC_AM33XX=y
|
||||
CONFIG_SOC_AM43XX=y
|
||||
CONFIG_AM335X_CONTROL_USB=m
|
||||
CONFIG_AM335X_PHY_USB=m
|
||||
CONFIG_USB_MUSB_AM335X_CHILD=m
|
||||
CONFIG_TI_CPPI41=m
|
||||
CONFIG_USB_TI_CPPI41_DMA=y
|
||||
CONFIG_MFD_TI_AM335X_TSCADC=m
|
||||
CONFIG_TI_ST=m
|
||||
CONFIG_TI_DAC7512=m
|
||||
CONFIG_TI_DAVINCI_CPDMA=m
|
||||
CONFIG_TI_DAVINCI_EMAC=m
|
||||
CONFIG_TI_DAVINCI_MDIO=m
|
||||
CONFIG_TI_CPSW=m
|
||||
CONFIG_TI_CPSW_PHY_SEL=y
|
||||
CONFIG_TI_CPSW_ALE=m
|
||||
CONFIG_TI_CPTS=y
|
||||
CONFIG_TI_EMIF=m
|
||||
CONFIG_DRM_TILCDC=m
|
||||
# CONFIG_COMMON_CLK_TI_ADPLL is not set
|
||||
# We only need this until the BBB dts is actually updated
|
||||
CONFIG_DRM_TILCDC_SLAVE_COMPAT=y
|
||||
CONFIG_SPI_DAVINCI=m
|
||||
CONFIG_SND_DAVINCI_SOC=m
|
||||
CONFIG_SND_DAVINCI_SOC_I2S=m
|
||||
CONFIG_SND_DAVINCI_SOC_MCASP=m
|
||||
CONFIG_SND_DAVINCI_SOC_VCIF=m
|
||||
CONFIG_SND_DAVINCI_SOC_GENERIC_EVM=m
|
||||
CONFIG_SND_EDMA_SOC=m
|
||||
CONFIG_SND_AM33XX_SOC_EVM=m
|
||||
CONFIG_REGULATOR_TI_ABB=m
|
||||
CONFIG_TI_ADC081C=m
|
||||
CONFIG_TI_AM335X_ADC=m
|
||||
CONFIG_PWM_TIPWMSS=y
|
||||
CONFIG_MFD_TPS65218=m
|
||||
CONFIG_REGULATOR_TPS65218=m
|
||||
CONFIG_INPUT_TPS65218_PWRBUTTON=m
|
||||
CONFIG_VIDEO_AM437X_VPFE=m
|
||||
CONFIG_UIO_PRUSS=m
|
||||
CONFIG_WKUP_M3_RPROC=m
|
||||
CONFIG_WKUP_M3_IPC=m
|
||||
|
||||
# Builtin needed for BBone White
|
||||
CONFIG_MFD_TPS65217=y
|
||||
CONFIG_REGULATOR_TPS65217=y
|
||||
CONFIG_CHARGER_TPS65217=m
|
||||
CONFIG_BACKLIGHT_TPS65217=m
|
||||
CONFIG_REGULATOR_TPS65217=m
|
||||
|
||||
CONFIG_CAN_C_CAN=m
|
||||
CONFIG_CAN_C_CAN_PLATFORM=m
|
||||
|
||||
# QCom
|
||||
CONFIG_ARCH_MSM8X60=y
|
||||
CONFIG_ARCH_MSM8960=y
|
||||
CONFIG_ARCH_MSM8974=y
|
||||
CONFIG_SERIAL_MSM=y
|
||||
CONFIG_SERIAL_MSM_CONSOLE=y
|
||||
CONFIG_PINCTRL_APQ8064=m
|
||||
CONFIG_PINCTRL_APQ8084=m
|
||||
CONFIG_PINCTRL_MSM8660=m
|
||||
CONFIG_PINCTRL_MSM8960=m
|
||||
CONFIG_PINCTRL_MSM8X74=m
|
||||
CONFIG_PINCTRL_MSM8916=m
|
||||
CONFIG_PINCTRL_QCOM_SPMI_PMIC=m
|
||||
CONFIG_PINCTRL_QCOM_SSBI_PMIC=m
|
||||
CONFIG_COMMON_CLK_QCOM=m
|
||||
# CONFIG_MSM_GCC_8916 is not set
|
||||
# CONFIG_MSM_LCC_8960 is not set
|
||||
CONFIG_MFD_QCOM_RPM=m
|
||||
CONFIG_MFD_PM8921_CORE=m
|
||||
CONFIG_REGULATOR_QCOM_RPM=m
|
||||
CONFIG_REGULATOR_QCOM_SPMI=m
|
||||
CONFIG_APQ_GCC_8084=m
|
||||
CONFIG_APQ_MMCC_8084=m
|
||||
CONFIG_MSM_GCC_8660=m
|
||||
CONFIG_MSM_GCC_8960=m
|
||||
CONFIG_MSM_MMCC_8960=m
|
||||
CONFIG_MSM_GCC_8974=m
|
||||
CONFIG_MSM_MMCC_8974=m
|
||||
CONFIG_MSM_GCC_8996=m
|
||||
CONFIG_MSM_MMCC_8996=m
|
||||
CONFIG_HW_RANDOM_MSM=m
|
||||
CONFIG_I2C_QUP=m
|
||||
CONFIG_SPI_QUP=m
|
||||
CONFIG_POWER_RESET_MSM=y
|
||||
CONFIG_USB_MSM_OTG=m
|
||||
CONFIG_MMC_SDHCI_MSM=m
|
||||
CONFIG_MMC_QCOM_DML=m
|
||||
CONFIG_QCOM_BAM_DMA=m
|
||||
CONFIG_QCOM_GSBI=m
|
||||
CONFIG_QCOM_PM=y
|
||||
CONFIG_PHY_QCOM_APQ8064_SATA=m
|
||||
CONFIG_USB_DWC3_QCOM=m
|
||||
CONFIG_CRYPTO_DEV_QCE=m
|
||||
CONFIG_DRM_MSM=m
|
||||
# CONFIG_DRM_MSM_DSI is not set
|
||||
CONFIG_DRM_MSM_HDMI_HDCP=y
|
||||
# CONFIG_DRM_MSM_REGISTER_LOGGING is not set
|
||||
CONFIG_USB_EHCI_MSM=m
|
||||
CONFIG_MFD_PM8XXX=m
|
||||
CONFIG_KEYBOARD_PMIC8XXX=m
|
||||
CONFIG_INPUT_PM8XXX_VIBRATOR=m
|
||||
CONFIG_INPUT_PMIC8XXX_PWRKEY=m
|
||||
CONFIG_INPUT_PM8941_PWRKEY=m
|
||||
CONFIG_RTC_DRV_PM8XXX=m
|
||||
CONFIG_QCOM_WDT=m
|
||||
CONFIG_SPMI_MSM_PMIC_ARB=m
|
||||
CONFIG_QCOM_SPMI_IADC=m
|
||||
CONFIG_QCOM_SPMI_VADC=m
|
||||
CONFIG_SND_SOC_QCOM=m
|
||||
CONFIG_SND_SOC_LPASS_CPU=m
|
||||
CONFIG_SND_SOC_LPASS_PLATFORM=m
|
||||
CONFIG_SND_SOC_STORM=m
|
||||
CONFIG_PHY_QCOM_UFS=m
|
||||
CONFIG_HWSPINLOCK_QCOM=m
|
||||
CONFIG_QCOM_COINCELL=m
|
||||
CONFIG_USB_QCOM_8X16_PHY=m
|
||||
CONFIG_QCOM_SMD=m
|
||||
CONFIG_QCOM_SMD_RPM=m
|
||||
CONFIG_QCOM_SMEM=m
|
||||
CONFIG_REGULATOR_QCOM_SMD_RPM=m
|
||||
CONFIG_QCOM_SMEM=m
|
||||
CONFIG_QCOM_QFPROM=m
|
||||
CONFIG_QCOM_WCNSS_CTRL=m
|
||||
CONFIG_QCOM_SMSM=y
|
||||
CONFIG_QCOM_SMP2P=m
|
||||
CONFIG_PCIE_QCOM=y
|
||||
CONFIG_MTD_NAND_QCOM=m
|
||||
# CONFIG_QCOM_Q6V5_PIL is not set
|
||||
# CONFIG_MSM_IOMMU is not set
|
||||
|
||||
# i.MX
|
||||
# CONFIG_MXC_DEBUG_BOARD is not set
|
||||
CONFIG_SOC_IMX50=y
|
||||
CONFIG_SOC_IMX51=y
|
||||
CONFIG_SOC_IMX53=y
|
||||
CONFIG_SOC_IMX6=y
|
||||
CONFIG_SOC_IMX6Q=y
|
||||
CONFIG_SOC_IMX6SL=y
|
||||
CONFIG_SOC_IMX6SX=y
|
||||
CONFIG_SOC_IMX6UL=y
|
||||
CONFIG_SOC_IMX7D=y
|
||||
# CONFIG_SOC_LS1021A is not set
|
||||
# CONFIG_SOC_VF610 is not set
|
||||
CONFIG_ARM_IMX6Q_CPUFREQ=m
|
||||
CONFIG_POWER_RESET_IMX=y
|
||||
CONFIG_PCI_IMX6=y
|
||||
CONFIG_IMX_GPCV2=y
|
||||
CONFIG_IMX_THERMAL=m
|
||||
CONFIG_IMX_SDMA=m
|
||||
CONFIG_IMX_DMA=m
|
||||
CONFIG_MXS_DMA=y
|
||||
CONFIG_AHCI_IMX=m
|
||||
CONFIG_PATA_IMX=m
|
||||
CONFIG_USB_EHCI_MXC=m
|
||||
CONFIG_USB_CHIPIDEA=m
|
||||
CONFIG_USB_CHIPIDEA_UDC=y
|
||||
CONFIG_USB_CHIPIDEA_HOST=y
|
||||
CONFIG_USB_FSL_USB2=m
|
||||
CONFIG_NET_VENDOR_FREESCALE=y
|
||||
# CONFIG_GIANFAR is not set
|
||||
CONFIG_FEC=m
|
||||
# CONFIG_FSL_PQ_MDIO is not set
|
||||
# CONFIG_FSL_XGMAC_MDIO is not set
|
||||
CONFIG_KEYBOARD_SNVS_PWRKEY=m
|
||||
CONFIG_KEYBOARD_IMX=m
|
||||
CONFIG_KEYBOARD_STMPE=m
|
||||
CONFIG_TOUCHSCREEN_STMPE=m
|
||||
CONFIG_SERIAL_IMX=y
|
||||
CONFIG_SERIAL_IMX_CONSOLE=y
|
||||
CONFIG_PINCTRL_IMX6SL=y
|
||||
CONFIG_I2C_IMX=m
|
||||
CONFIG_STMPE_I2C=y
|
||||
CONFIG_SPI_IMX=m
|
||||
CONFIG_SPI_FSL_QUADSPI=m
|
||||
CONFIG_STMPE_SPI=y
|
||||
CONFIG_MFD_MC13XXX_SPI=m
|
||||
CONFIG_MFD_STMPE=y
|
||||
CONFIG_MTD_NAND_GPMI_NAND=m
|
||||
CONFIG_W1_MASTER_MXC=m
|
||||
CONFIG_IMX_WEIM=y
|
||||
CONFIG_IMX2_WDT=m
|
||||
CONFIG_HW_RANDOM_MXC_RNGA=m
|
||||
CONFIG_CRYPTO_DEV_SAHARA=m
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM=m
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_JR=m
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=3
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=y
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_INTC_COUNT_THLD=8
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD=8192
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=m
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=m
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=m
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=m
|
||||
# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
|
||||
# CONFIG_CRYPTO_DEV_MXS_DCP is not set
|
||||
# CONFIG_CRYPTO_DEV_MXC_SCC is not set
|
||||
CONFIG_RTC_DRV_SNVS=m
|
||||
CONFIG_FB_MXS=m
|
||||
# CONFIG_FB_MX3 is not set
|
||||
# CONFIG_FB_IMX is not set
|
||||
CONFIG_TOUCHSCREEN_IMX6UL_TSC=m
|
||||
CONFIG_NVMEM_IMX_OCOTP=m
|
||||
|
||||
CONFIG_SND_IMX_SOC=m
|
||||
CONFIG_SND_SOC_FSL_ASOC_CARD=m
|
||||
CONFIG_SND_SOC_FSL_ASRC=m
|
||||
CONFIG_SND_SOC_FSL_ESAI=m
|
||||
CONFIG_SND_SOC_FSL_SAI=m
|
||||
CONFIG_SND_SOC_FSL_SPDIF=m
|
||||
CONFIG_SND_SOC_FSL_SSI=m
|
||||
CONFIG_SND_SOC_FSL_UTILS=m
|
||||
CONFIG_SND_SOC_IMX_SSI=m
|
||||
CONFIG_SND_SOC_IMX_AUDMUX=m
|
||||
CONFIG_SND_SOC_IMX_ES8328=m
|
||||
CONFIG_SND_SOC_IMX_PCM_FIQ=m
|
||||
CONFIG_SND_SOC_IMX_PCM_DMA=m
|
||||
CONFIG_SND_SOC_IMX_SGTL5000=m
|
||||
CONFIG_SND_SOC_IMX_WM8962=m
|
||||
CONFIG_SND_SOC_IMX_MC13783=m
|
||||
CONFIG_SND_SOC_IMX_SPDIF=m
|
||||
CONFIG_SND_SOC_CS42XX8_I2C=m
|
||||
CONFIG_SND_SOC_ES8328=m
|
||||
CONFIG_SND_SOC_ES8328_I2C=m
|
||||
CONFIG_SND_SOC_ES8328_SPI=m
|
||||
CONFIG_SND_SOC_EUKREA_TLV320=m
|
||||
CONFIG_SND_SOC_SGTL5000=m
|
||||
CONFIG_SND_SOC_WM8731=m
|
||||
CONFIG_SND_SOC_WM8962=m
|
||||
|
||||
CONFIG_USB_IMX21_HCD=m
|
||||
CONFIG_USB_MXS_PHY=m
|
||||
CONFIG_MMC_SDHCI_ESDHC_IMX=m
|
||||
CONFIG_MMC_MXC=m
|
||||
CONFIG_SPI_MXS=m
|
||||
CONFIG_RTC_DRV_IMXDI=m
|
||||
CONFIG_RTC_DRV_MXC=m
|
||||
# CONFIG_MX3_IPU is not set
|
||||
# CONFIG_MX3_IPU_IRQS is not set
|
||||
|
||||
CONFIG_PWM_IMX=m
|
||||
CONFIG_DRM_IMX=m
|
||||
CONFIG_DRM_IMX_HDMI=m
|
||||
CONFIG_IMX_IPUV3_CORE=m
|
||||
CONFIG_DRM_IMX_IPUV3=m
|
||||
CONFIG_DRM_IMX_LDB=m
|
||||
CONFIG_DRM_IMX_PARALLEL_DISPLAY=m
|
||||
CONFIG_DRM_IMX_TVE=m
|
||||
CONFIG_DRM_ETNAVIV=m
|
||||
# CONFIG_DRM_ETNAVIV_REGISTER_LOGGING is not set
|
||||
CONFIG_VIDEO_CODA=m
|
||||
|
||||
CONFIG_IMX7D_ADC=m
|
||||
CONFIG_SENSORS_MC13783_ADC=m
|
||||
CONFIG_REGULATOR_ANATOP=m
|
||||
CONFIG_REGULATOR_MC13783=m
|
||||
CONFIG_REGULATOR_MC13892=m
|
||||
CONFIG_LEDS_MC13783=m
|
||||
CONFIG_RTC_DRV_MC13XXX=m
|
||||
CONFIG_CAN_FLEXCAN=m
|
||||
|
||||
CONFIG_INPUT_PWM_BEEPER=m
|
||||
CONFIG_INPUT_88PM80X_ONKEY=m
|
||||
|
||||
# i.MX6Q (and likely Samsung among others)
|
||||
CONFIG_MFD_DA9052_I2C=y
|
||||
CONFIG_MFD_DA9052_SPI=y
|
||||
CONFIG_MFD_DA9055=y
|
||||
CONFIG_TOUCHSCREEN_DA9052=m
|
||||
CONFIG_INPUT_DA9052_ONKEY=m
|
||||
CONFIG_INPUT_DA9055_ONKEY=m
|
||||
CONFIG_GPIO_DA9052=m
|
||||
CONFIG_GPIO_DA9055=m
|
||||
CONFIG_GPIO_STMPE=y
|
||||
CONFIG_BATTERY_DA9052=m
|
||||
CONFIG_SENSORS_DA9052_ADC=m
|
||||
CONFIG_SENSORS_DA9055=m
|
||||
CONFIG_DA9052_WATCHDOG=m
|
||||
CONFIG_DA9055_WATCHDOG=m
|
||||
CONFIG_BACKLIGHT_DA9052=m
|
||||
CONFIG_LEDS_DA9052=m
|
||||
CONFIG_RTC_DRV_DA9052=m
|
||||
CONFIG_RTC_DRV_DA9055=m
|
||||
CONFIG_REGULATOR_DA9052=m
|
||||
CONFIG_REGULATOR_DA9055=m
|
||||
|
||||
# picoxcell
|
||||
# CONFIG_CRYPTO_DEV_PICOXCELL is not set
|
||||
|
||||
# MMP XO 1.75
|
||||
# CONFIG_MACH_BROWNSTONE is not set
|
||||
# CONFIG_MACH_FLINT is not set
|
||||
# CONFIG_MACH_MARVELL_JASPER is not set
|
||||
CONFIG_MACH_MMP2_DT=y
|
||||
CONFIG_SERIAL_PXA=y
|
||||
CONFIG_SERIAL_PXA_CONSOLE=y
|
||||
CONFIG_KEYBOARD_PXA27x=y
|
||||
# CONFIG_I2C_PXA_SLAVE is not set
|
||||
CONFIG_SND_MMP_SOC=y
|
||||
CONFIG_SND_PXA910_SOC=m
|
||||
CONFIG_MMC_SDHCI_PXAV2=m
|
||||
CONFIG_MMP_PDMA=y
|
||||
CONFIG_MMP_TDMA=y
|
||||
CONFIG_PXA_DMA=y
|
||||
CONFIG_SERIO_OLPC_APSP=m
|
||||
|
||||
# Exynos 4
|
||||
CONFIG_ARCH_EXYNOS4=y
|
||||
CONFIG_SOC_EXYNOS4212=y
|
||||
CONFIG_SOC_EXYNOS4412=y
|
||||
CONFIG_SOC_EXYNOS4415=y
|
||||
CONFIG_AK8975=m
|
||||
CONFIG_CM36651=m
|
||||
CONFIG_KEYBOARD_SAMSUNG=m
|
||||
|
||||
# Allwinner
|
||||
CONFIG_MACH_SUN4I=y
|
||||
CONFIG_MACH_SUN5I=y
|
||||
|
||||
# Tegra (non A15)
|
||||
CONFIG_ARCH_TEGRA_2x_SOC=y
|
||||
CONFIG_ARCH_TEGRA_3x_SOC=y
|
||||
CONFIG_TEGRA20_MC=y
|
||||
CONFIG_TEGRA_IOMMU_GART=y
|
||||
CONFIG_SPI_TEGRA20_SFLASH=m
|
||||
CONFIG_SPI_TEGRA20_SLINK=m
|
||||
CONFIG_MFD_MAX8907=m
|
||||
CONFIG_SND_SOC_TEGRA_ALC5632=m
|
||||
CONFIG_SND_SOC_TEGRA_TRIMSLICE=m
|
||||
CONFIG_SND_SOC_TEGRA_WM8753=m
|
||||
CONFIG_SND_SOC_TEGRA_WM8903=m
|
||||
CONFIG_SND_SOC_TEGRA_WM9712=m
|
||||
CONFIG_SND_SOC_TEGRA20_AC97=m
|
||||
CONFIG_SND_SOC_TEGRA20_DAS=m
|
||||
CONFIG_SND_SOC_TEGRA20_SPDIF=m
|
||||
|
||||
# AC100 (PAZ00)
|
||||
CONFIG_MFD_NVEC=y
|
||||
CONFIG_MFD_TPS80031=y
|
||||
CONFIG_KEYBOARD_NVEC=y
|
||||
CONFIG_SERIO_NVEC_PS2=y
|
||||
CONFIG_NVEC_POWER=y
|
||||
CONFIG_NVEC_PAZ00=y
|
||||
CONFIG_MFD_TPS6586X=y
|
||||
CONFIG_GPIO_TPS6586X=y
|
||||
CONFIG_RTC_DRV_TPS6586X=m
|
||||
|
||||
# Zynq-7xxx
|
||||
CONFIG_SERIAL_UARTLITE=y
|
||||
CONFIG_SERIAL_UARTLITE_CONSOLE=y
|
||||
CONFIG_SERIAL_XILINX_PS_UART=y
|
||||
CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
|
||||
CONFIG_COMMON_CLK_AXI_CLKGEN=m
|
||||
CONFIG_COMMON_CLK_SI570=m
|
||||
CONFIG_COMMON_CLK_XLNX_CLKWZRD=m
|
||||
CONFIG_ARM_ZYNQ_CPUIDLE=y
|
||||
CONFIG_LATTICE_ECP3_CONFIG=m
|
||||
CONFIG_NET_VENDOR_XILINX=y
|
||||
CONFIG_XILINX_EMACLITE=m
|
||||
CONFIG_GPIO_XILINX=y
|
||||
CONFIG_GPIO_ZYNQ=m
|
||||
CONFIG_I2C_XILINX=m
|
||||
CONFIG_SPI_XILINX=m
|
||||
CONFIG_SPI_CADENCE=m
|
||||
CONFIG_I2C_CADENCE=m
|
||||
CONFIG_XILINX_WATCHDOG=m
|
||||
CONFIG_XILINX_XADC=m
|
||||
CONFIG_SND_SOC_ADI=m
|
||||
CONFIG_SND_SOC_ADI_AXI_I2S=m
|
||||
CONFIG_SND_SOC_ADI_AXI_SPDIF=m
|
||||
CONFIG_XILLYBUS_OF=m
|
||||
CONFIG_GS_FPGABOOT=m
|
||||
CONFIG_USB_GADGET_XILINX=m
|
||||
CONFIG_PCIE_XILINX=y
|
||||
CONFIG_CADENCE_WATCHDOG=m
|
||||
CONFIG_REGULATOR_ISL9305=m
|
||||
CONFIG_PINCTRL_ZYNQ=y
|
||||
CONFIG_AXI_DMAC=m
|
||||
CONFIG_EDAC_SYNOPSYS=m
|
||||
|
||||
# Multi function devices
|
||||
CONFIG_MFD_88PM800=m
|
||||
CONFIG_MFD_88PM805=m
|
||||
CONFIG_MFD_T7L66XB=y
|
||||
CONFIG_MFD_TC6387XB=y
|
||||
|
||||
# Generic drivers
|
||||
CONFIG_REMOTEPROC=m
|
||||
|
||||
# Regulator drivers
|
||||
CONFIG_REGULATOR_FAN53555=m
|
||||
# CONFIG_REGULATOR_88PM800 is not set
|
||||
CONFIG_REGULATOR_AD5398=m
|
||||
CONFIG_REGULATOR_ISL6271A=m
|
||||
CONFIG_REGULATOR_LP3971=m
|
||||
CONFIG_REGULATOR_LP3972=m
|
||||
CONFIG_REGULATOR_LP872X=y
|
||||
CONFIG_REGULATOR_LP8755=m
|
||||
CONFIG_REGULATOR_MAX1586=m
|
||||
CONFIG_REGULATOR_MAX8649=m
|
||||
CONFIG_REGULATOR_MAX8660=m
|
||||
CONFIG_REGULATOR_MAX8907=m
|
||||
CONFIG_REGULATOR_MAX8952=m
|
|
@ -0,0 +1,791 @@
|
|||
# arm configs for sharing between armv7 and armv7-lpae
|
||||
# Generic ARM config options
|
||||
CONFIG_ARM=y
|
||||
|
||||
# CONFIG_ARCH_MULTI_V6 is not set
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
|
||||
CONFIG_CMDLINE=""
|
||||
CONFIG_CMDLINE_FROM_BOOTLOADER=y
|
||||
CONFIG_HAVE_ARM_ARCH_TIMER=y
|
||||
CONFIG_HAVE_ARM_TWD=y
|
||||
CONFIG_AEABI=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_VFPv3=y
|
||||
CONFIG_NEON=y
|
||||
CONFIG_IWMMXT=y
|
||||
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_THUMBEE=y
|
||||
CONFIG_ARM_ASM_UNIFIED=y
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_CPU_TOPOLOGY=y
|
||||
CONFIG_ARM_DMA_MEM_BUFFERABLE=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
CONFIG_CACHE_L2X0=y
|
||||
CONFIG_HIGHPTE=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_ATAGS=y
|
||||
CONFIG_ATAGS_PROC=y
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_ARCH_HAS_TICK_BROADCAST=y
|
||||
CONFIG_IRQ_CROSSBAR=y
|
||||
CONFIG_IOMMU_IO_PGTABLE_LPAE=y
|
||||
CONFIG_CPU_SW_DOMAIN_PAN=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
CONFIG_NR_CPUS=32
|
||||
|
||||
# CONFIG_MCPM is not set
|
||||
# CONFIG_OABI_COMPAT is not set
|
||||
# CONFIG_APM_EMULATION is not set
|
||||
# CONFIG_CPU_ICACHE_DISABLE is not set
|
||||
# CONFIG_CPU_DCACHE_DISABLE is not set
|
||||
# CONFIG_CPU_BPREDICT_DISABLE is not set
|
||||
# CONFIG_DMA_CACHE_RWFO is not set
|
||||
# CONFIG_THUMB2_KERNEL is not set
|
||||
# CONFIG_HVC_DCC is not set
|
||||
# CONFIG_XIP_KERNEL is not set
|
||||
# CONFIG_ARM_VIRT_EXT is not set
|
||||
|
||||
# CONFIG_DEBUG_RODATA is not set
|
||||
# CONFIG_DEBUG_ALIGN_RODATA is not set
|
||||
|
||||
# Platforms enabled/disabled globally on ARMv7
|
||||
CONFIG_ARCH_EXYNOS=y
|
||||
CONFIG_ARCH_HIGHBANK=y
|
||||
CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_ARCH_TEGRA=y
|
||||
CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y
|
||||
CONFIG_ARCH_VIRT=y
|
||||
# CONFIG_ARCH_ARTPEC is not set
|
||||
# CONFIG_ARCH_HI3xxx is not set
|
||||
# CONFIG_ARCH_HISI is not set
|
||||
# CONFIG_ARCH_MEDIATEK is not set
|
||||
# CONFIG_ARCH_MESON is not set
|
||||
# CONFIG_ARCH_MMP is not set
|
||||
# CONFIG_ARCH_QCOM is not set
|
||||
# CONFIG_ARCH_REALVIEW is not set
|
||||
# CONFIG_ARCH_RENESAS is not set
|
||||
# CONFIG_ARCH_S5PV210 is not set
|
||||
# CONFIG_ARCH_SHMOBILE_MULTI is not set
|
||||
# CONFIG_ARCH_SIRF is not set
|
||||
# CONFIG_ARCH_SOCFPGA is not set
|
||||
# CONFIG_PLAT_SPEAR is not set
|
||||
# CONFIG_ARCH_STI is not set
|
||||
# CONFIG_ARCH_TANGO is not set
|
||||
# CONFIG_ARCH_U8500 is not set
|
||||
# CONFIG_ARCH_VEXPRESS_SPC is not set
|
||||
# CONFIG_ARCH_WM8850 is not set
|
||||
# CONFIG_ARCH_DIGICOLOR is not set
|
||||
# CONFIG_ARCH_ALPINE is not set
|
||||
# CONFIG_ARCH_AT91 is not set
|
||||
# CONFIG_ARCH_UNIPHIER is not set
|
||||
# CONFIG_ARCH_ZX is not set
|
||||
# CONFIG_SOC_BRCMSTB is not set
|
||||
|
||||
# errata
|
||||
# v5/v6
|
||||
# CONFIG_ARM_ERRATA_326103 is not set
|
||||
# CONFIG_ARM_ERRATA_411920 is not set
|
||||
# Cortex-A8
|
||||
CONFIG_ARM_ERRATA_430973=y
|
||||
# The following two don't work with MP
|
||||
# CONFIG_ARM_ERRATA_458693 is not set
|
||||
# CONFIG_ARM_ERRATA_460075 is not set
|
||||
# Cortex-A9
|
||||
CONFIG_ARM_ERRATA_643719=y
|
||||
CONFIG_ARM_ERRATA_720789=y
|
||||
CONFIG_ARM_ERRATA_742230=y
|
||||
CONFIG_ARM_ERRATA_742231=y
|
||||
CONFIG_ARM_ERRATA_743622=y
|
||||
CONFIG_ARM_ERRATA_751472=y
|
||||
CONFIG_ARM_ERRATA_754322=y
|
||||
CONFIG_ARM_ERRATA_754327=y
|
||||
CONFIG_ARM_ERRATA_764369=y
|
||||
CONFIG_ARM_ERRATA_775420=y
|
||||
# Disabled due to causing highbank to crash
|
||||
# CONFIG_PL310_ERRATA_588369 is not set
|
||||
# CONFIG_PL310_ERRATA_727915 is not set
|
||||
CONFIG_PL310_ERRATA_753970=y
|
||||
CONFIG_PL310_ERRATA_769419=y
|
||||
CONFIG_PJ4B_ERRATA_4742=y
|
||||
# Cortex-A12/15/17
|
||||
CONFIG_ARM_ERRATA_798181=y
|
||||
CONFIG_ARM_ERRATA_773022=y
|
||||
CONFIG_ARM_ERRATA_818325_852422=y
|
||||
CONFIG_ARM_ERRATA_821420=y
|
||||
CONFIG_ARM_ERRATA_825619=y
|
||||
CONFIG_ARM_ERRATA_852421=y
|
||||
CONFIG_ARM_ERRATA_852423=y
|
||||
|
||||
# generic that deviates from or should be merged into config-generic
|
||||
CONFIG_SMP_ON_UP=y
|
||||
CONFIG_HIGHMEM=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_ARM_MODULE_PLTS is not set
|
||||
|
||||
CONFIG_RCU_FANOUT=32
|
||||
|
||||
# Dynamic Voltage and Frequency Scaling
|
||||
CONFIG_PM_DEVFREQ=y
|
||||
CONFIG_PM_DEVFREQ_EVENT=y
|
||||
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
CONFIG_DEVFREQ_GOV_USERSPACE=y
|
||||
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
|
||||
CONFIG_LSM_MMAP_MIN_ADDR=32768
|
||||
|
||||
# CONFIG_PCI_LAYERSCAPE is not set
|
||||
|
||||
# Do NOT enable this, it breaks stuff and makes things go slow
|
||||
# CONFIG_UACCESS_WITH_MEMCPY is not set
|
||||
|
||||
CONFIG_LBDAF=y
|
||||
|
||||
# Little.BIG
|
||||
CONFIG_BIG_LITTLE=y
|
||||
CONFIG_BL_SWITCHER=y
|
||||
CONFIG_ARM_BIG_LITTLE_CPUFREQ=m
|
||||
CONFIG_ARM_SCPI_CPUFREQ=m
|
||||
CONFIG_ARCH_VEXPRESS_DCSCB=y
|
||||
CONFIG_ARCH_VEXPRESS_TC2_PM=y
|
||||
CONFIG_ARM_VEXPRESS_SPC_CPUFREQ=m
|
||||
CONFIG_ARM_BIG_LITTLE_CPUIDLE=y
|
||||
# CONFIG_BL_SWITCHER_DUMMY_IF is not set
|
||||
|
||||
# GRR, needed for MFD_AS3722
|
||||
CONFIG_I2C=y
|
||||
|
||||
# Device tree
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_ARM_ATAG_DTB_COMPAT=y
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
|
||||
# General vexpress ARM drivers
|
||||
CONFIG_SERIO_AMBAKMI=m
|
||||
CONFIG_SERIAL_AMBA_PL010=y
|
||||
CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
|
||||
|
||||
CONFIG_RTC_DRV_PL030=y
|
||||
CONFIG_AMBA_PL08X=y
|
||||
CONFIG_SND_ARMAACI=m
|
||||
|
||||
# highbank
|
||||
CONFIG_EDAC_HIGHBANK_MC=m
|
||||
CONFIG_EDAC_HIGHBANK_L2=m
|
||||
CONFIG_SATA_HIGHBANK=m
|
||||
CONFIG_ARM_HIGHBANK_CPUFREQ=m
|
||||
# CONFIG_ARM_HIGHBANK_CPUIDLE is not set
|
||||
CONFIG_PL320_MBOX=y
|
||||
CONFIG_VFIO_PLATFORM_CALXEDAXGMAC_RESET=m
|
||||
|
||||
# AllWinner
|
||||
# CONFIG_MACH_SUN4I is not set
|
||||
# CONFIG_MACH_SUN5I is not set
|
||||
CONFIG_MACH_SUN6I=y
|
||||
CONFIG_MACH_SUN7I=y
|
||||
CONFIG_MACH_SUN8I=y
|
||||
CONFIG_MACH_SUN9I=y
|
||||
CONFIG_SUNXI_CCU=y
|
||||
CONFIG_SUN8I_H3_CCU=y
|
||||
CONFIG_SUNXI_SRAM=y
|
||||
CONFIG_DMA_SUN4I=m
|
||||
CONFIG_DMA_SUN6I=m
|
||||
CONFIG_DRM_SUN4I=m
|
||||
CONFIG_SUNXI_WATCHDOG=m
|
||||
CONFIG_NET_VENDOR_ALLWINNER=y
|
||||
CONFIG_RTC_DRV_SUNXI=m
|
||||
CONFIG_PHY_SUN4I_USB=m
|
||||
CONFIG_PHY_SUN9I_USB=m
|
||||
CONFIG_AHCI_SUNXI=m
|
||||
CONFIG_SPI_SUN4I=m
|
||||
CONFIG_SPI_SUN6I=m
|
||||
CONFIG_MMC_SUNXI=m
|
||||
CONFIG_I2C_SUN6I_P2WI=m
|
||||
CONFIG_GPIO_PCF857X=m
|
||||
CONFIG_TOUCHSCREEN_SUN4I=m
|
||||
CONFIG_MFD_AXP20X=y
|
||||
CONFIG_MFD_AXP20X_I2C=y
|
||||
CONFIG_MFD_AXP20X_RSB=y
|
||||
CONFIG_AXP20X_POWER=m
|
||||
CONFIG_INPUT_AXP20X_PEK=m
|
||||
CONFIG_REGULATOR_AXP20X=y
|
||||
CONFIG_AXP288_FUEL_GAUGE=m
|
||||
CONFIG_AXP288_ADC=m
|
||||
CONFIG_EXTCON_AXP288=m
|
||||
CONFIG_AXP288_CHARGER=m
|
||||
CONFIG_TOUCHSCREEN_CHIPONE_ICN8318=m
|
||||
CONFIG_IR_SUNXI=m
|
||||
CONFIG_MDIO_SUN4I=m
|
||||
CONFIG_DWMAC_SUNXI=m
|
||||
CONFIG_SUN4I_EMAC=m
|
||||
CONFIG_SUN8I_EMAC=m
|
||||
CONFIG_RTC_DRV_SUN6I=m
|
||||
CONFIG_MTD_NAND_SUNXI=m
|
||||
CONFIG_SERIO_SUN4I_PS2=m
|
||||
CONFIG_KEYBOARD_SUN4I_LRADC=m
|
||||
CONFIG_PWM_SUN4I=y
|
||||
CONFIG_CAN_SUN4I=m
|
||||
CONFIG_USB_MUSB_SUNXI=m
|
||||
CONFIG_CRYPTO_DEV_SUN4I_SS=m
|
||||
CONFIG_SND_SUN4I_CODEC=m
|
||||
CONFIG_SND_SUN4I_SPDIF=m
|
||||
CONFIG_SND_SUN4I_I2S=m
|
||||
CONFIG_SUNXI_RSB=y
|
||||
CONFIG_NVMEM_SUNXI_SID=m
|
||||
|
||||
# Exynos
|
||||
CONFIG_ARCH_EXYNOS3=y
|
||||
# CONFIG_ARCH_EXYNOS4 is not set
|
||||
CONFIG_ARCH_EXYNOS5=y
|
||||
CONFIG_SOC_EXYNOS3250=y
|
||||
CONFIG_SOC_EXYNOS5250=y
|
||||
CONFIG_SOC_EXYNOS5420=y
|
||||
CONFIG_SOC_EXYNOS5440=y
|
||||
CONFIG_SOC_EXYNOS5260=y
|
||||
CONFIG_SOC_EXYNOS5410=y
|
||||
CONFIG_SOC_EXYNOS5800=y
|
||||
CONFIG_SERIAL_SAMSUNG=y
|
||||
CONFIG_SERIAL_SAMSUNG_CONSOLE=y
|
||||
CONFIG_ARM_EXYNOS5440_CPUFREQ=m
|
||||
CONFIG_ARM_EXYNOS_CPUIDLE=y
|
||||
CONFIG_EXYNOS5420_MCPM=y
|
||||
CONFIG_ARM_EXYNOS5_BUS_DEVFREQ=m
|
||||
# CONFIG_ARM_EXYNOS_BUS_DEVFREQ is not set
|
||||
# CONFIG_EXYNOS5420_MCPM not set
|
||||
CONFIG_DEVFREQ_EVENT_EXYNOS_PPMU=y
|
||||
# CONFIG_DEVFREQ_EVENT_EXYNOS_NOCP is not set
|
||||
|
||||
CONFIG_I2C_EXYNOS5=m
|
||||
CONFIG_I2C_S3C2410=m
|
||||
CONFIG_SPI_S3C64XX=m
|
||||
CONFIG_EXYNOS_THERMAL=m
|
||||
CONFIG_EXYNOS_ADC=m
|
||||
CONFIG_MMC_SDHCI_S3C=m
|
||||
CONFIG_MMC_SDHCI_S3C_DMA=y
|
||||
CONFIG_MMC_DW_EXYNOS=y
|
||||
# CONFIG_EXYNOS_IOMMU is not set
|
||||
CONFIG_PCI_EXYNOS=y
|
||||
CONFIG_PHY_EXYNOS5_USBDRD=m
|
||||
CONFIG_SAMSUNG_USBPHY=m
|
||||
CONFIG_PHY_SAMSUNG_USB2=m
|
||||
CONFIG_USB_EHCI_EXYNOS=m
|
||||
CONFIG_USB_OHCI_EXYNOS=m
|
||||
CONFIG_USB_DWC3_EXYNOS=m
|
||||
CONFIG_PHY_EXYNOS5250_SATA=m
|
||||
CONFIG_HW_RANDOM_EXYNOS=m
|
||||
CONFIG_CRYPTO_DEV_S5P=m
|
||||
CONFIG_PWM_SAMSUNG=m
|
||||
CONFIG_S3C2410_WATCHDOG=m
|
||||
CONFIG_MFD_SEC_CORE=y
|
||||
CONFIG_REGULATOR_S2MPS11=m
|
||||
CONFIG_REGULATOR_S5M8767=m
|
||||
CONFIG_TCG_TIS_I2C_INFINEON=m
|
||||
CONFIG_RTC_DRV_S5M=m
|
||||
CONFIG_RTC_DRV_S3C=m
|
||||
CONFIG_MFD_WM8994=m
|
||||
CONFIG_GPIO_WM8994=m
|
||||
CONFIG_REGULATOR_WM8994=m
|
||||
|
||||
CONFIG_EXYNOS_VIDEO=y
|
||||
CONFIG_EXYNOS_MIPI_DSI=y
|
||||
CONFIG_DRM_EXYNOS=m
|
||||
CONFIG_DRM_EXYNOS_DP=y
|
||||
CONFIG_DRM_EXYNOS_DPI=y
|
||||
CONFIG_DRM_EXYNOS_DSI=y
|
||||
CONFIG_DRM_EXYNOS_FIMC=y
|
||||
CONFIG_DRM_EXYNOS_FIMD=y
|
||||
CONFIG_DRM_EXYNOS5433_DECON=y
|
||||
CONFIG_DRM_EXYNOS_MIC=y
|
||||
CONFIG_DRM_EXYNOS7_DECON=y
|
||||
CONFIG_DRM_EXYNOS_G2D=y
|
||||
CONFIG_DRM_EXYNOS_GSC=y
|
||||
CONFIG_DRM_EXYNOS_HDMI=y
|
||||
# CONFIG_DRM_EXYNOS_IOMMU is not set
|
||||
CONFIG_DRM_EXYNOS_IPP=y
|
||||
CONFIG_DRM_EXYNOS_ROTATOR=y
|
||||
CONFIG_DRM_EXYNOS_VIDI=y
|
||||
CONFIG_DRM_EXYNOS_MIXER=y
|
||||
CONFIG_PHY_EXYNOS_DP_VIDEO=m
|
||||
CONFIG_PHY_EXYNOS_MIPI_VIDEO=m
|
||||
# CONFIG_FB_S3C is not set
|
||||
CONFIG_VIDEO_SAMSUNG_EXYNOS4_IS=y
|
||||
CONFIG_VIDEO_EXYNOS_FIMC_LITE=m
|
||||
CONFIG_VIDEO_EXYNOS4_FIMC_IS=m
|
||||
CONFIG_VIDEO_EXYNOS4_ISP_DMA_CAPTURE=y
|
||||
CONFIG_VIDEO_S5P_FIMC=m
|
||||
CONFIG_VIDEO_S5P_MIPI_CSIS=m
|
||||
CONFIG_VIDEO_SAMSUNG_S5P_G2D=m
|
||||
CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m
|
||||
CONFIG_VIDEO_SAMSUNG_S5P_MFC=m
|
||||
# CONFIG_VIDEO_SAMSUNG_S5P_TV is not set
|
||||
CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC=m
|
||||
|
||||
CONFIG_SND_SOC_SAMSUNG=m
|
||||
CONFIG_SND_SOC_SAMSUNG_SMDK_SPDIF=m
|
||||
CONFIG_SND_SOC_SAMSUNG_SMDK_WM8994=m
|
||||
CONFIG_SND_SOC_SMDK_WM8994_PCM=m
|
||||
CONFIG_SND_SOC_SNOW=m
|
||||
CONFIG_SND_SOC_MAX98090=m
|
||||
CONFIG_SND_SOC_MAX98095=m
|
||||
CONFIG_SND_SAMSUNG_I2S=m
|
||||
CONFIG_SND_SOC_ODROIDX2=m
|
||||
CONFIG_EXYNOS_AUDSS_CLK_CON=m
|
||||
# CONFIG_EXYNOS_IOMMU_DEBUG is not set
|
||||
# CONFIG_SAMSUNG_PM_DEBUG is not set
|
||||
# CONFIG_SAMSUNG_PM_CHECK is not set
|
||||
|
||||
# Arndale/Origen
|
||||
CONFIG_MFD_MAX8997=y
|
||||
CONFIG_MFD_MAX77686=y
|
||||
CONFIG_REGULATOR_MAX8997=m
|
||||
CONFIG_REGULATOR_MAX77686=m
|
||||
CONFIG_REGULATOR_S2MPA01=m
|
||||
CONFIG_REGULATOR_S5M8767=m
|
||||
CONFIG_COMMON_CLK_MAX77686=m
|
||||
CONFIG_COMMON_CLK_MAX77802=m
|
||||
CONFIG_COMMON_CLK_S2MPS11=m
|
||||
CONFIG_INPUT_MAX8997_HAPTIC=m
|
||||
CONFIG_CHARGER_MAX8997=m
|
||||
CONFIG_LEDS_MAX8997=m
|
||||
CONFIG_RTC_DRV_MAX8997=m
|
||||
CONFIG_EXTCON_MAX8997=m
|
||||
CONFIG_SND_SOC_ARNDALE_RT5631_ALC5631=m
|
||||
CONFIG_SND_SOC_RT5631=m
|
||||
|
||||
# Tegra
|
||||
CONFIG_ARCH_TEGRA_114_SOC=y
|
||||
CONFIG_ARCH_TEGRA_124_SOC=y
|
||||
CONFIG_SND_SOC_TEGRA=m
|
||||
CONFIG_SND_SOC_TEGRA30_AHUB=m
|
||||
CONFIG_SND_SOC_TEGRA30_I2S=m
|
||||
CONFIG_SND_SOC_TEGRA_MAX98090=m
|
||||
CONFIG_SND_SOC_TEGRA_RT5640=m
|
||||
CONFIG_SND_SOC_TEGRA_RT5677=m
|
||||
CONFIG_AD525X_DPOT=m
|
||||
CONFIG_AD525X_DPOT_I2C=m
|
||||
CONFIG_AD525X_DPOT_SPI=m
|
||||
|
||||
# Jetson TK1
|
||||
CONFIG_PINCTRL_AS3722=y
|
||||
CONFIG_POWER_RESET_AS3722=y
|
||||
CONFIG_MFD_AS3722=y
|
||||
CONFIG_REGULATOR_AS3722=m
|
||||
CONFIG_RTC_DRV_AS3722=y
|
||||
|
||||
# TI Generic
|
||||
CONFIG_TI_SOC_THERMAL=m
|
||||
CONFIG_TI_THERMAL=y
|
||||
# CONFIG_OMAP3_THERMAL is not set
|
||||
CONFIG_MMC_OMAP_HS=m
|
||||
|
||||
# mvebu
|
||||
CONFIG_MACH_ARMADA_370=y
|
||||
CONFIG_MACH_ARMADA_375=y
|
||||
CONFIG_MACH_ARMADA_38X=y
|
||||
CONFIG_MACH_ARMADA_39X=y
|
||||
CONFIG_MACH_ARMADA_XP=y
|
||||
CONFIG_MACH_DOVE=y
|
||||
|
||||
CONFIG_CACHE_TAUROS2=y
|
||||
CONFIG_PINCTRL_ARMADA_370=y
|
||||
CONFIG_PINCTRL_ARMADA_XP=y
|
||||
CONFIG_ARM_MVEBU_V7_CPUIDLE=y
|
||||
CONFIG_PINCTRL_DOVE=y
|
||||
CONFIG_MMC_SDHCI_DOVE=m
|
||||
CONFIG_DOVE_THERMAL=m
|
||||
CONFIG_DRM_ARMADA=m
|
||||
CONFIG_ORION_WATCHDOG=m
|
||||
CONFIG_SND_KIRKWOOD_SOC=m
|
||||
CONFIG_SND_KIRKWOOD_SOC_ARMADA370_DB=m
|
||||
CONFIG_USB_EHCI_HCD_ORION=m
|
||||
CONFIG_MVPP2=m
|
||||
CONFIG_COMMON_CLK_SI5351=m
|
||||
CONFIG_RTC_DRV_ARMADA38X=m
|
||||
CONFIG_I2C_PXA=m
|
||||
# CONFIG_CACHE_FEROCEON_L2 is not set
|
||||
# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
|
||||
CONFIG_LEDS_NS2=m
|
||||
CONFIG_LEDS_PCA963X=m
|
||||
# CONFIG_PCIE_ARMADA_8K is not set
|
||||
|
||||
# DRM panels
|
||||
CONFIG_DRM_PANEL=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=m
|
||||
CONFIG_DRM_PANEL_SHARP_LQ101R1SX01=m
|
||||
CONFIG_DRM_PANEL_SHARP_LS043T1LE01=m
|
||||
CONFIG_DRM_PANEL_LG_LG4573=m
|
||||
CONFIG_DRM_PANEL_SAMSUNG_LD9040=m
|
||||
CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=m
|
||||
CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=m
|
||||
CONFIG_DRM_DW_HDMI=m
|
||||
CONFIG_DRM_DW_HDMI_AHB_AUDIO=m
|
||||
|
||||
# regmap
|
||||
CONFIG_REGMAP_SPI=m
|
||||
CONFIG_REGMAP_MMIO=m
|
||||
CONFIG_REGMAP_IRQ=y
|
||||
|
||||
# usb net
|
||||
CONFIG_AX88796=m
|
||||
CONFIG_AX88796_93CX6=y
|
||||
|
||||
# Multifunction Devices
|
||||
CONFIG_MFD_TPS65090=y
|
||||
CONFIG_MFD_TPS65910=y
|
||||
CONFIG_MFD_TPS65912=y
|
||||
CONFIG_MFD_TPS65912_I2C=y
|
||||
CONFIG_MFD_TPS65912_SPI=y
|
||||
# CONFIG_MFD_DA9052_SPI is not set
|
||||
# CONFIG_MFD_ARIZONA_SPI is not set
|
||||
# CONFIG_MFD_WM831X_SPI is not set
|
||||
# CONFIG_MFD_MC13XXX_SPI is not set
|
||||
# CONFIG_MFD_PM8921_CORE is not set
|
||||
# CONFIG_MFD_DA9052_I2C is not set
|
||||
# CONFIG_MFD_DA9055 is not set
|
||||
# CONFIG_MFD_88PM800 is not set
|
||||
# CONFIG_MFD_88PM805 is not set
|
||||
# CONFIG_MFD_PALMAS is not set
|
||||
# CONFIG_MFD_TPS80031 is not set
|
||||
# CONFIG_TWL4030_CORE is not set
|
||||
# CONFIG_TWL6040_CORE is not set
|
||||
#
|
||||
|
||||
# Pin stuff
|
||||
# CONFIG_PINCTRL_AMD is not set
|
||||
# CONFIG_PINCTRL_SAMSUNG is not set
|
||||
# CONFIG_PINCTRL_MSM8X74 is not set
|
||||
# CONFIG_PINCTRL_BCM281XX is not set
|
||||
# CONFIG_PINCTRL_APQ8064 is not set
|
||||
# CONFIG_PINCTRL_APQ8084 is not set
|
||||
# CONFIG_PINCTRL_MSM8960 is not set
|
||||
# CONFIG_PINCTRL_MSM8660 is not set
|
||||
# CONFIG_PINCTRL_MDM9615 is not set
|
||||
# CONFIG_PINCTRL_MSM8996 is not set
|
||||
|
||||
# GPIO
|
||||
# CONFIG_GPIO_EM is not set
|
||||
CONFIG_GPIO_74X164=m
|
||||
CONFIG_GPIO_MAX7301=m
|
||||
CONFIG_GPIO_MC33880=m
|
||||
CONFIG_GPIO_TPS65910=y
|
||||
CONFIG_GPIO_TPS65912=m
|
||||
# CONFIG_GPIO_ZEVIO is not set
|
||||
CONFIG_LEDS_GPIO=m
|
||||
CONFIG_LEDS_GPIO_REGISTER=y
|
||||
CONFIG_MDIO_BUS_MUX=m
|
||||
CONFIG_MDIO_BUS_MUX_GPIO=m
|
||||
CONFIG_MDIO_BUS_MUX_MMIOREG=m
|
||||
CONFIG_INPUT_GPIO=m
|
||||
CONFIG_INPUT_GPIO_BEEPER=m
|
||||
CONFIG_INPUT_GPIO_TILT_POLLED=m
|
||||
CONFIG_INPUT_MATRIXKMAP=m
|
||||
CONFIG_KEYBOARD_MATRIX=m
|
||||
# CONFIG_GPIO_RCAR is not set
|
||||
CONFIG_W1_MASTER_GPIO=m
|
||||
|
||||
# HW crypto and rng
|
||||
# CONFIG_CRYPTO_SHA1_ARM_CE is not set
|
||||
# CONFIG_CRYPTO_SHA2_ARM_CE is not set
|
||||
# CONFIG_CRYPTO_AES_ARM_CE is not set
|
||||
# CONFIG_CRYPTO_GHASH_ARM_CE is not set
|
||||
|
||||
# DMA
|
||||
CONFIG_TI_EDMA=y
|
||||
|
||||
# MTD
|
||||
# CONFIG_MG_DISK is not set
|
||||
CONFIG_MTD_DATAFLASH=m
|
||||
CONFIG_MTD_DATAFLASH_WRITE_VERIFY=y
|
||||
CONFIG_MTD_DATAFLASH_OTP=y
|
||||
CONFIG_MTD_M25P80=m
|
||||
CONFIG_MTD_NAND=m
|
||||
CONFIG_MTD_NAND_CAFE=m
|
||||
# CONFIG_MTD_NAND_DENALI is not set
|
||||
CONFIG_MTD_NAND_DOCG4=m
|
||||
CONFIG_MTD_NAND_ECC_SMC=y
|
||||
CONFIG_MTD_NAND_FSMC=m
|
||||
CONFIG_MTD_NAND_GPIO=m
|
||||
CONFIG_MTD_NAND_MXC=m
|
||||
CONFIG_MTD_NAND_NANDSIM=m
|
||||
CONFIG_MTD_NAND_ORION=m
|
||||
CONFIG_MTD_NAND_PLATFORM=m
|
||||
CONFIG_MTD_NAND_PXA3xx=m
|
||||
CONFIG_MTD_NAND_RICOH=m
|
||||
CONFIG_MTD_NAND_TMIO=m
|
||||
# CONFIG_MTD_NAND_BRCMNAND is not set
|
||||
# CONFIG_MTD_NAND_MTK is not set
|
||||
# CONFIG_MTD_MT81xx_NOR is not set
|
||||
CONFIG_MTD_SPI_NOR=m
|
||||
# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
|
||||
CONFIG_MTD_SPINAND_MT29F=m
|
||||
CONFIG_MTD_SPINAND_ONDIEECC=y
|
||||
CONFIG_MTD_SST25L=m
|
||||
CONFIG_MTD_ST_SPI_FSM=m
|
||||
CONFIG_EEPROM_AT25=m
|
||||
CONFIG_EEPROM_93XX46=m
|
||||
|
||||
# Sound
|
||||
CONFIG_SND_ARM=y
|
||||
CONFIG_SND_SOC_AC97_BUS=y
|
||||
CONFIG_SND_SOC_AC97_CODEC=y
|
||||
|
||||
# RTC
|
||||
CONFIG_RTC_DRV_DS1305=m
|
||||
CONFIG_RTC_DRV_DS1390=m
|
||||
CONFIG_RTC_DRV_M41T93=m
|
||||
CONFIG_RTC_DRV_M41T94=m
|
||||
CONFIG_RTC_DRV_MAX6902=m
|
||||
CONFIG_RTC_DRV_R9701=m
|
||||
CONFIG_RTC_DRV_RS5C348=m
|
||||
CONFIG_RTC_DRV_RX4581=m
|
||||
CONFIG_RTC_DRV_TPS65910=m
|
||||
CONFIG_RTC_DRV_TPS80031=m
|
||||
# CONFIG_RTC_DRV_DS1347 is not set
|
||||
# CONFIG_RTC_DRV_DS1343 is not set
|
||||
# CONFIG_RTC_DRV_MCP795 is not set
|
||||
|
||||
# Regulators
|
||||
# CONFIG_REGULATOR_ACT8865 is not set
|
||||
CONFIG_REGULATOR_AD5398=m
|
||||
CONFIG_REGULATOR_DA9210=m
|
||||
CONFIG_REGULATOR_FAN53555=m
|
||||
CONFIG_REGULATOR_ISL6271A=m
|
||||
CONFIG_REGULATOR_LP3971=m
|
||||
CONFIG_REGULATOR_LP3972=m
|
||||
CONFIG_REGULATOR_LP872X=m
|
||||
CONFIG_REGULATOR_LP8755=m
|
||||
CONFIG_REGULATOR_MAX1586=m
|
||||
CONFIG_REGULATOR_MAX8649=m
|
||||
CONFIG_REGULATOR_MAX8660=m
|
||||
CONFIG_REGULATOR_MAX8952=m
|
||||
CONFIG_REGULATOR_MAX8973=m
|
||||
CONFIG_REGULATOR_PFUZE100=m
|
||||
CONFIG_REGULATOR_PV88060=m
|
||||
CONFIG_REGULATOR_PV88090=m
|
||||
CONFIG_REGULATOR_TPS51632=m
|
||||
CONFIG_REGULATOR_TPS62360=m
|
||||
CONFIG_REGULATOR_TPS65023=m
|
||||
CONFIG_REGULATOR_TPS6507X=m
|
||||
CONFIG_REGULATOR_TPS65090=m
|
||||
CONFIG_REGULATOR_TPS65217=m
|
||||
CONFIG_REGULATOR_TPS6524X=m
|
||||
CONFIG_REGULATOR_TPS6586X=m
|
||||
CONFIG_REGULATOR_TPS65910=m
|
||||
CONFIG_REGULATOR_TPS65912=m
|
||||
CONFIG_REGULATOR_TPS80031=m
|
||||
CONFIG_REGULATOR_LTC3589=m
|
||||
CONFIG_REGULATOR_ANATOP=m
|
||||
CONFIG_REGULATOR_DA9211=m
|
||||
CONFIG_REGULATOR_ISL9305=m
|
||||
CONFIG_REGULATOR_MAX77802=m
|
||||
# CONFIG_REGULATOR_MT6311 is not set
|
||||
# CONFIG_REGULATOR_PV88080 is not set
|
||||
CONFIG_SENSORS_LTC2978_REGULATOR=y
|
||||
|
||||
CONFIG_POWER_AVS=y
|
||||
CONFIG_CHARGER_MANAGER=y
|
||||
CONFIG_CHARGER_BQ2415X=m
|
||||
CONFIG_CHARGER_BQ24190=m
|
||||
CONFIG_CHARGER_BQ24735=m
|
||||
CONFIG_CHARGER_GPIO=m
|
||||
CONFIG_CHARGER_TPS65090=m
|
||||
CONFIG_PDA_POWER=m
|
||||
CONFIG_GENERIC_ADC_BATTERY=m
|
||||
CONFIG_BATTERY_SBS=m
|
||||
|
||||
# Sensors
|
||||
CONFIG_SENSORS_AD7314=m
|
||||
CONFIG_SENSORS_ADCXX=m
|
||||
CONFIG_SENSORS_ADS7871=m
|
||||
CONFIG_SENSORS_BH1780=m
|
||||
CONFIG_SENSORS_GPIO_FAN=m
|
||||
CONFIG_SENSORS_ISL29018=m
|
||||
CONFIG_SENSORS_ISL29028=m
|
||||
CONFIG_SENSORS_LIS3_SPI=m
|
||||
CONFIG_SENSORS_LM70=m
|
||||
CONFIG_SENSORS_MAX1111=m
|
||||
CONFIG_MPL115=m
|
||||
CONFIG_MPL3115=m
|
||||
CONFIG_SI7005=m
|
||||
CONFIG_SI7020=m
|
||||
|
||||
CONFIG_LCD_L4F00242T03=m
|
||||
CONFIG_LCD_LMS283GF05=m
|
||||
CONFIG_LCD_LTV350QV=m
|
||||
CONFIG_LCD_ILI922X=m
|
||||
CONFIG_LCD_ILI9320=m
|
||||
CONFIG_LCD_TDO24M=m
|
||||
CONFIG_LCD_VGG2432A4=m
|
||||
CONFIG_LCD_S6E63M0=m
|
||||
CONFIG_LCD_LD9040=m
|
||||
CONFIG_LCD_AMS369FG06=m
|
||||
CONFIG_LCD_LMS501KF03=m
|
||||
CONFIG_LCD_HX8357=m
|
||||
|
||||
# Input
|
||||
CONFIG_INPUT_GP2A=m
|
||||
CONFIG_INPUT_ARIZONA_HAPTICS=m
|
||||
CONFIG_INPUT_MC13783_PWRBUTTON=m
|
||||
|
||||
CONFIG_TOUCHSCREEN_ADS7846=m
|
||||
CONFIG_TOUCHSCREEN_AD7877=m
|
||||
CONFIG_TOUCHSCREEN_MC13783=m
|
||||
CONFIG_TOUCHSCREEN_TSC2005=m
|
||||
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_DAC124S085=m
|
||||
CONFIG_LEDS_PWM=m
|
||||
CONFIG_LEDS_SYSCON=y
|
||||
CONFIG_BMP085_SPI=m
|
||||
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_GPIO_SYSCON=m
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
|
||||
CONFIG_SRAM=y
|
||||
|
||||
# Ethernet
|
||||
CONFIG_KS8851=m
|
||||
CONFIG_KS8851_MLL=m
|
||||
CONFIG_ENC28J60=m
|
||||
CONFIG_LIBERTAS_SPI=m
|
||||
CONFIG_P54_SPI=m
|
||||
CONFIG_P54_SPI_DEFAULT_EEPROM=n
|
||||
CONFIG_MICREL_KS8995MA=m
|
||||
CONFIG_IEEE802154_MRF24J40=m
|
||||
|
||||
CONFIG_ARM_KPROBES_TEST=m
|
||||
|
||||
# jffs2
|
||||
CONFIG_JFFS2_FS=m
|
||||
CONFIG_JFFS2_FS_DEBUG=0
|
||||
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
|
||||
# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
|
||||
CONFIG_JFFS2_FS_POSIX_ACL=y
|
||||
CONFIG_JFFS2_FS_SECURITY=y
|
||||
CONFIG_JFFS2_FS_WRITEBUFFER=y
|
||||
CONFIG_JFFS2_FS_XATTR=y
|
||||
CONFIG_JFFS2_LZO=y
|
||||
CONFIG_JFFS2_RTIME=y
|
||||
CONFIG_JFFS2_RUBIN=y
|
||||
CONFIG_JFFS2_SUMMARY=y
|
||||
CONFIG_JFFS2_ZLIB=y
|
||||
|
||||
CONFIG_UBIFS_FS=m
|
||||
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
|
||||
CONFIG_UBIFS_FS_LZO=y
|
||||
CONFIG_UBIFS_FS_ZLIB=y
|
||||
|
||||
# Chromebook
|
||||
CONFIG_MFD_CROS_EC=m
|
||||
CONFIG_MFD_CROS_EC_I2C=m
|
||||
CONFIG_MFD_CROS_EC_SPI=m
|
||||
CONFIG_KEYBOARD_CROS_EC=m
|
||||
CONFIG_I2C_CROS_EC_TUNNEL=m
|
||||
CONFIG_SND_SOC_TS3A227E=m
|
||||
CONFIG_CROS_EC_CHARDEV=m
|
||||
CONFIG_CROS_EC_PROTO=y
|
||||
CONFIG_PWM_CROS_EC=m
|
||||
|
||||
# This newly introduced mess needs to be fixed upstream :-(
|
||||
CONFIG_STMMAC_PLATFORM=m
|
||||
CONFIG_DWMAC_GENERIC=m
|
||||
# CONFIG_DWMAC_LPC18XX is not set
|
||||
# CONFIG_DWMAC_MESON is not set
|
||||
# CONFIG_DWMAC_SOCFPGA is not set
|
||||
# CONFIG_DWMAC_STI is not set
|
||||
|
||||
CONFIG_R8188EU=m
|
||||
|
||||
# CONFIG_88EU_AP_MODE is not set
|
||||
|
||||
# CAN drivers
|
||||
# CONFIG_CAN_TI_HECC is not set
|
||||
# CONFIG_CAN_FLEXCAN is not set
|
||||
# CONFIG_CAN_RCAR is not set
|
||||
# CONFIG_CAN_RCAR_CANFD is not set
|
||||
|
||||
# Needs work/investigation
|
||||
# CONFIG_ARM_KPROBES_TEST is not set
|
||||
|
||||
# HW Enabled in armv7 not lpae
|
||||
# CONFIG_DRM_TILCDC is not set
|
||||
# CONFIG_DRM_IMX is not set
|
||||
# CONFIG_DRM_STI is not set
|
||||
# CONFIG_DRM_FSL_DCU is not set
|
||||
# CONFIG_AHCI_IMX is not set
|
||||
# CONFIG_IMX_THERMAL is not set
|
||||
# CONFIG_TI_DAC7512 is not set
|
||||
|
||||
# Not needed on ARMv7
|
||||
# CONFIG_PATA_PLATFORM is not set
|
||||
# CONFIG_NET_VENDOR_CIRRUS is not set
|
||||
# CONFIG_NET_VENDOR_MICROCHIP is not set
|
||||
# CONFIG_MFD_T7L66XB is not set
|
||||
# CONFIG_MFD_TC6387XB is not set
|
||||
# CONFIG_EZX_PCAP is not set
|
||||
# CONFIG_CS89x0 is not set
|
||||
# CONFIG_DM9000 is not set
|
||||
# CONFIG_MTD_AFS_PARTS is not set
|
||||
# CONFIG_SPI_PXA2XX is not set
|
||||
# CONFIG_SPI_CADENCE_QUADSPI is not set
|
||||
# CONFIG_DEPRECATED_PARAM_STRUCT is not set
|
||||
# CONFIG_LATTICE_ECP3_CONFIG is not set
|
||||
# CONFIG_SERIAL_8250_EM is not set
|
||||
# CONFIG_SERIAL_MAX3100 is not set
|
||||
# CONFIG_SERIAL_MAX310X is not set
|
||||
# CONFIG_SERIAL_IFX6X60 is not set
|
||||
# CONFIG_SERIAL_BCM63XX is not set
|
||||
# CONFIG_SERIAL_STM32 is not set
|
||||
# CONFIG_SERIAL_MPS2_UART is not set
|
||||
# CONFIG_FB_XILINX is not set
|
||||
# CONFIG_BRCMSTB_GISB_ARB is not set
|
||||
# CONFIG_SUNGEM is not set
|
||||
# CONFIG_FB_SAVAGE is not set
|
||||
# CONFIG_FB_RADEON is not set
|
||||
# CONFIG_ATM_HE is not set
|
||||
# CONFIG_SCSI_ACARD is not set
|
||||
# CONFIG_SFC is not set
|
||||
# CONFIG_SND_ALI5451 is not set
|
||||
# CONFIG_POWER_RESET_QNAP is not set
|
||||
# CONFIG_MMC_TMIO is not set
|
||||
# CONFIG_PINCTRL_IMX35 is not set
|
||||
# CONFIG_DVB_USB_PCTV452E is not set
|
||||
|
||||
# CONFIG_MFD_LP8788 is not set
|
||||
# CONFIG_MFD_MAX77693 is not set
|
||||
# CONFIG_MFD_MAX14577 is not set
|
||||
# CONFIG_MFD_AAT2870_CORE is not set
|
||||
# CONFIG_MFD_RC5T583 is not set
|
||||
# CONFIG_MFD_SMSC is not set
|
||||
# CONFIG_MFD_AS3711 is not set
|
||||
# CONFIG_PMIC_DA903X is not set
|
||||
# CONFIG_PMIC_ADP5520 is not set
|
||||
# CONFIG_INPUT_REGULATOR_HAPTIC is not set
|
||||
# CONFIG_POWER_RESET_BRCMSTB is not set
|
||||
# CONFIG_INPUT_TPS65218_PWRBUTTON is not set
|
||||
# CONFIG_CLK_QORIQ is not set
|
||||
# CONFIG_QORIQ_CPUFREQ is not set
|
||||
# CONFIG_QCOM_SPMI_TEMP_ALARM is not set
|
||||
# CONFIG_SND_SOC_APQ8016_SBC is not set
|
||||
# CONFIG_SND_SOC_TAS571X is not set
|
||||
|
||||
# CONFIG_VFIO_PLATFORM_AMDXGBE_RESET is not set
|
||||
|
||||
# Altera?
|
||||
# CONFIG_PCIE_ALTERA is not set
|
||||
|
||||
# Debug options. We need to deal with them at some point like x86
|
||||
# CONFIG_DEBUG_USER is not set
|
||||
# CONFIG_DMADEVICES_VDEBUG is not set
|
||||
# CONFIG_DMADEVICES_DEBUG is not set
|
||||
# CONFIG_SERIAL_SAMSUNG_DEBUG is not set
|
||||
# CONFIG_OMAP2_DSS_DEBUG is not set
|
||||
# CONFIG_CRYPTO_DEV_UX500_DEBUG is not set
|
||||
# CONFIG_AB8500_DEBUG is not set
|
||||
# CONFIG_DEBUG_LL is not set
|
|
@ -0,0 +1,77 @@
|
|||
# ARM A15 lpae unified arch kernel
|
||||
CONFIG_ARCH_KEYSTONE=y
|
||||
|
||||
# CONFIG_ARCH_MXC is not set
|
||||
# CONFIG_ARCH_OMAP3 is not set
|
||||
# CONFIG_ARCH_OMAP4 is not set
|
||||
# CONFIG_SOC_OMAP5 is not set
|
||||
# CONFIG_SOC_AM33XX is not set
|
||||
# CONFIG_SOC_AM43XX is not set
|
||||
# CONFIG_SOC_DRA7XX is not set
|
||||
# CONFIG_ARCH_ZYNQ is not set
|
||||
# CONFIG_ARCH_AXXIA is not set
|
||||
|
||||
CONFIG_ARM_LPAE=y
|
||||
# CONFIG_CPU_SW_DOMAIN_PAN is not set
|
||||
CONFIG_SYS_SUPPORTS_HUGETLBFS=y
|
||||
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8
|
||||
|
||||
CONFIG_KVM=y
|
||||
CONFIG_KVM_ARM_HOST=y
|
||||
CONFIG_KVM_NEW_VGIC=y
|
||||
|
||||
# CONFIG_XEN is not set
|
||||
CONFIG_XEN_FBDEV_FRONTEND=y
|
||||
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
|
||||
CONFIG_XEN_BLKDEV_FRONTEND=m
|
||||
CONFIG_XEN_BLKDEV_BACKEND=m
|
||||
CONFIG_XEN_NETDEV_FRONTEND=m
|
||||
CONFIG_XEN_NETDEV_BACKEND=m
|
||||
CONFIG_HVC_XEN=y
|
||||
CONFIG_HVC_XEN_FRONTEND=y
|
||||
CONFIG_XEN_DEV_EVTCHN=m
|
||||
CONFIG_XEN_BACKEND=y
|
||||
CONFIG_XENFS=m
|
||||
CONFIG_XEN_COMPAT_XENFS=y
|
||||
CONFIG_XEN_SYS_HYPERVISOR=y
|
||||
CONFIG_XEN_GNTDEV=y
|
||||
CONFIG_XEN_GRANT_DEV_ALLOC=m
|
||||
CONFIG_XEN_WDT=m
|
||||
# CONFIG_XEN_BALLOON is not set
|
||||
|
||||
# TI Keystone
|
||||
CONFIG_KEYSTONE_USB_PHY=m
|
||||
CONFIG_USB_DWC3_KEYSTONE=m
|
||||
CONFIG_GPIO_DAVINCI=y
|
||||
# CONFIG_I2C_DAVINCI is not set
|
||||
CONFIG_TI_AEMIF=m
|
||||
CONFIG_POWER_RESET_KEYSTONE=y
|
||||
CONFIG_DAVINCI_WATCHDOG=m
|
||||
CONFIG_SPI_DAVINCI=m
|
||||
CONFIG_TI_DAVINCI_MDIO=m
|
||||
CONFIG_KEYSTONE_IRQ=m
|
||||
CONFIG_PCI_KEYSTONE=y
|
||||
CONFIG_MTD_NAND_DAVINCI=m
|
||||
CONFIG_GPIO_SYSCON=m
|
||||
CONFIG_TI_MESSAGE_MANAGER=m
|
||||
|
||||
# Tegra (non A15 device options)
|
||||
# CONFIG_ARCH_TEGRA_2x_SOC is not set
|
||||
# CONFIG_ARCH_TEGRA_3x_SOC is not set
|
||||
# CONFIG_TEGRA20_MC is not set
|
||||
# CONFIG_TEGRA_IOMMU_GART is not set
|
||||
# CONFIG_SPI_TEGRA20_SFLASH is not set
|
||||
# CONFIG_SPI_TEGRA20_SLINK is not set
|
||||
# CONFIG_MFD_MAX8907 is not set
|
||||
# CONFIG_SND_SOC_TEGRA_ALC5632 is not set
|
||||
# CONFIG_SND_SOC_TEGRA_TRIMSLICE is not set
|
||||
# CONFIG_SND_SOC_TEGRA_WM8753 is not set
|
||||
# CONFIG_SND_SOC_TEGRA_WM8903 is not set
|
||||
# CONFIG_SND_SOC_TEGRA_WM9712 is not set
|
||||
# CONFIG_SND_SOC_TEGRA20_AC97 is not set
|
||||
# CONFIG_SND_SOC_TEGRA20_DAS is not set
|
||||
# CONFIG_SND_SOC_TEGRA20_SPDIF is not set
|
||||
# CONFIG_DRM_OMAP is not set
|
||||
# CONFIG_AM335X_PHY_USB is not set
|
|
@ -0,0 +1,131 @@
|
|||
CONFIG_SND_VERBOSE_PRINTK=y
|
||||
CONFIG_SND_DEBUG=y
|
||||
CONFIG_SND_PCM_XRUN_DEBUG=y
|
||||
|
||||
CONFIG_DEBUG_ATOMIC_SLEEP=y
|
||||
|
||||
CONFIG_DEBUG_MUTEXES=y
|
||||
CONFIG_DEBUG_RT_MUTEXES=y
|
||||
CONFIG_DEBUG_LOCK_ALLOC=y
|
||||
CONFIG_LOCK_TORTURE_TEST=m
|
||||
CONFIG_PROVE_LOCKING=y
|
||||
CONFIG_DEBUG_SPINLOCK=y
|
||||
CONFIG_PROVE_RCU=y
|
||||
# CONFIG_PROVE_RCU_REPEATEDLY is not set
|
||||
CONFIG_DEBUG_PER_CPU_MAPS=y
|
||||
CONFIG_CPUMASK_OFFSTACK=y
|
||||
|
||||
CONFIG_CPU_NOTIFIER_ERROR_INJECT=m
|
||||
|
||||
CONFIG_FAULT_INJECTION=y
|
||||
CONFIG_FAILSLAB=y
|
||||
CONFIG_FAIL_PAGE_ALLOC=y
|
||||
CONFIG_FAIL_MAKE_REQUEST=y
|
||||
CONFIG_FAULT_INJECTION_DEBUG_FS=y
|
||||
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
|
||||
CONFIG_FAIL_IO_TIMEOUT=y
|
||||
CONFIG_FAIL_MMC_REQUEST=y
|
||||
# CONFIG_F2FS_FAULT_INJECTION is not set
|
||||
|
||||
CONFIG_LOCK_STAT=y
|
||||
|
||||
CONFIG_DEBUG_STACK_USAGE=y
|
||||
|
||||
CONFIG_ACPI_DEBUG=y
|
||||
# CONFIG_ACPI_DEBUGGER is not set
|
||||
CONFIG_DEBUG_SG=y
|
||||
CONFIG_DEBUG_PI_LIST=y
|
||||
|
||||
# CONFIG_PAGE_EXTENSION is not set
|
||||
# CONFIG_PAGE_OWNER is not set
|
||||
# CONFIG_DEBUG_PAGEALLOC is not set
|
||||
|
||||
CONFIG_DEBUG_OBJECTS=y
|
||||
# CONFIG_DEBUG_OBJECTS_SELFTEST is not set
|
||||
CONFIG_DEBUG_OBJECTS_FREE=y
|
||||
CONFIG_DEBUG_OBJECTS_TIMERS=y
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
|
||||
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
|
||||
|
||||
CONFIG_X86_PTDUMP=y
|
||||
CONFIG_ARM64_PTDUMP=y
|
||||
CONFIG_EFI_PGT_DUMP=y
|
||||
|
||||
CONFIG_CAN_DEBUG_DEVICES=y
|
||||
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
|
||||
|
||||
CONFIG_DEBUG_NOTIFIERS=y
|
||||
|
||||
CONFIG_DMA_API_DEBUG=y
|
||||
|
||||
CONFIG_MMIOTRACE=y
|
||||
|
||||
CONFIG_DEBUG_CREDENTIALS=y
|
||||
|
||||
CONFIG_EXT4_DEBUG=y
|
||||
|
||||
CONFIG_XFS_WARN=y
|
||||
|
||||
CONFIG_DEBUG_PERF_USE_VMALLOC=y
|
||||
|
||||
# off in both production debug and nodebug builds,
|
||||
# on in rawhide nodebug builds
|
||||
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
|
||||
|
||||
CONFIG_JBD2_DEBUG=y
|
||||
|
||||
CONFIG_NFSD_FAULT_INJECTION=y
|
||||
|
||||
CONFIG_DEBUG_BLK_CGROUP=y
|
||||
|
||||
CONFIG_DRBD_FAULT_INJECTION=y
|
||||
|
||||
CONFIG_ATH_DEBUG=y
|
||||
CONFIG_CARL9170_DEBUGFS=y
|
||||
CONFIG_IWLWIFI_DEVICE_TRACING=y
|
||||
|
||||
CONFIG_RTLWIFI_DEBUG=y
|
||||
|
||||
CONFIG_DEBUG_OBJECTS_WORK=y
|
||||
|
||||
CONFIG_DMADEVICES_DEBUG=y
|
||||
# CONFIG_DMADEVICES_VDEBUG is not set
|
||||
|
||||
CONFIG_PM_ADVANCED_DEBUG=y
|
||||
|
||||
CONFIG_CEPH_LIB_PRETTYDEBUG=y
|
||||
CONFIG_QUOTA_DEBUG=y
|
||||
|
||||
|
||||
CONFIG_KGDB_KDB=y
|
||||
CONFIG_KDB_KEYBOARD=y
|
||||
CONFIG_KDB_DEFAULT_ENABLE=0x1
|
||||
CONFIG_KDB_CONTINUE_CATASTROPHIC=0
|
||||
|
||||
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
|
||||
CONFIG_PERCPU_TEST=m
|
||||
CONFIG_TEST_LIST_SORT=y
|
||||
CONFIG_TEST_STRING_HELPERS=m
|
||||
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
|
||||
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
|
||||
|
||||
CONFIG_WQ_WATCHDOG=y
|
||||
|
||||
CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
|
||||
|
||||
CONFIG_DEBUG_KMEMLEAK=y
|
||||
CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024
|
||||
# CONFIG_DEBUG_KMEMLEAK_TEST is not set
|
||||
CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
|
||||
|
||||
CONFIG_MAC80211_MESSAGE_TRACING=y
|
||||
|
||||
CONFIG_EDAC_DEBUG=y
|
||||
|
||||
CONFIG_SPI_DEBUG=y
|
||||
|
||||
CONFIG_DEBUG_VM_PGFLAGS=y
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue