hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/lib/locking-selftest.c
....@@ -787,8 +787,6 @@
787787 #include "locking-selftest-spin-hardirq.h"
788788 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_spin)
789789
790
-#ifndef CONFIG_PREEMPT_RT
791
-
792790 #include "locking-selftest-rlock-hardirq.h"
793791 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_rlock)
794792
....@@ -804,12 +802,9 @@
804802 #include "locking-selftest-wlock-softirq.h"
805803 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_wlock)
806804
807
-#endif
808
-
809805 #undef E1
810806 #undef E2
811807
812
-#ifndef CONFIG_PREEMPT_RT
813808 /*
814809 * Enabling hardirqs with a softirq-safe lock held:
815810 */
....@@ -842,8 +837,6 @@
842837 #undef E1
843838 #undef E2
844839
845
-#endif
846
-
847840 /*
848841 * Enabling irqs with an irq-safe lock held:
849842 */
....@@ -867,8 +860,6 @@
867860 #include "locking-selftest-spin-hardirq.h"
868861 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_spin)
869862
870
-#ifndef CONFIG_PREEMPT_RT
871
-
872863 #include "locking-selftest-rlock-hardirq.h"
873864 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_rlock)
874865
....@@ -883,8 +874,6 @@
883874
884875 #include "locking-selftest-wlock-softirq.h"
885876 GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_wlock)
886
-
887
-#endif
888877
889878 #undef E1
890879 #undef E2
....@@ -917,8 +906,6 @@
917906 #include "locking-selftest-spin-hardirq.h"
918907 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_spin)
919908
920
-#ifndef CONFIG_PREEMPT_RT
921
-
922909 #include "locking-selftest-rlock-hardirq.h"
923910 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_rlock)
924911
....@@ -933,8 +920,6 @@
933920
934921 #include "locking-selftest-wlock-softirq.h"
935922 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_wlock)
936
-
937
-#endif
938923
939924 #undef E1
940925 #undef E2
....@@ -969,8 +954,6 @@
969954 #include "locking-selftest-spin-hardirq.h"
970955 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_spin)
971956
972
-#ifndef CONFIG_PREEMPT_RT
973
-
974957 #include "locking-selftest-rlock-hardirq.h"
975958 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_rlock)
976959
....@@ -986,13 +969,9 @@
986969 #include "locking-selftest-wlock-softirq.h"
987970 GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_wlock)
988971
989
-#endif
990
-
991972 #undef E1
992973 #undef E2
993974 #undef E3
994
-
995
-#ifndef CONFIG_PREEMPT_RT
996975
997976 /*
998977 * read-lock / write-lock irq inversion.
....@@ -1183,11 +1162,6 @@
11831162 #undef E1
11841163 #undef E2
11851164 #undef E3
1186
-
1187
-#endif
1188
-
1189
-#ifndef CONFIG_PREEMPT_RT
1190
-
11911165 /*
11921166 * read-lock / write-lock recursion that is actually safe.
11931167 */
....@@ -1233,8 +1207,6 @@
12331207 #undef E1
12341208 #undef E2
12351209 #undef E3
1236
-
1237
-#endif
12381210
12391211 /*
12401212 * read-lock / write-lock recursion that is unsafe.
....@@ -2484,7 +2456,6 @@
24842456
24852457 printk(" --------------------------------------------------------------------------\n");
24862458
2487
-#ifndef CONFIG_PREEMPT_RT
24882459 /*
24892460 * irq-context testcases:
24902461 */
....@@ -2499,28 +2470,6 @@
24992470 DO_TESTCASE_6x2x2RW("irq read-recursion #2", irq_read_recursion2);
25002471 DO_TESTCASE_6x2x2RW("irq read-recursion #3", irq_read_recursion3);
25012472
2502
-#else
2503
- /* On -rt, we only do hardirq context test for raw spinlock */
2504
- DO_TESTCASE_1B("hard-irqs-on + irq-safe-A", irqsafe1_hard_spin, 12);
2505
- DO_TESTCASE_1B("hard-irqs-on + irq-safe-A", irqsafe1_hard_spin, 21);
2506
-
2507
- DO_TESTCASE_1B("hard-safe-A + irqs-on", irqsafe2B_hard_spin, 12);
2508
- DO_TESTCASE_1B("hard-safe-A + irqs-on", irqsafe2B_hard_spin, 21);
2509
-
2510
- DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 123);
2511
- DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 132);
2512
- DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 213);
2513
- DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 231);
2514
- DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 312);
2515
- DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 321);
2516
-
2517
- DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 123);
2518
- DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 132);
2519
- DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 213);
2520
- DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 231);
2521
- DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 312);
2522
- DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 321);
2523
-#endif
25242473 ww_tests();
25252474
25262475 force_read_lock_recursive = 0;