diff options
Diffstat (limited to 'include/linux/spinlock.h')
-rw-r--r-- | include/linux/spinlock.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index b800d2d68b32..8451052ca66f 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -183,13 +183,27 @@ do { \ | |||
183 | #define read_lock(lock) _read_lock(lock) | 183 | #define read_lock(lock) _read_lock(lock) |
184 | 184 | ||
185 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | 185 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) |
186 | |||
186 | #define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock) | 187 | #define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock) |
187 | #define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock) | 188 | #define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock) |
188 | #define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock) | 189 | #define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock) |
190 | |||
191 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
192 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | ||
193 | flags = _spin_lock_irqsave_nested(lock, subclass) | ||
194 | #else | ||
195 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | ||
196 | flags = _spin_lock_irqsave(lock) | ||
197 | #endif | ||
198 | |||
189 | #else | 199 | #else |
200 | |||
190 | #define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags) | 201 | #define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags) |
191 | #define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags) | 202 | #define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags) |
192 | #define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags) | 203 | #define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags) |
204 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | ||
205 | spin_lock_irqsave(lock, flags) | ||
206 | |||
193 | #endif | 207 | #endif |
194 | 208 | ||
195 | #define spin_lock_irq(lock) _spin_lock_irq(lock) | 209 | #define spin_lock_irq(lock) _spin_lock_irq(lock) |