aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/lockdep.h')
-rw-r--r--include/linux/lockdep.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 00e46376e28f..f1e877b79ed8 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -359,7 +359,9 @@ extern void lockdep_trace_alloc(gfp_t mask);
359 359
360#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) 360#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
361 361
362#define lockdep_assert_held(l) WARN_ON(debug_locks && !lockdep_is_held(l)) 362#define lockdep_assert_held(l) do { \
363 WARN_ON(debug_locks && !lockdep_is_held(l)); \
364 } while (0)
363 365
364#define lockdep_recursing(tsk) ((tsk)->lockdep_recursion) 366#define lockdep_recursing(tsk) ((tsk)->lockdep_recursion)
365 367
@@ -410,7 +412,7 @@ struct lock_class_key { };
410 412
411#define lockdep_depth(tsk) (0) 413#define lockdep_depth(tsk) (0)
412 414
413#define lockdep_assert_held(l) do { } while (0) 415#define lockdep_assert_held(l) do { (void)(l); } while (0)
414 416
415#define lockdep_recursing(tsk) (0) 417#define lockdep_recursing(tsk) (0)
416 418
@@ -524,14 +526,17 @@ static inline void print_irqtrace_events(struct task_struct *curr)
524#ifdef CONFIG_DEBUG_LOCK_ALLOC 526#ifdef CONFIG_DEBUG_LOCK_ALLOC
525# ifdef CONFIG_PROVE_LOCKING 527# ifdef CONFIG_PROVE_LOCKING
526# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) 528# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i)
529# define rwsem_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i)
527# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i) 530# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i)
528# else 531# else
529# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) 532# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i)
533# define rwsem_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, n, i)
530# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i) 534# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i)
531# endif 535# endif
532# define rwsem_release(l, n, i) lock_release(l, n, i) 536# define rwsem_release(l, n, i) lock_release(l, n, i)
533#else 537#else
534# define rwsem_acquire(l, s, t, i) do { } while (0) 538# define rwsem_acquire(l, s, t, i) do { } while (0)
539# define rwsem_acquire_nest(l, s, t, n, i) do { } while (0)
535# define rwsem_acquire_read(l, s, t, i) do { } while (0) 540# define rwsem_acquire_read(l, s, t, i) do { } while (0)
536# define rwsem_release(l, n, i) do { } while (0) 541# define rwsem_release(l, n, i) do { } while (0)
537#endif 542#endif