diff options
Diffstat (limited to 'include/linux/spinlock.h')
-rw-r--r-- | include/linux/spinlock.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index b800d2d68b32..94b767d64275 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/thread_info.h> | 52 | #include <linux/thread_info.h> |
53 | #include <linux/kernel.h> | 53 | #include <linux/kernel.h> |
54 | #include <linux/stringify.h> | 54 | #include <linux/stringify.h> |
55 | #include <linux/bottom_half.h> | ||
55 | 56 | ||
56 | #include <asm/system.h> | 57 | #include <asm/system.h> |
57 | 58 | ||
@@ -183,13 +184,27 @@ do { \ | |||
183 | #define read_lock(lock) _read_lock(lock) | 184 | #define read_lock(lock) _read_lock(lock) |
184 | 185 | ||
185 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | 186 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) |
187 | |||
186 | #define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock) | 188 | #define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock) |
187 | #define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock) | 189 | #define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock) |
188 | #define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock) | 190 | #define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock) |
191 | |||
192 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
193 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | ||
194 | flags = _spin_lock_irqsave_nested(lock, subclass) | ||
195 | #else | ||
196 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | ||
197 | flags = _spin_lock_irqsave(lock) | ||
198 | #endif | ||
199 | |||
189 | #else | 200 | #else |
201 | |||
190 | #define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags) | 202 | #define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags) |
191 | #define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags) | 203 | #define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags) |
192 | #define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags) | 204 | #define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags) |
205 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | ||
206 | spin_lock_irqsave(lock, flags) | ||
207 | |||
193 | #endif | 208 | #endif |
194 | 209 | ||
195 | #define spin_lock_irq(lock) _spin_lock_irq(lock) | 210 | #define spin_lock_irq(lock) _spin_lock_irq(lock) |