diff options
Diffstat (limited to 'include/asm-x86/spinlock_32.h')
-rw-r--r-- | include/asm-x86/spinlock_32.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-x86/spinlock_32.h b/include/asm-x86/spinlock_32.h index fca124a1103d..e7a14ab906e9 100644 --- a/include/asm-x86/spinlock_32.h +++ b/include/asm-x86/spinlock_32.h | |||
@@ -156,11 +156,11 @@ static inline void __raw_read_lock(raw_rwlock_t *rw) | |||
156 | 156 | ||
157 | static inline void __raw_write_lock(raw_rwlock_t *rw) | 157 | static inline void __raw_write_lock(raw_rwlock_t *rw) |
158 | { | 158 | { |
159 | asm volatile(LOCK_PREFIX " subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" | 159 | asm volatile(LOCK_PREFIX " subl %1,(%0)\n\t" |
160 | "jz 1f\n" | 160 | "jz 1f\n" |
161 | "call __write_lock_failed\n\t" | 161 | "call __write_lock_failed\n\t" |
162 | "1:\n" | 162 | "1:\n" |
163 | ::"a" (rw) : "memory"); | 163 | ::"a" (rw), "i" (RW_LOCK_BIAS) : "memory"); |
164 | } | 164 | } |
165 | 165 | ||
166 | static inline int __raw_read_trylock(raw_rwlock_t *lock) | 166 | static inline int __raw_read_trylock(raw_rwlock_t *lock) |
@@ -191,8 +191,8 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) | |||
191 | 191 | ||
192 | static inline void __raw_write_unlock(raw_rwlock_t *rw) | 192 | static inline void __raw_write_unlock(raw_rwlock_t *rw) |
193 | { | 193 | { |
194 | asm volatile(LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ", %0" | 194 | asm volatile(LOCK_PREFIX "addl %1, %0" |
195 | : "+m" (rw->lock) : : "memory"); | 195 | : "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory"); |
196 | } | 196 | } |
197 | 197 | ||
198 | #define _raw_spin_relax(lock) cpu_relax() | 198 | #define _raw_spin_relax(lock) cpu_relax() |