Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139031
b: refs/heads/master
c: 36bfb9b
h: refs/heads/master
i:
  139029: 870cb0b
  139027: b5aec6c
  139023: 4343640
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Feb 14, 2009
1 parent 489e689 commit c2d367e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 25 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: 9fe51abf7a1c787f918f66fa3cef9cd0cedb3791
refs/heads/master: 36bfb9bb03db2002a8574600c6aeb4cdd1ba01a6
38 changes: 14 additions & 24 deletions trunk/kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -2253,11 +2253,19 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
}

enum mark_type {
HARDIRQ,
SOFTIRQ,
RECLAIM_FS,
#define LOCKDEP_STATE(__STATE) __STATE,
#include "lockdep_states.h"
#undef LOCKDEP_STATE
};

#define MARK_HELD_CASE(__STATE) \
case __STATE: \
if (hlock->read) \
usage_bit = LOCK_ENABLED_##__STATE##_READ; \
else \
usage_bit = LOCK_ENABLED_##__STATE; \
break;

/*
* Mark all held locks with a usage bit:
*/
Expand All @@ -2272,27 +2280,9 @@ mark_held_locks(struct task_struct *curr, enum mark_type mark)
hlock = curr->held_locks + i;

switch (mark) {
case HARDIRQ:
if (hlock->read)
usage_bit = LOCK_ENABLED_HARDIRQ_READ;
else
usage_bit = LOCK_ENABLED_HARDIRQ;
break;

case SOFTIRQ:
if (hlock->read)
usage_bit = LOCK_ENABLED_SOFTIRQ_READ;
else
usage_bit = LOCK_ENABLED_SOFTIRQ;
break;

case RECLAIM_FS:
if (hlock->read)
usage_bit = LOCK_ENABLED_RECLAIM_FS_READ;
else
usage_bit = LOCK_ENABLED_RECLAIM_FS;
break;

#define LOCKDEP_STATE(__STATE) MARK_HELD_CASE(__STATE)
#include "lockdep_states.h"
#undef LOCKDEP_STATE
default:
BUG();
}
Expand Down

0 comments on commit c2d367e

Please sign in to comment.