diff options
Diffstat (limited to 'arch/s390/include/asm/spinlock.h')
-rw-r--r-- | arch/s390/include/asm/spinlock.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/s390/include/asm/spinlock.h b/arch/s390/include/asm/spinlock.h index d6bdf906caa5..0e37cd041241 100644 --- a/arch/s390/include/asm/spinlock.h +++ b/arch/s390/include/asm/spinlock.h | |||
@@ -18,14 +18,7 @@ extern int spin_retry; | |||
18 | static inline int | 18 | static inline int |
19 | _raw_compare_and_swap(unsigned int *lock, unsigned int old, unsigned int new) | 19 | _raw_compare_and_swap(unsigned int *lock, unsigned int old, unsigned int new) |
20 | { | 20 | { |
21 | unsigned int old_expected = old; | 21 | return __sync_bool_compare_and_swap(lock, old, new); |
22 | |||
23 | asm volatile( | ||
24 | " cs %0,%3,%1" | ||
25 | : "=d" (old), "=Q" (*lock) | ||
26 | : "0" (old), "d" (new), "Q" (*lock) | ||
27 | : "cc", "memory" ); | ||
28 | return old == old_expected; | ||
29 | } | 22 | } |
30 | 23 | ||
31 | /* | 24 | /* |