diff options
author | Yong Zhang <yong.zhang@windriver.com> | 2012-04-16 15:01:56 +0800 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2021-07-02 18:43:15 -0400 |
commit | 598b64314dbca99b3df52ea90b9fbfec8cc0d485 (patch) | |
tree | b3960375d055176ceaf3e4460a175c4768f87314 /lib | |
parent | ce1f31c4dbdb2d7094e7d3a26e9c5dc5f2383a34 (diff) | |
download | linux-rt-598b64314dbca99b3df52ea90b9fbfec8cc0d485.tar.gz |
lockdep: selftest: Only do hardirq context test for raw spinlock
On -rt there is no softirq context any more and rwlock is sleepable,
disable softirq context test and rwlock+irq test.
Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Yong Zhang <yong.zhang@windriver.com>
Link: http://lkml.kernel.org/r/1334559716-18447-3-git-send-email-yong.zhang0@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/locking-selftest.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index a899b3f0e2e5..07539643403e 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c @@ -2455,6 +2455,7 @@ void locking_selftest(void) printk(" --------------------------------------------------------------------------\n"); +#ifndef CONFIG_PREEMPT_RT /* * irq-context testcases: */ @@ -2469,6 +2470,28 @@ void locking_selftest(void) DO_TESTCASE_6x2x2RW("irq read-recursion #2", irq_read_recursion2); DO_TESTCASE_6x2x2RW("irq read-recursion #3", irq_read_recursion3); +#else + /* On -rt, we only do hardirq context test for raw spinlock */ + DO_TESTCASE_1B("hard-irqs-on + irq-safe-A", irqsafe1_hard_spin, 12); + DO_TESTCASE_1B("hard-irqs-on + irq-safe-A", irqsafe1_hard_spin, 21); + + DO_TESTCASE_1B("hard-safe-A + irqs-on", irqsafe2B_hard_spin, 12); + DO_TESTCASE_1B("hard-safe-A + irqs-on", irqsafe2B_hard_spin, 21); + + DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 123); + DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 132); + DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 213); + DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 231); + DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 312); + DO_TESTCASE_1B("hard-safe-A + unsafe-B #1", irqsafe3_hard_spin, 321); + + DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 123); + DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 132); + DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 213); + DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 231); + DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 312); + DO_TESTCASE_1B("hard-safe-A + unsafe-B #2", irqsafe4_hard_spin, 321); +#endif ww_tests(); force_read_lock_recursive = 0; |