diff options
Diffstat (limited to 'include/asm-i386/spinlock.h')
| -rw-r--r-- | include/asm-i386/spinlock.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h index 04ba30234c48..87c40f830653 100644 --- a/include/asm-i386/spinlock.h +++ b/include/asm-i386/spinlock.h | |||
| @@ -31,6 +31,11 @@ | |||
| 31 | "jmp 1b\n" \ | 31 | "jmp 1b\n" \ |
| 32 | "3:\n\t" | 32 | "3:\n\t" |
| 33 | 33 | ||
| 34 | /* | ||
| 35 | * NOTE: there's an irqs-on section here, which normally would have to be | ||
| 36 | * irq-traced, but on CONFIG_TRACE_IRQFLAGS we never use | ||
| 37 | * __raw_spin_lock_string_flags(). | ||
| 38 | */ | ||
| 34 | #define __raw_spin_lock_string_flags \ | 39 | #define __raw_spin_lock_string_flags \ |
| 35 | "\n1:\t" \ | 40 | "\n1:\t" \ |
| 36 | "lock ; decb %0\n\t" \ | 41 | "lock ; decb %0\n\t" \ |
| @@ -63,6 +68,12 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) | |||
| 63 | "=m" (lock->slock) : : "memory"); | 68 | "=m" (lock->slock) : : "memory"); |
| 64 | } | 69 | } |
| 65 | 70 | ||
| 71 | /* | ||
| 72 | * It is easier for the lock validator if interrupts are not re-enabled | ||
| 73 | * in the middle of a lock-acquire. This is a performance feature anyway | ||
| 74 | * so we turn it off: | ||
| 75 | */ | ||
| 76 | #ifndef CONFIG_PROVE_LOCKING | ||
| 66 | static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) | 77 | static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) |
| 67 | { | 78 | { |
| 68 | alternative_smp( | 79 | alternative_smp( |
| @@ -70,6 +81,7 @@ static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long fla | |||
| 70 | __raw_spin_lock_string_up, | 81 | __raw_spin_lock_string_up, |
| 71 | "=m" (lock->slock) : "r" (flags) : "memory"); | 82 | "=m" (lock->slock) : "r" (flags) : "memory"); |
| 72 | } | 83 | } |
| 84 | #endif | ||
| 73 | 85 | ||
| 74 | static inline int __raw_spin_trylock(raw_spinlock_t *lock) | 86 | static inline int __raw_spin_trylock(raw_spinlock_t *lock) |
| 75 | { | 87 | { |
