From c437d3660f90e5a2859815173e6fe512d2d1a7f4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 30 Jan 2008 13:30:34 +0100 Subject: [PATCH] --- yaml --- r: 79801 b: refs/heads/master c: 6514f93a2ce643ef5914eae7ce49b978e1d356aa h: refs/heads/master i: 79799: 0fc58bfdaee98cffb757034d446f4fa9867cc86d v: v3 --- [refs] | 2 +- trunk/include/asm-x86/rwlock.h | 1 - trunk/include/asm-x86/spinlock_32.h | 8 ++++---- trunk/include/asm-x86/spinlock_64.h | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 9664391b2f87..1ee957eb58b4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a33fff3a033f2e8a930067ad608c21e1f86bffab +refs/heads/master: 6514f93a2ce643ef5914eae7ce49b978e1d356aa diff --git a/trunk/include/asm-x86/rwlock.h b/trunk/include/asm-x86/rwlock.h index f2b64a429e6b..6a8c0d645108 100644 --- a/trunk/include/asm-x86/rwlock.h +++ b/trunk/include/asm-x86/rwlock.h @@ -2,7 +2,6 @@ #define _ASM_X86_RWLOCK_H #define RW_LOCK_BIAS 0x01000000 -#define RW_LOCK_BIAS_STR "0x01000000" /* Actual code is in asm/spinlock.h or in arch/x86/lib/rwlock.S */ diff --git a/trunk/include/asm-x86/spinlock_32.h b/trunk/include/asm-x86/spinlock_32.h index fca124a1103d..e7a14ab906e9 100644 --- a/trunk/include/asm-x86/spinlock_32.h +++ b/trunk/include/asm-x86/spinlock_32.h @@ -156,11 +156,11 @@ static inline void __raw_read_lock(raw_rwlock_t *rw) static inline void __raw_write_lock(raw_rwlock_t *rw) { - asm volatile(LOCK_PREFIX " subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" + asm volatile(LOCK_PREFIX " subl %1,(%0)\n\t" "jz 1f\n" "call __write_lock_failed\n\t" "1:\n" - ::"a" (rw) : "memory"); + ::"a" (rw), "i" (RW_LOCK_BIAS) : "memory"); } static inline int __raw_read_trylock(raw_rwlock_t *lock) @@ -191,8 +191,8 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) static inline void __raw_write_unlock(raw_rwlock_t *rw) { - asm volatile(LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ", %0" - : "+m" (rw->lock) : : "memory"); + asm volatile(LOCK_PREFIX "addl %1, %0" + : "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory"); } #define _raw_spin_relax(lock) cpu_relax() diff --git a/trunk/include/asm-x86/spinlock_64.h b/trunk/include/asm-x86/spinlock_64.h index e81f6c18d877..ab50e7f51058 100644 --- a/trunk/include/asm-x86/spinlock_64.h +++ b/trunk/include/asm-x86/spinlock_64.h @@ -127,7 +127,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw) "jns 1f\n" "call __read_lock_failed\n\t" "1:\n" - ::"D" (rw), "i" (RW_LOCK_BIAS) : "memory"); + ::"D" (rw) : "memory"); } static inline void __raw_write_lock(raw_rwlock_t *rw) @@ -167,8 +167,8 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) static inline void __raw_write_unlock(raw_rwlock_t *rw) { - asm volatile(LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ", %0" - : "+m" (rw->lock) : : "memory"); + asm volatile(LOCK_PREFIX "addl %1, %0" + : "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory"); } #define _raw_spin_relax(lock) cpu_relax()