]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/lockdep.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
[linux-2.6-omap-h63xx.git] / include / linux / lockdep.h
index 93a8cc02a033cd36c4f1c92e66852a8e2e924bf8..331e5f1c2d8ec4439bc69294337dc1b00345f3d8 100644 (file)
@@ -190,8 +190,13 @@ struct lock_chain {
        u64                             chain_key;
 };
 
-#define MAX_LOCKDEP_KEYS_BITS          11
-#define MAX_LOCKDEP_KEYS               (1UL << MAX_LOCKDEP_KEYS_BITS)
+#define MAX_LOCKDEP_KEYS_BITS          13
+/*
+ * Subtract one because we offset hlock->class_idx by 1 in order
+ * to make 0 mean no class. This avoids overflowing the class_idx
+ * bitfield and hitting the BUG in hlock_class().
+ */
+#define MAX_LOCKDEP_KEYS               ((1UL << MAX_LOCKDEP_KEYS_BITS) - 1)
 
 struct held_lock {
        /*
@@ -410,8 +415,10 @@ static inline void print_irqtrace_events(struct task_struct *curr)
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
 # ifdef CONFIG_PROVE_LOCKING
 #  define spin_acquire(l, s, t, i)             lock_acquire(l, s, t, 0, 2, NULL, i)
+#  define spin_acquire_nest(l, s, t, n, i)     lock_acquire(l, s, t, 0, 2, n, i)
 # else
 #  define spin_acquire(l, s, t, i)             lock_acquire(l, s, t, 0, 1, NULL, i)
+#  define spin_acquire_nest(l, s, t, n, i)     lock_acquire(l, s, t, 0, 1, NULL, i)
 # endif
 # define spin_release(l, n, i)                 lock_release(l, n, i)
 #else
@@ -463,14 +470,14 @@ static inline void print_irqtrace_events(struct task_struct *curr)
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
 # ifdef CONFIG_PROVE_LOCKING
-#  define map_acquire(l)               lock_acquire(l, 0, 0, 0, 2, NULL, _THIS_IP_)
+#  define lock_map_acquire(l)          lock_acquire(l, 0, 0, 0, 2, NULL, _THIS_IP_)
 # else
-#  define map_acquire(l)               lock_acquire(l, 0, 0, 0, 1, NULL, _THIS_IP_)
+#  define lock_map_acquire(l)          lock_acquire(l, 0, 0, 0, 1, NULL, _THIS_IP_)
 # endif
-# define map_release(l)                        lock_release(l, 1, _THIS_IP_)
+# define lock_map_release(l)                   lock_release(l, 1, _THIS_IP_)
 #else
-# define map_acquire(l)                        do { } while (0)
-# define map_release(l)                        do { } while (0)
+# define lock_map_acquire(l)                   do { } while (0)
+# define lock_map_release(l)                   do { } while (0)
 #endif
 
 #endif /* __LINUX_LOCKDEP_H */