diff options
Diffstat (limited to 'include/asm-i386/spinlock.h')
-rw-r--r-- | include/asm-i386/spinlock.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/include/asm-i386/spinlock.h b/include/asm-i386/spinlock.h index d816c62a7a1d..d1020363c41a 100644 --- a/include/asm-i386/spinlock.h +++ b/include/asm-i386/spinlock.h | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #define __raw_spin_lock_string \ | 23 | #define __raw_spin_lock_string \ |
24 | "\n1:\t" \ | 24 | "\n1:\t" \ |
25 | "lock ; decb %0\n\t" \ | 25 | LOCK_PREFIX " ; decb %0\n\t" \ |
26 | "jns 3f\n" \ | 26 | "jns 3f\n" \ |
27 | "2:\t" \ | 27 | "2:\t" \ |
28 | "rep;nop\n\t" \ | 28 | "rep;nop\n\t" \ |
@@ -38,7 +38,7 @@ | |||
38 | */ | 38 | */ |
39 | #define __raw_spin_lock_string_flags \ | 39 | #define __raw_spin_lock_string_flags \ |
40 | "\n1:\t" \ | 40 | "\n1:\t" \ |
41 | "lock ; decb %0\n\t" \ | 41 | LOCK_PREFIX " ; decb %0\n\t" \ |
42 | "jns 5f\n" \ | 42 | "jns 5f\n" \ |
43 | "2:\t" \ | 43 | "2:\t" \ |
44 | "testl $0x200, %1\n\t" \ | 44 | "testl $0x200, %1\n\t" \ |
@@ -57,15 +57,9 @@ | |||
57 | "jmp 4b\n" \ | 57 | "jmp 4b\n" \ |
58 | "5:\n\t" | 58 | "5:\n\t" |
59 | 59 | ||
60 | #define __raw_spin_lock_string_up \ | ||
61 | "\n\tdecb %0" | ||
62 | |||
63 | static inline void __raw_spin_lock(raw_spinlock_t *lock) | 60 | static inline void __raw_spin_lock(raw_spinlock_t *lock) |
64 | { | 61 | { |
65 | alternative_smp( | 62 | asm(__raw_spin_lock_string : "+m" (lock->slock) : : "memory"); |
66 | __raw_spin_lock_string, | ||
67 | __raw_spin_lock_string_up, | ||
68 | "+m" (lock->slock) : : "memory"); | ||
69 | } | 63 | } |
70 | 64 | ||
71 | /* | 65 | /* |
@@ -76,10 +70,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) | |||
76 | #ifndef CONFIG_PROVE_LOCKING | 70 | #ifndef CONFIG_PROVE_LOCKING |
77 | static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) | 71 | static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) |
78 | { | 72 | { |
79 | alternative_smp( | 73 | asm(__raw_spin_lock_string_flags : "+m" (lock->slock) : "r" (flags) : "memory"); |
80 | __raw_spin_lock_string_flags, | ||
81 | __raw_spin_lock_string_up, | ||
82 | "+m" (lock->slock) : "r" (flags) : "memory"); | ||
83 | } | 74 | } |
84 | #endif | 75 | #endif |
85 | 76 | ||