diff options
Diffstat (limited to 'include/asm-x86_64/spinlock.h')
-rw-r--r-- | include/asm-x86_64/spinlock.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/asm-x86_64/spinlock.h b/include/asm-x86_64/spinlock.h index 5d8a5e3589ff..8d3421996f94 100644 --- a/include/asm-x86_64/spinlock.h +++ b/include/asm-x86_64/spinlock.h | |||
@@ -31,15 +31,19 @@ | |||
31 | "jmp 1b\n" \ | 31 | "jmp 1b\n" \ |
32 | LOCK_SECTION_END | 32 | LOCK_SECTION_END |
33 | 33 | ||
34 | #define __raw_spin_lock_string_up \ | ||
35 | "\n\tdecl %0" | ||
36 | |||
34 | #define __raw_spin_unlock_string \ | 37 | #define __raw_spin_unlock_string \ |
35 | "movl $1,%0" \ | 38 | "movl $1,%0" \ |
36 | :"=m" (lock->slock) : : "memory" | 39 | :"=m" (lock->slock) : : "memory" |
37 | 40 | ||
38 | static inline void __raw_spin_lock(raw_spinlock_t *lock) | 41 | static inline void __raw_spin_lock(raw_spinlock_t *lock) |
39 | { | 42 | { |
40 | __asm__ __volatile__( | 43 | alternative_smp( |
41 | __raw_spin_lock_string | 44 | __raw_spin_lock_string, |
42 | :"=m" (lock->slock) : : "memory"); | 45 | __raw_spin_lock_string_up, |
46 | "=m" (lock->slock) : : "memory"); | ||
43 | } | 47 | } |
44 | 48 | ||
45 | #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) | 49 | #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) |