Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262420
b: refs/heads/master
c: 7d36b26
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Aug 4, 2011
1 parent c2cba13 commit 7ba56fb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7619fe39d9769b4d4545cc511c891deea18ae08
refs/heads/master: 7d36b26be0f3c6b86e3ab7e1539e42f3a3bc79ca
30 changes: 16 additions & 14 deletions trunk/kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -2485,23 +2485,9 @@ static void __trace_hardirqs_on_caller(unsigned long ip)
{
struct task_struct *curr = current;

if (DEBUG_LOCKS_WARN_ON(unlikely(early_boot_irqs_disabled)))
return;

if (unlikely(curr->hardirqs_enabled)) {
/*
* Neither irq nor preemption are disabled here
* so this is racy by nature but losing one hit
* in a stat is not a big deal.
*/
__debug_atomic_inc(redundant_hardirqs_on);
return;
}
/* we'll do an OFF -> ON transition: */
curr->hardirqs_enabled = 1;

if (DEBUG_LOCKS_WARN_ON(current->hardirq_context))
return;
/*
* We are going to turn hardirqs on, so set the
* usage bit for all held locks:
Expand Down Expand Up @@ -2529,9 +2515,25 @@ void trace_hardirqs_on_caller(unsigned long ip)
if (unlikely(!debug_locks || current->lockdep_recursion))
return;

if (unlikely(current->hardirqs_enabled)) {
/*
* Neither irq nor preemption are disabled here
* so this is racy by nature but losing one hit
* in a stat is not a big deal.
*/
__debug_atomic_inc(redundant_hardirqs_on);
return;
}

if (DEBUG_LOCKS_WARN_ON(!irqs_disabled()))
return;

if (DEBUG_LOCKS_WARN_ON(unlikely(early_boot_irqs_disabled)))
return;

if (DEBUG_LOCKS_WARN_ON(current->hardirq_context))
return;

current->lockdep_recursion = 1;
__trace_hardirqs_on_caller(ip);
current->lockdep_recursion = 0;
Expand Down

0 comments on commit 7ba56fb

Please sign in to comment.