diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2011-08-23 19:59:58 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-08-29 16:44:12 -0400 |
commit | 8b8bc2f7311c3223213dbe346d9cc2e299fdb5eb (patch) | |
tree | 50a2f0faa3762084336be4f97c03a97b14b22262 /arch/x86/include/asm/uv | |
parent | 433b3520616be694e0aa777089346c8718c91a7b (diff) |
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')
-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) | |||
656 | */ | 656 | */ |
657 | static inline int atom_asr(short i, struct atomic_short *v) | 657 | static inline int atom_asr(short i, struct atomic_short *v) |
658 | { | 658 | { |
659 | short __i = i; | 659 | return i + xadd(&v->counter, i); |
660 | asm volatile(LOCK_PREFIX "xaddw %0, %1" | ||
661 | : "+r" (i), "+m" (v->counter) | ||
662 | : : "memory"); | ||
663 | return i + __i; | ||
664 | } | 660 | } |
665 | 661 | ||
666 | /* | 662 | /* |