[ARM] 4187/1: iop: unify time implementation across iop32x, iop33x, and iop13xx
[powerpc.git] / include / linux / spinlock.h
index b800d2d..94b767d 100644 (file)
@@ -52,6 +52,7 @@
 #include <linux/thread_info.h>
 #include <linux/kernel.h>
 #include <linux/stringify.h>
+#include <linux/bottom_half.h>
 
 #include <asm/system.h>
 
@@ -183,13 +184,27 @@ do {                                                              \
 #define read_lock(lock)                        _read_lock(lock)
 
 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
+
 #define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock)
 #define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock)
 #define write_lock_irqsave(lock, flags)        flags = _write_lock_irqsave(lock)
+
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+#define spin_lock_irqsave_nested(lock, flags, subclass) \
+       flags = _spin_lock_irqsave_nested(lock, subclass)
+#else
+#define spin_lock_irqsave_nested(lock, flags, subclass) \
+       flags = _spin_lock_irqsave(lock)
+#endif
+
 #else
+
 #define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags)
 #define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags)
 #define write_lock_irqsave(lock, flags)        _write_lock_irqsave(lock, flags)
+#define spin_lock_irqsave_nested(lock, flags, subclass)        \
+       spin_lock_irqsave(lock, flags)
+
 #endif
 
 #define spin_lock_irq(lock)            _spin_lock_irq(lock)