aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/spinlock_64.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-01-30 13:30:34 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:30:34 +0100
commit6514f93a2ce643ef5914eae7ce49b978e1d356aa (patch)
tree048b77dbd62677bdcaba692e626dfc070ef0d28f /include/asm-x86/spinlock_64.h
parentx86: fix asm constraints in spinlock_32/64.h (diff)
downloadlinux-dev-6514f93a2ce643ef5914eae7ce49b978e1d356aa.tar.xz
linux-dev-6514f93a2ce643ef5914eae7ce49b978e1d356aa.zip
x86: use immediates instead of RW_LOCK_BIAS_STR
Use immediate instead of the RW_LOCK_BIAS_STR. Makes the code more readable and gets rid of the string constant. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to '')
-rw-r--r--include/asm-x86/spinlock_64.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-x86/spinlock_64.h b/include/asm-x86/spinlock_64.h
index e81f6c18d877..ab50e7f51058 100644
--- a/include/asm-x86/spinlock_64.h
+++ b/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()