|
@@ -252,9 +252,9 @@ struct held_lock {
|
|
|
unsigned int trylock:1; /* 16 bits */
|
|
|
|
|
|
unsigned int read:2; /* see lock_acquire() comment */
|
|
|
- unsigned int check:2; /* see lock_acquire() comment */
|
|
|
+ unsigned int check:1; /* see lock_acquire() comment */
|
|
|
unsigned int hardirqs_off:1;
|
|
|
- unsigned int references:11; /* 32 bits */
|
|
|
+ unsigned int references:12; /* 32 bits */
|
|
|
};
|
|
|
|
|
|
/*
|
|
@@ -326,9 +326,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
|
|
|
*
|
|
|
* Values for check:
|
|
|
*
|
|
|
- * 0: disabled
|
|
|
- * 1: simple checks (freeing, held-at-exit-time, etc.)
|
|
|
- * 2: full validation
|
|
|
+ * 0: simple checks (freeing, held-at-exit-time, etc.)
|
|
|
+ * 1: full validation
|
|
|
*/
|
|
|
extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
|
|
|
int trylock, int read, int check,
|
|
@@ -479,15 +478,9 @@ static inline void print_irqtrace_events(struct task_struct *curr)
|
|
|
* on the per lock-class debug mode:
|
|
|
*/
|
|
|
|
|
|
-#ifdef CONFIG_PROVE_LOCKING
|
|
|
- #define lock_acquire_exclusive(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i)
|
|
|
- #define lock_acquire_shared(l, s, t, n, i) lock_acquire(l, s, t, 1, 2, n, i)
|
|
|
- #define lock_acquire_shared_recursive(l, s, t, n, i) lock_acquire(l, s, t, 2, 2, n, i)
|
|
|
-#else
|
|
|
- #define lock_acquire_exclusive(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, n, i)
|
|
|
- #define lock_acquire_shared(l, s, t, n, i) lock_acquire(l, s, t, 1, 1, n, i)
|
|
|
- #define lock_acquire_shared_recursive(l, s, t, n, i) lock_acquire(l, s, t, 2, 1, n, i)
|
|
|
-#endif
|
|
|
+#define lock_acquire_exclusive(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, n, i)
|
|
|
+#define lock_acquire_shared(l, s, t, n, i) lock_acquire(l, s, t, 1, 1, n, i)
|
|
|
+#define lock_acquire_shared_recursive(l, s, t, n, i) lock_acquire(l, s, t, 2, 1, n, i)
|
|
|
|
|
|
#define spin_acquire(l, s, t, i) lock_acquire_exclusive(l, s, t, NULL, i)
|
|
|
#define spin_acquire_nest(l, s, t, n, i) lock_acquire_exclusive(l, s, t, n, i)
|
|
@@ -518,13 +511,13 @@ static inline void print_irqtrace_events(struct task_struct *curr)
|
|
|
# define might_lock(lock) \
|
|
|
do { \
|
|
|
typecheck(struct lockdep_map *, &(lock)->dep_map); \
|
|
|
- lock_acquire(&(lock)->dep_map, 0, 0, 0, 2, NULL, _THIS_IP_); \
|
|
|
+ lock_acquire(&(lock)->dep_map, 0, 0, 0, 1, NULL, _THIS_IP_); \
|
|
|
lock_release(&(lock)->dep_map, 0, _THIS_IP_); \
|
|
|
} while (0)
|
|
|
# define might_lock_read(lock) \
|
|
|
do { \
|
|
|
typecheck(struct lockdep_map *, &(lock)->dep_map); \
|
|
|
- lock_acquire(&(lock)->dep_map, 0, 0, 1, 2, NULL, _THIS_IP_); \
|
|
|
+ lock_acquire(&(lock)->dep_map, 0, 0, 1, 1, NULL, _THIS_IP_); \
|
|
|
lock_release(&(lock)->dep_map, 0, _THIS_IP_); \
|
|
|
} while (0)
|
|
|
#else
|