Skip to content

Commit

Permalink
lockdep: make cli/sti annotation warnings clearer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar committed Dec 7, 2007
1 parent f194d13 commit 5f9fa8a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5f9fa8a

Please sign in to comment.