irq/timings: Use lockdep to assert IRQs are disabled/enabled
authorFrederic Weisbecker <[email protected]>
Mon, 6 Nov 2017 15:01:25 +0000 (16:01 +0100)
committerIngo Molnar <[email protected]>
Wed, 8 Nov 2017 10:13:52 +0000 (11:13 +0100)
Use lockdep to check that IRQs are enabled or disabled as expected. This
way the sanity check only shows overhead when concurrency correctness
debug code is enabled.

Signed-off-by: Frederic Weisbecker <[email protected]>
Acked-by: Thomas Gleixner <[email protected]>
Cc: David S . Miller <[email protected]>
Cc: Lai Jiangshan <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Tejun Heo <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
kernel/irq/timings.c

index c8c1d073fbf14958839760357f99142b9cf284a2..e0923fa4927acb0f40055bc8deeebb1c8716ded1 100644 (file)
@@ -264,7 +264,7 @@ u64 irq_timings_next_event(u64 now)
         * order to prevent the timings circular buffer to be updated
         * while we are reading it.
         */
-       WARN_ON_ONCE(!irqs_disabled());
+       lockdep_assert_irqs_disabled();
 
        /*
         * Number of elements in the circular buffer: If it happens it