aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-01-22 08:18:40 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-14 17:27:59 -0500
commit9851673bc32bc9fcafbbaeffc858ead434bd6d58 (patch)
tree96272ea6db6c2e38b35c86668abd2290bd18df9f /kernel
parent5346417e17daf5a7712e4cf030b45414e46607cf (diff)
lockdep: move state bit definitions around
For convenience later. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/lockdep_internals.h46
-rw-r--r--kernel/lockdep_states.h6
2 files changed, 52 insertions, 0 deletions
diff --git a/kernel/lockdep_internals.h b/kernel/lockdep_internals.h
index e887b783244f..1352409cfef1 100644
--- a/kernel/lockdep_internals.h
+++ b/kernel/lockdep_internals.h
@@ -7,6 +7,52 @@
7 */ 7 */
8 8
9/* 9/*
10 * Lock-class usage-state bits:
11 */
12enum lock_usage_bit {
13 LOCK_USED = 0,
14 LOCK_USED_IN_HARDIRQ,
15 LOCK_USED_IN_SOFTIRQ,
16 LOCK_USED_IN_RECLAIM_FS,
17 LOCK_ENABLED_SOFTIRQ,
18 LOCK_ENABLED_HARDIRQ,
19 LOCK_ENABLED_RECLAIM_FS,
20 LOCK_USED_IN_HARDIRQ_READ,
21 LOCK_USED_IN_SOFTIRQ_READ,
22 LOCK_USED_IN_RECLAIM_FS_READ,
23 LOCK_ENABLED_SOFTIRQ_READ,
24 LOCK_ENABLED_HARDIRQ_READ,
25 LOCK_ENABLED_RECLAIM_FS_READ,
26 LOCK_USAGE_STATES
27};
28
29/*
30 * Usage-state bitmasks:
31 */
32#define LOCKF_USED (1 << LOCK_USED)
33#define LOCKF_USED_IN_HARDIRQ (1 << LOCK_USED_IN_HARDIRQ)
34#define LOCKF_USED_IN_SOFTIRQ (1 << LOCK_USED_IN_SOFTIRQ)
35#define LOCKF_USED_IN_RECLAIM_FS (1 << LOCK_USED_IN_RECLAIM_FS)
36#define LOCKF_ENABLED_HARDIRQ (1 << LOCK_ENABLED_HARDIRQ)
37#define LOCKF_ENABLED_SOFTIRQ (1 << LOCK_ENABLED_SOFTIRQ)
38#define LOCKF_ENABLED_RECLAIM_FS (1 << LOCK_ENABLED_RECLAIM_FS)
39
40#define LOCKF_ENABLED_IRQ (LOCKF_ENABLED_HARDIRQ | LOCKF_ENABLED_SOFTIRQ)
41#define LOCKF_USED_IN_IRQ (LOCKF_USED_IN_HARDIRQ | LOCKF_USED_IN_SOFTIRQ)
42
43#define LOCKF_USED_IN_HARDIRQ_READ (1 << LOCK_USED_IN_HARDIRQ_READ)
44#define LOCKF_USED_IN_SOFTIRQ_READ (1 << LOCK_USED_IN_SOFTIRQ_READ)
45#define LOCKF_USED_IN_RECLAIM_FS_READ (1 << LOCK_USED_IN_RECLAIM_FS_READ)
46#define LOCKF_ENABLED_HARDIRQ_READ (1 << LOCK_ENABLED_HARDIRQ_READ)
47#define LOCKF_ENABLED_SOFTIRQ_READ (1 << LOCK_ENABLED_SOFTIRQ_READ)
48#define LOCKF_ENABLED_RECLAIM_FS_READ (1 << LOCK_ENABLED_RECLAIM_FS_READ)
49
50#define LOCKF_ENABLED_IRQ_READ \
51 (LOCKF_ENABLED_HARDIRQ_READ | LOCKF_ENABLED_SOFTIRQ_READ)
52#define LOCKF_USED_IN_IRQ_READ \
53 (LOCKF_USED_IN_HARDIRQ_READ | LOCKF_USED_IN_SOFTIRQ_READ)
54
55/*
10 * MAX_LOCKDEP_ENTRIES is the maximum number of lock dependencies 56 * MAX_LOCKDEP_ENTRIES is the maximum number of lock dependencies
11 * we track. 57 * we track.
12 * 58 *
diff --git a/kernel/lockdep_states.h b/kernel/lockdep_states.h
index 937039ef2dd0..995b0cc2b84c 100644
--- a/kernel/lockdep_states.h
+++ b/kernel/lockdep_states.h
@@ -1,3 +1,9 @@
1/*
2 * Lockdep states,
3 *
4 * please update XXX_LOCK_USAGE_STATES in include/linux/lockdep.h whenever
5 * you add one, or come up with a nice dynamic solution.
6 */
1LOCKDEP_STATE(HARDIRQ) 7LOCKDEP_STATE(HARDIRQ)
2LOCKDEP_STATE(SOFTIRQ) 8LOCKDEP_STATE(SOFTIRQ)
3LOCKDEP_STATE(RECLAIM_FS) 9LOCKDEP_STATE(RECLAIM_FS)