| .. | .. |
|---|
| 787 | 787 | #include "locking-selftest-spin-hardirq.h" |
|---|
| 788 | 788 | GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_spin) |
|---|
| 789 | 789 | |
|---|
| 790 | | -#ifndef CONFIG_PREEMPT_RT |
|---|
| 791 | | - |
|---|
| 792 | 790 | #include "locking-selftest-rlock-hardirq.h" |
|---|
| 793 | 791 | GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_rlock) |
|---|
| 794 | 792 | |
|---|
| .. | .. |
|---|
| 804 | 802 | #include "locking-selftest-wlock-softirq.h" |
|---|
| 805 | 803 | GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_wlock) |
|---|
| 806 | 804 | |
|---|
| 807 | | -#endif |
|---|
| 808 | | - |
|---|
| 809 | 805 | #undef E1 |
|---|
| 810 | 806 | #undef E2 |
|---|
| 811 | 807 | |
|---|
| 812 | | -#ifndef CONFIG_PREEMPT_RT |
|---|
| 813 | 808 | /* |
|---|
| 814 | 809 | * Enabling hardirqs with a softirq-safe lock held: |
|---|
| 815 | 810 | */ |
|---|
| .. | .. |
|---|
| 842 | 837 | #undef E1 |
|---|
| 843 | 838 | #undef E2 |
|---|
| 844 | 839 | |
|---|
| 845 | | -#endif |
|---|
| 846 | | - |
|---|
| 847 | 840 | /* |
|---|
| 848 | 841 | * Enabling irqs with an irq-safe lock held: |
|---|
| 849 | 842 | */ |
|---|
| .. | .. |
|---|
| 867 | 860 | #include "locking-selftest-spin-hardirq.h" |
|---|
| 868 | 861 | GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_spin) |
|---|
| 869 | 862 | |
|---|
| 870 | | -#ifndef CONFIG_PREEMPT_RT |
|---|
| 871 | | - |
|---|
| 872 | 863 | #include "locking-selftest-rlock-hardirq.h" |
|---|
| 873 | 864 | GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_rlock) |
|---|
| 874 | 865 | |
|---|
| .. | .. |
|---|
| 883 | 874 | |
|---|
| 884 | 875 | #include "locking-selftest-wlock-softirq.h" |
|---|
| 885 | 876 | GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_wlock) |
|---|
| 886 | | - |
|---|
| 887 | | -#endif |
|---|
| 888 | 877 | |
|---|
| 889 | 878 | #undef E1 |
|---|
| 890 | 879 | #undef E2 |
|---|
| .. | .. |
|---|
| 917 | 906 | #include "locking-selftest-spin-hardirq.h" |
|---|
| 918 | 907 | GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_spin) |
|---|
| 919 | 908 | |
|---|
| 920 | | -#ifndef CONFIG_PREEMPT_RT |
|---|
| 921 | | - |
|---|
| 922 | 909 | #include "locking-selftest-rlock-hardirq.h" |
|---|
| 923 | 910 | GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_rlock) |
|---|
| 924 | 911 | |
|---|
| .. | .. |
|---|
| 933 | 920 | |
|---|
| 934 | 921 | #include "locking-selftest-wlock-softirq.h" |
|---|
| 935 | 922 | GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_wlock) |
|---|
| 936 | | - |
|---|
| 937 | | -#endif |
|---|
| 938 | 923 | |
|---|
| 939 | 924 | #undef E1 |
|---|
| 940 | 925 | #undef E2 |
|---|
| .. | .. |
|---|
| 969 | 954 | #include "locking-selftest-spin-hardirq.h" |
|---|
| 970 | 955 | GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_spin) |
|---|
| 971 | 956 | |
|---|
| 972 | | -#ifndef CONFIG_PREEMPT_RT |
|---|
| 973 | | - |
|---|
| 974 | 957 | #include "locking-selftest-rlock-hardirq.h" |
|---|
| 975 | 958 | GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_rlock) |
|---|
| 976 | 959 | |
|---|
| .. | .. |
|---|
| 986 | 969 | #include "locking-selftest-wlock-softirq.h" |
|---|
| 987 | 970 | GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_wlock) |
|---|
| 988 | 971 | |
|---|
| 989 | | -#endif |
|---|
| 990 | | - |
|---|
| 991 | 972 | #undef E1 |
|---|
| 992 | 973 | #undef E2 |
|---|
| 993 | 974 | #undef E3 |
|---|
| 994 | | - |
|---|
| 995 | | -#ifndef CONFIG_PREEMPT_RT |
|---|
| 996 | 975 | |
|---|
| 997 | 976 | /* |
|---|
| 998 | 977 | * read-lock / write-lock irq inversion. |
|---|
| .. | .. |
|---|
| 1183 | 1162 | #undef E1 |
|---|
| 1184 | 1163 | #undef E2 |
|---|
| 1185 | 1164 | #undef E3 |
|---|
| 1186 | | - |
|---|
| 1187 | | -#endif |
|---|
| 1188 | | - |
|---|
| 1189 | | -#ifndef CONFIG_PREEMPT_RT |
|---|
| 1190 | | - |
|---|
| 1191 | 1165 | /* |
|---|
| 1192 | 1166 | * read-lock / write-lock recursion that is actually safe. |
|---|
| 1193 | 1167 | */ |
|---|
| .. | .. |
|---|
| 1233 | 1207 | #undef E1 |
|---|
| 1234 | 1208 | #undef E2 |
|---|
| 1235 | 1209 | #undef E3 |
|---|
| 1236 | | - |
|---|
| 1237 | | -#endif |
|---|
| 1238 | 1210 | |
|---|
| 1239 | 1211 | /* |
|---|
| 1240 | 1212 | * read-lock / write-lock recursion that is unsafe. |
|---|
| .. | .. |
|---|
| 2484 | 2456 | |
|---|
| 2485 | 2457 | printk(" --------------------------------------------------------------------------\n"); |
|---|
| 2486 | 2458 | |
|---|
| 2487 | | -#ifndef CONFIG_PREEMPT_RT |
|---|
| 2488 | 2459 | /* |
|---|
| 2489 | 2460 | * irq-context testcases: |
|---|
| 2490 | 2461 | */ |
|---|
| .. | .. |
|---|
| 2499 | 2470 | DO_TESTCASE_6x2x2RW("irq read-recursion #2", irq_read_recursion2); |
|---|
| 2500 | 2471 | DO_TESTCASE_6x2x2RW("irq read-recursion #3", irq_read_recursion3); |
|---|
| 2501 | 2472 | |
|---|
| 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 |
|---|
| 2524 | 2473 | ww_tests(); |
|---|
| 2525 | 2474 | |
|---|
| 2526 | 2475 | force_read_lock_recursive = 0; |
|---|