diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2011-08-23 16:59:58 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-08-29 13:44:12 -0700 |
commit | 8b8bc2f7311c3223213dbe346d9cc2e299fdb5eb (patch) | |
tree | 50a2f0faa3762084336be4f97c03a97b14b22262 /arch/x86/include/asm/uv/uv_bau.h | |
parent | 433b3520616be694e0aa777089346c8718c91a7b (diff) | |
download | linux-8b8bc2f7311c3223213dbe346d9cc2e299fdb5eb.tar.gz linux-8b8bc2f7311c3223213dbe346d9cc2e299fdb5eb.tar.bz2 linux-8b8bc2f7311c3223213dbe346d9cc2e299fdb5eb.zip |
x86: Use xadd helper more widely
This covers the trivial cases from open-coded xadd to the xadd macros.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Link: http://lkml.kernel.org/r/4E5BCC40.3030501@goop.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/include/asm/uv/uv_bau.h')
-rw-r--r-- | arch/x86/include/asm/uv/uv_bau.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h index 37d369859c8e..c568ccca6e0e 100644 --- a/arch/x86/include/asm/uv/uv_bau.h +++ b/arch/x86/include/asm/uv/uv_bau.h @@ -656,11 +656,7 @@ static inline int atomic_read_short(const struct atomic_short *v) */ static inline int atom_asr(short i, struct atomic_short *v) { - short __i = i; - asm volatile(LOCK_PREFIX "xaddw %0, %1" - : "+r" (i), "+m" (v->counter) - : : "memory"); - return i + __i; + return i + xadd(&v->counter, i); } /* |