]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
lockdep: make cli/sti annotation warnings clearer
authorIngo Molnar <mingo@elte.hu>
Fri, 7 Dec 2007 18:02:47 +0000 (19:02 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 7 Dec 2007 18:02:47 +0000 (19:02 +0100)
make cli/sti annotation warnings easier to interpret.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
kernel/lockdep.c

index 0f389621bb6b42d803224db0f85d161a7c95188c..723bd9f9255687f7820b0e151ae23a3d5ca81e7b 100644 (file)
@@ -2654,10 +2654,15 @@ static void check_flags(unsigned long flags)
        if (!debug_locks)
                return;
 
-       if (irqs_disabled_flags(flags))
-               DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled);
-       else
-               DEBUG_LOCKS_WARN_ON(!current->hardirqs_enabled);
+       if (irqs_disabled_flags(flags)) {
+               if (DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled)) {
+                       printk("possible reason: unannotated irqs-off.\n");
+               }
+       } else {
+               if (DEBUG_LOCKS_WARN_ON(!current->hardirqs_enabled)) {
+                       printk("possible reason: unannotated irqs-on.\n");
+               }
+       }
 
        /*
         * We dont accurately track softirq state in e.g.