diff options
author | Peter Zijlstra <peterz@infradead.org> | 2010-03-18 20:37:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-21 12:37:30 -0400 |
commit | 1704f47b50b5d9e1b825e43e1baaf2c5897baf03 (patch) | |
tree | 60617ff867624f915f75a502f2207de5e586757a /include | |
parent | 3142788b7967ccfd2f1813ee9e11aeb1e1cf7de2 (diff) |
lockdep: Add novalidate class for dev->mutex conversion
The conversion of device->sem to device->mutex resulted in lockdep
warnings. Create a novalidate class for now until the driver folks
come up with separate classes. That way we have at least the basic
mutex debugging coverage.
Add a checkpatch error so the usage is reserved for device->mutex.
[ tglx: checkpatch and compile fix for LOCKDEP=n ]
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/lockdep.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index a03977a96d7e..06aed8305bf3 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -44,6 +44,8 @@ struct lock_class_key { | |||
44 | struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES]; | 44 | struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES]; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | extern struct lock_class_key __lockdep_no_validate__; | ||
48 | |||
47 | #define LOCKSTAT_POINTS 4 | 49 | #define LOCKSTAT_POINTS 4 |
48 | 50 | ||
49 | /* | 51 | /* |
@@ -270,6 +272,9 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name, | |||
270 | #define lockdep_set_subclass(lock, sub) \ | 272 | #define lockdep_set_subclass(lock, sub) \ |
271 | lockdep_init_map(&(lock)->dep_map, #lock, \ | 273 | lockdep_init_map(&(lock)->dep_map, #lock, \ |
272 | (lock)->dep_map.key, sub) | 274 | (lock)->dep_map.key, sub) |
275 | |||
276 | #define lockdep_set_novalidate_class(lock) \ | ||
277 | lockdep_set_class(lock, &__lockdep_no_validate__) | ||
273 | /* | 278 | /* |
274 | * Compare locking classes | 279 | * Compare locking classes |
275 | */ | 280 | */ |
@@ -354,6 +359,9 @@ static inline void lockdep_on(void) | |||
354 | #define lockdep_set_class_and_subclass(lock, key, sub) \ | 359 | #define lockdep_set_class_and_subclass(lock, key, sub) \ |
355 | do { (void)(key); } while (0) | 360 | do { (void)(key); } while (0) |
356 | #define lockdep_set_subclass(lock, sub) do { } while (0) | 361 | #define lockdep_set_subclass(lock, sub) do { } while (0) |
362 | |||
363 | #define lockdep_set_novalidate_class(lock) do { } while (0) | ||
364 | |||
357 | /* | 365 | /* |
358 | * We don't define lockdep_match_class() and lockdep_match_key() for !LOCKDEP | 366 | * We don't define lockdep_match_class() and lockdep_match_key() for !LOCKDEP |
359 | * case since the result is not well defined and the caller should rather | 367 | * case since the result is not well defined and the caller should rather |