.. | .. |
---|
742 | 742 | #include "locking-selftest-spin-hardirq.h" |
---|
743 | 743 | GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_spin) |
---|
744 | 744 | |
---|
| 745 | +#ifndef CONFIG_PREEMPT_RT_FULL |
---|
| 746 | + |
---|
745 | 747 | #include "locking-selftest-rlock-hardirq.h" |
---|
746 | 748 | GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_hard_rlock) |
---|
747 | 749 | |
---|
.. | .. |
---|
757 | 759 | #include "locking-selftest-wlock-softirq.h" |
---|
758 | 760 | GENERATE_PERMUTATIONS_2_EVENTS(irqsafe1_soft_wlock) |
---|
759 | 761 | |
---|
| 762 | +#endif |
---|
| 763 | + |
---|
760 | 764 | #undef E1 |
---|
761 | 765 | #undef E2 |
---|
762 | 766 | |
---|
| 767 | +#ifndef CONFIG_PREEMPT_RT_FULL |
---|
763 | 768 | /* |
---|
764 | 769 | * Enabling hardirqs with a softirq-safe lock held: |
---|
765 | 770 | */ |
---|
.. | .. |
---|
792 | 797 | #undef E1 |
---|
793 | 798 | #undef E2 |
---|
794 | 799 | |
---|
| 800 | +#endif |
---|
| 801 | + |
---|
795 | 802 | /* |
---|
796 | 803 | * Enabling irqs with an irq-safe lock held: |
---|
797 | 804 | */ |
---|
.. | .. |
---|
815 | 822 | #include "locking-selftest-spin-hardirq.h" |
---|
816 | 823 | GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_spin) |
---|
817 | 824 | |
---|
| 825 | +#ifndef CONFIG_PREEMPT_RT_FULL |
---|
| 826 | + |
---|
818 | 827 | #include "locking-selftest-rlock-hardirq.h" |
---|
819 | 828 | GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_hard_rlock) |
---|
820 | 829 | |
---|
.. | .. |
---|
829 | 838 | |
---|
830 | 839 | #include "locking-selftest-wlock-softirq.h" |
---|
831 | 840 | GENERATE_PERMUTATIONS_2_EVENTS(irqsafe2B_soft_wlock) |
---|
| 841 | + |
---|
| 842 | +#endif |
---|
832 | 843 | |
---|
833 | 844 | #undef E1 |
---|
834 | 845 | #undef E2 |
---|
.. | .. |
---|
861 | 872 | #include "locking-selftest-spin-hardirq.h" |
---|
862 | 873 | GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_spin) |
---|
863 | 874 | |
---|
| 875 | +#ifndef CONFIG_PREEMPT_RT_FULL |
---|
| 876 | + |
---|
864 | 877 | #include "locking-selftest-rlock-hardirq.h" |
---|
865 | 878 | GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_hard_rlock) |
---|
866 | 879 | |
---|
.. | .. |
---|
875 | 888 | |
---|
876 | 889 | #include "locking-selftest-wlock-softirq.h" |
---|
877 | 890 | GENERATE_PERMUTATIONS_3_EVENTS(irqsafe3_soft_wlock) |
---|
| 891 | + |
---|
| 892 | +#endif |
---|
878 | 893 | |
---|
879 | 894 | #undef E1 |
---|
880 | 895 | #undef E2 |
---|
.. | .. |
---|
909 | 924 | #include "locking-selftest-spin-hardirq.h" |
---|
910 | 925 | GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_spin) |
---|
911 | 926 | |
---|
| 927 | +#ifndef CONFIG_PREEMPT_RT_FULL |
---|
| 928 | + |
---|
912 | 929 | #include "locking-selftest-rlock-hardirq.h" |
---|
913 | 930 | GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_hard_rlock) |
---|
914 | 931 | |
---|
.. | .. |
---|
924 | 941 | #include "locking-selftest-wlock-softirq.h" |
---|
925 | 942 | GENERATE_PERMUTATIONS_3_EVENTS(irqsafe4_soft_wlock) |
---|
926 | 943 | |
---|
| 944 | +#endif |
---|
| 945 | + |
---|
927 | 946 | #undef E1 |
---|
928 | 947 | #undef E2 |
---|
929 | 948 | #undef E3 |
---|
| 949 | + |
---|
| 950 | +#ifndef CONFIG_PREEMPT_RT_FULL |
---|
930 | 951 | |
---|
931 | 952 | /* |
---|
932 | 953 | * read-lock / write-lock irq inversion. |
---|
.. | .. |
---|
990 | 1011 | #undef E2 |
---|
991 | 1012 | #undef E3 |
---|
992 | 1013 | |
---|
| 1014 | +#endif |
---|
| 1015 | + |
---|
| 1016 | +#ifndef CONFIG_PREEMPT_RT_FULL |
---|
| 1017 | + |
---|
993 | 1018 | /* |
---|
994 | 1019 | * read-lock / write-lock recursion that is actually safe. |
---|
995 | 1020 | */ |
---|
.. | .. |
---|
1027 | 1052 | #undef E1 |
---|
1028 | 1053 | #undef E2 |
---|
1029 | 1054 | #undef E3 |
---|
| 1055 | + |
---|
| 1056 | +#endif |
---|
1030 | 1057 | |
---|
1031 | 1058 | /* |
---|
1032 | 1059 | * read-lock / write-lock recursion that is unsafe. |
---|
.. | .. |
---|
2057 | 2084 | |
---|
2058 | 2085 | printk(" --------------------------------------------------------------------------\n"); |
---|
2059 | 2086 | |
---|
| 2087 | +#ifndef CONFIG_PREEMPT_RT_FULL |
---|
2060 | 2088 | /* |
---|
2061 | 2089 | * irq-context testcases: |
---|
2062 | 2090 | */ |
---|
.. | .. |
---|
2069 | 2097 | |
---|
2070 | 2098 | DO_TESTCASE_6x2("irq read-recursion", irq_read_recursion); |
---|
2071 | 2099 | // DO_TESTCASE_6x2B("irq read-recursion #2", irq_read_recursion2); |
---|
| 2100 | +#else |
---|
| 2101 | + /* On -rt, we only do hardirq context test for raw spinlock */ |
---|
| 2102 | + DO_TESTCASE_1B("hard-irqs-on + irq-safe-A", irqsafe1_hard_spin, 12); |
---|
| 2103 | + DO_TESTCASE_1B("hard-irqs-on + irq-safe-A", irqsafe1_hard_spin, 21); |
---|
| 2104 | + |
---|
| 2105 | + DO_TESTCASE_1B("hard-safe-A + irqs-on", irqsafe2B_hard_spin, 12); |
---|
| 2106 | + DO_TESTCASE_1B("hard-safe-A + irqs-on", irqsafe2B_hard_spin, 21); |
---|
| 2107 | + |
---|
| 2108 | + DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 123); |
---|
| 2109 | + DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 132); |
---|
| 2110 | + DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 213); |
---|
| 2111 | + DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 231); |
---|
| 2112 | + DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 312); |
---|
| 2113 | + DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 321); |
---|
| 2114 | + |
---|
| 2115 | + DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 123); |
---|
| 2116 | + DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 132); |
---|
| 2117 | + DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 213); |
---|
| 2118 | + DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 231); |
---|
| 2119 | + DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 312); |
---|
| 2120 | + DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 321); |
---|
| 2121 | +#endif |
---|
2072 | 2122 | |
---|
2073 | 2123 | ww_tests(); |
---|
2074 | 2124 | |
---|