Merge branch 'x86-spinlocks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / arch / x86 / include / asm / uv / uv_bau.h
index 37d3698..c568ccc 100644 (file)
@@ -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);
 }
 
 /*