diff options
Diffstat (limited to 'include/linux/lockdep.h')
-rw-r--r-- | include/linux/lockdep.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 23bf02fb124f..cc97bdbc7969 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -27,12 +27,16 @@ enum lock_usage_bit | |||
27 | LOCK_USED = 0, | 27 | LOCK_USED = 0, |
28 | LOCK_USED_IN_HARDIRQ, | 28 | LOCK_USED_IN_HARDIRQ, |
29 | LOCK_USED_IN_SOFTIRQ, | 29 | LOCK_USED_IN_SOFTIRQ, |
30 | LOCK_USED_IN_RECLAIM_FS, | ||
30 | LOCK_ENABLED_SOFTIRQS, | 31 | LOCK_ENABLED_SOFTIRQS, |
31 | LOCK_ENABLED_HARDIRQS, | 32 | LOCK_ENABLED_HARDIRQS, |
33 | LOCK_HELD_OVER_RECLAIM_FS, | ||
32 | LOCK_USED_IN_HARDIRQ_READ, | 34 | LOCK_USED_IN_HARDIRQ_READ, |
33 | LOCK_USED_IN_SOFTIRQ_READ, | 35 | LOCK_USED_IN_SOFTIRQ_READ, |
36 | LOCK_USED_IN_RECLAIM_FS_READ, | ||
34 | LOCK_ENABLED_SOFTIRQS_READ, | 37 | LOCK_ENABLED_SOFTIRQS_READ, |
35 | LOCK_ENABLED_HARDIRQS_READ, | 38 | LOCK_ENABLED_HARDIRQS_READ, |
39 | LOCK_HELD_OVER_RECLAIM_FS_READ, | ||
36 | LOCK_USAGE_STATES | 40 | LOCK_USAGE_STATES |
37 | }; | 41 | }; |
38 | 42 | ||
@@ -42,16 +46,20 @@ enum lock_usage_bit | |||
42 | #define LOCKF_USED (1 << LOCK_USED) | 46 | #define LOCKF_USED (1 << LOCK_USED) |
43 | #define LOCKF_USED_IN_HARDIRQ (1 << LOCK_USED_IN_HARDIRQ) | 47 | #define LOCKF_USED_IN_HARDIRQ (1 << LOCK_USED_IN_HARDIRQ) |
44 | #define LOCKF_USED_IN_SOFTIRQ (1 << LOCK_USED_IN_SOFTIRQ) | 48 | #define LOCKF_USED_IN_SOFTIRQ (1 << LOCK_USED_IN_SOFTIRQ) |
49 | #define LOCKF_USED_IN_RECLAIM_FS (1 << LOCK_USED_IN_RECLAIM_FS) | ||
45 | #define LOCKF_ENABLED_HARDIRQS (1 << LOCK_ENABLED_HARDIRQS) | 50 | #define LOCKF_ENABLED_HARDIRQS (1 << LOCK_ENABLED_HARDIRQS) |
46 | #define LOCKF_ENABLED_SOFTIRQS (1 << LOCK_ENABLED_SOFTIRQS) | 51 | #define LOCKF_ENABLED_SOFTIRQS (1 << LOCK_ENABLED_SOFTIRQS) |
52 | #define LOCKF_HELD_OVER_RECLAIM_FS (1 << LOCK_HELD_OVER_RECLAIM_FS) | ||
47 | 53 | ||
48 | #define LOCKF_ENABLED_IRQS (LOCKF_ENABLED_HARDIRQS | LOCKF_ENABLED_SOFTIRQS) | 54 | #define LOCKF_ENABLED_IRQS (LOCKF_ENABLED_HARDIRQS | LOCKF_ENABLED_SOFTIRQS) |
49 | #define LOCKF_USED_IN_IRQ (LOCKF_USED_IN_HARDIRQ | LOCKF_USED_IN_SOFTIRQ) | 55 | #define LOCKF_USED_IN_IRQ (LOCKF_USED_IN_HARDIRQ | LOCKF_USED_IN_SOFTIRQ) |
50 | 56 | ||
51 | #define LOCKF_USED_IN_HARDIRQ_READ (1 << LOCK_USED_IN_HARDIRQ_READ) | 57 | #define LOCKF_USED_IN_HARDIRQ_READ (1 << LOCK_USED_IN_HARDIRQ_READ) |
52 | #define LOCKF_USED_IN_SOFTIRQ_READ (1 << LOCK_USED_IN_SOFTIRQ_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) | ||
53 | #define LOCKF_ENABLED_HARDIRQS_READ (1 << LOCK_ENABLED_HARDIRQS_READ) | 60 | #define LOCKF_ENABLED_HARDIRQS_READ (1 << LOCK_ENABLED_HARDIRQS_READ) |
54 | #define LOCKF_ENABLED_SOFTIRQS_READ (1 << LOCK_ENABLED_SOFTIRQS_READ) | 61 | #define LOCKF_ENABLED_SOFTIRQS_READ (1 << LOCK_ENABLED_SOFTIRQS_READ) |
62 | #define LOCKF_HELD_OVER_RECLAIM_FS_READ (1 << LOCK_HELD_OVER_RECLAIM_FS_READ) | ||
55 | 63 | ||
56 | #define LOCKF_ENABLED_IRQS_READ \ | 64 | #define LOCKF_ENABLED_IRQS_READ \ |
57 | (LOCKF_ENABLED_HARDIRQS_READ | LOCKF_ENABLED_SOFTIRQS_READ) | 65 | (LOCKF_ENABLED_HARDIRQS_READ | LOCKF_ENABLED_SOFTIRQS_READ) |
@@ -324,7 +332,11 @@ static inline void lock_set_subclass(struct lockdep_map *lock, | |||
324 | lock_set_class(lock, lock->name, lock->key, subclass, ip); | 332 | lock_set_class(lock, lock->name, lock->key, subclass, ip); |
325 | } | 333 | } |
326 | 334 | ||
327 | # define INIT_LOCKDEP .lockdep_recursion = 0, | 335 | extern void lockdep_set_current_reclaim_state(gfp_t gfp_mask); |
336 | extern void lockdep_clear_current_reclaim_state(void); | ||
337 | extern void lockdep_trace_alloc(gfp_t mask); | ||
338 | |||
339 | # define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, | ||
328 | 340 | ||
329 | #define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) | 341 | #define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) |
330 | 342 | ||
@@ -342,6 +354,9 @@ static inline void lockdep_on(void) | |||
342 | # define lock_release(l, n, i) do { } while (0) | 354 | # define lock_release(l, n, i) do { } while (0) |
343 | # define lock_set_class(l, n, k, s, i) do { } while (0) | 355 | # define lock_set_class(l, n, k, s, i) do { } while (0) |
344 | # define lock_set_subclass(l, s, i) do { } while (0) | 356 | # define lock_set_subclass(l, s, i) do { } while (0) |
357 | # define lockdep_set_current_reclaim_state(g) do { } while (0) | ||
358 | # define lockdep_clear_current_reclaim_state() do { } while (0) | ||
359 | # define lockdep_trace_alloc(g) do { } while (0) | ||
345 | # define lockdep_init() do { } while (0) | 360 | # define lockdep_init() do { } while (0) |
346 | # define lockdep_info() do { } while (0) | 361 | # define lockdep_info() do { } while (0) |
347 | # define lockdep_init_map(lock, name, key, sub) \ | 362 | # define lockdep_init_map(lock, name, key, sub) \ |