aboutsummaryrefslogtreecommitdiffstats
path: root/include
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 /include
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 'include')
-rw-r--r--include/linux/lockdep.h49
1 files changed, 4 insertions, 45 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 6d729c9d1d27..5a58ea3e91e9 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -20,51 +20,10 @@ struct lockdep_map;
20#include <linux/stacktrace.h> 20#include <linux/stacktrace.h>
21 21
22/* 22/*
23 * Lock-class usage-state bits: 23 * We'd rather not expose kernel/lockdep_states.h this wide, but we do need
24 * the total number of states... :-(
24 */ 25 */
25enum lock_usage_bit 26#define XXX_LOCK_USAGE_STATES (1+3*4)
26{
27 LOCK_USED = 0,
28 LOCK_USED_IN_HARDIRQ,
29 LOCK_USED_IN_SOFTIRQ,
30 LOCK_USED_IN_RECLAIM_FS,
31 LOCK_ENABLED_SOFTIRQ,
32 LOCK_ENABLED_HARDIRQ,
33 LOCK_ENABLED_RECLAIM_FS,
34 LOCK_USED_IN_HARDIRQ_READ,
35 LOCK_USED_IN_SOFTIRQ_READ,
36 LOCK_USED_IN_RECLAIM_FS_READ,
37 LOCK_ENABLED_SOFTIRQ_READ,
38 LOCK_ENABLED_HARDIRQ_READ,
39 LOCK_ENABLED_RECLAIM_FS_READ,
40 LOCK_USAGE_STATES
41};
42
43/*
44 * Usage-state bitmasks:
45 */
46#define LOCKF_USED (1 << LOCK_USED)
47#define LOCKF_USED_IN_HARDIRQ (1 << LOCK_USED_IN_HARDIRQ)
48#define LOCKF_USED_IN_SOFTIRQ (1 << LOCK_USED_IN_SOFTIRQ)
49#define LOCKF_USED_IN_RECLAIM_FS (1 << LOCK_USED_IN_RECLAIM_FS)
50#define LOCKF_ENABLED_HARDIRQ (1 << LOCK_ENABLED_HARDIRQ)
51#define LOCKF_ENABLED_SOFTIRQ (1 << LOCK_ENABLED_SOFTIRQ)
52#define LOCKF_ENABLED_RECLAIM_FS (1 << LOCK_ENABLED_RECLAIM_FS)
53
54#define LOCKF_ENABLED_IRQ (LOCKF_ENABLED_HARDIRQ | LOCKF_ENABLED_SOFTIRQ)
55#define LOCKF_USED_IN_IRQ (LOCKF_USED_IN_HARDIRQ | LOCKF_USED_IN_SOFTIRQ)
56
57#define LOCKF_USED_IN_HARDIRQ_READ (1 << LOCK_USED_IN_HARDIRQ_READ)
58#define LOCKF_USED_IN_SOFTIRQ_READ (1 << LOCK_USED_IN_SOFTIRQ_READ)
59#define LOCKF_USED_IN_RECLAIM_FS_READ (1 << LOCK_USED_IN_RECLAIM_FS_READ)
60#define LOCKF_ENABLED_HARDIRQ_READ (1 << LOCK_ENABLED_HARDIRQ_READ)
61#define LOCKF_ENABLED_SOFTIRQ_READ (1 << LOCK_ENABLED_SOFTIRQ_READ)
62#define LOCKF_ENABLED_RECLAIM_FS_READ (1 << LOCK_ENABLED_RECLAIM_FS_READ)
63
64#define LOCKF_ENABLED_IRQ_READ \
65 (LOCKF_ENABLED_HARDIRQ_READ | LOCKF_ENABLED_SOFTIRQ_READ)
66#define LOCKF_USED_IN_IRQ_READ \
67 (LOCKF_USED_IN_HARDIRQ_READ | LOCKF_USED_IN_SOFTIRQ_READ)
68 27
69#define MAX_LOCKDEP_SUBCLASSES 8UL 28#define MAX_LOCKDEP_SUBCLASSES 8UL
70 29
@@ -105,7 +64,7 @@ struct lock_class {
105 * IRQ/softirq usage tracking bits: 64 * IRQ/softirq usage tracking bits:
106 */ 65 */
107 unsigned long usage_mask; 66 unsigned long usage_mask;
108 struct stack_trace usage_traces[LOCK_USAGE_STATES]; 67 struct stack_trace usage_traces[XXX_LOCK_USAGE_STATES];
109 68
110 /* 69 /*
111 * These fields represent a directed graph of lock dependencies, 70 * These fields represent a directed graph of lock dependencies,