diff options
Diffstat (limited to 'kernel/lockdep_internals.h')
-rw-r--r-- | kernel/lockdep_internals.h | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/kernel/lockdep_internals.h b/kernel/lockdep_internals.h index 1352409cfef1..7e653e66ce5a 100644 --- a/kernel/lockdep_internals.h +++ b/kernel/lockdep_internals.h | |||
@@ -10,43 +10,36 @@ | |||
10 | * Lock-class usage-state bits: | 10 | * Lock-class usage-state bits: |
11 | */ | 11 | */ |
12 | enum lock_usage_bit { | 12 | enum lock_usage_bit { |
13 | LOCK_USED = 0, | 13 | #define LOCKDEP_STATE(__STATE) \ |
14 | LOCK_USED_IN_HARDIRQ, | 14 | LOCK_USED_IN_##__STATE, \ |
15 | LOCK_USED_IN_SOFTIRQ, | 15 | LOCK_USED_IN_##__STATE##_READ, \ |
16 | LOCK_USED_IN_RECLAIM_FS, | 16 | LOCK_ENABLED_##__STATE, \ |
17 | LOCK_ENABLED_SOFTIRQ, | 17 | LOCK_ENABLED_##__STATE##_READ, |
18 | LOCK_ENABLED_HARDIRQ, | 18 | #include "lockdep_states.h" |
19 | LOCK_ENABLED_RECLAIM_FS, | 19 | #undef LOCKDEP_STATE |
20 | LOCK_USED_IN_HARDIRQ_READ, | 20 | LOCK_USED, |
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 | 21 | LOCK_USAGE_STATES |
27 | }; | 22 | }; |
28 | 23 | ||
29 | /* | 24 | /* |
30 | * Usage-state bitmasks: | 25 | * Usage-state bitmasks: |
31 | */ | 26 | */ |
32 | #define LOCKF_USED (1 << LOCK_USED) | 27 | #define __LOCKF(__STATE) LOCKF_##__STATE = (1 << LOCK_##__STATE), |
33 | #define LOCKF_USED_IN_HARDIRQ (1 << LOCK_USED_IN_HARDIRQ) | 28 | |
34 | #define LOCKF_USED_IN_SOFTIRQ (1 << LOCK_USED_IN_SOFTIRQ) | 29 | enum { |
35 | #define LOCKF_USED_IN_RECLAIM_FS (1 << LOCK_USED_IN_RECLAIM_FS) | 30 | #define LOCKDEP_STATE(__STATE) \ |
36 | #define LOCKF_ENABLED_HARDIRQ (1 << LOCK_ENABLED_HARDIRQ) | 31 | __LOCKF(USED_IN_##__STATE) \ |
37 | #define LOCKF_ENABLED_SOFTIRQ (1 << LOCK_ENABLED_SOFTIRQ) | 32 | __LOCKF(USED_IN_##__STATE##_READ) \ |
38 | #define LOCKF_ENABLED_RECLAIM_FS (1 << LOCK_ENABLED_RECLAIM_FS) | 33 | __LOCKF(ENABLED_##__STATE) \ |
34 | __LOCKF(ENABLED_##__STATE##_READ) | ||
35 | #include "lockdep_states.h" | ||
36 | #undef LOCKDEP_STATE | ||
37 | __LOCKF(USED) | ||
38 | }; | ||
39 | 39 | ||
40 | #define LOCKF_ENABLED_IRQ (LOCKF_ENABLED_HARDIRQ | LOCKF_ENABLED_SOFTIRQ) | 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) | 41 | #define LOCKF_USED_IN_IRQ (LOCKF_USED_IN_HARDIRQ | LOCKF_USED_IN_SOFTIRQ) |
42 | 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 \ | 43 | #define LOCKF_ENABLED_IRQ_READ \ |
51 | (LOCKF_ENABLED_HARDIRQ_READ | LOCKF_ENABLED_SOFTIRQ_READ) | 44 | (LOCKF_ENABLED_HARDIRQ_READ | LOCKF_ENABLED_SOFTIRQ_READ) |
52 | #define LOCKF_USED_IN_IRQ_READ \ | 45 | #define LOCKF_USED_IN_IRQ_READ \ |