aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-17 11:56:43 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-17 11:56:43 -0400
commit43f82216f0bd114599f4a221ae6924f3658a0c9a (patch)
tree89dbd85a0a1882ae38e6b61e360b365c018195fd /kernel/lockdep.c
parent20f85957667ccc53183b5ffac22213d75e317408 (diff)
parentb435fdcda126db42343b8055d04a0a27c229717b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: fm801-gp - handle errors from pci_enable_device() Input: gameport core - handle errors returned by device_bind_driver() Input: serio core - handle errors returned by device_bind_driver() Lockdep: fix compile error in drivers/input/serio/serio.c Input: serio - add lockdep annotations Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass() Input: atkbd - supress "too many keys" error message Input: i8042 - supress ACK/NAKs when blinking during panic Input: add missing exports to fix modular build
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r--kernel/lockdep.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index d1a3b2cfe4a9..b739be2a6dc9 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -1176,7 +1176,7 @@ look_up_lock_class(struct lockdep_map *lock, unsigned int subclass)
1176 * itself, so actual lookup of the hash should be once per lock object. 1176 * itself, so actual lookup of the hash should be once per lock object.
1177 */ 1177 */
1178static inline struct lock_class * 1178static inline struct lock_class *
1179register_lock_class(struct lockdep_map *lock, unsigned int subclass) 1179register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)
1180{ 1180{
1181 struct lockdep_subclass_key *key; 1181 struct lockdep_subclass_key *key;
1182 struct list_head *hash_head; 1182 struct list_head *hash_head;
@@ -1248,7 +1248,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass)
1248out_unlock_set: 1248out_unlock_set:
1249 __raw_spin_unlock(&hash_lock); 1249 __raw_spin_unlock(&hash_lock);
1250 1250
1251 if (!subclass) 1251 if (!subclass || force)
1252 lock->class_cache = class; 1252 lock->class_cache = class;
1253 1253
1254 DEBUG_LOCKS_WARN_ON(class->subclass != subclass); 1254 DEBUG_LOCKS_WARN_ON(class->subclass != subclass);
@@ -1936,7 +1936,7 @@ void trace_softirqs_off(unsigned long ip)
1936 * Initialize a lock instance's lock-class mapping info: 1936 * Initialize a lock instance's lock-class mapping info:
1937 */ 1937 */
1938void lockdep_init_map(struct lockdep_map *lock, const char *name, 1938void lockdep_init_map(struct lockdep_map *lock, const char *name,
1939 struct lock_class_key *key) 1939 struct lock_class_key *key, int subclass)
1940{ 1940{
1941 if (unlikely(!debug_locks)) 1941 if (unlikely(!debug_locks))
1942 return; 1942 return;
@@ -1956,6 +1956,8 @@ void lockdep_init_map(struct lockdep_map *lock, const char *name,
1956 lock->name = name; 1956 lock->name = name;
1957 lock->key = key; 1957 lock->key = key;
1958 lock->class_cache = NULL; 1958 lock->class_cache = NULL;
1959 if (subclass)
1960 register_lock_class(lock, subclass, 1);
1959} 1961}
1960 1962
1961EXPORT_SYMBOL_GPL(lockdep_init_map); 1963EXPORT_SYMBOL_GPL(lockdep_init_map);
@@ -1994,7 +1996,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
1994 * Not cached yet or subclass? 1996 * Not cached yet or subclass?
1995 */ 1997 */
1996 if (unlikely(!class)) { 1998 if (unlikely(!class)) {
1997 class = register_lock_class(lock, subclass); 1999 class = register_lock_class(lock, subclass, 0);
1998 if (!class) 2000 if (!class)
1999 return 0; 2001 return 0;
2000 } 2002 }