diff options
-rw-r--r-- | arch/x86/lib/atomic64_32.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/x86/lib/atomic64_32.c b/arch/x86/lib/atomic64_32.c index afa5d444918b..5fc1e2caa544 100644 --- a/arch/x86/lib/atomic64_32.c +++ b/arch/x86/lib/atomic64_32.c | |||
@@ -6,19 +6,14 @@ | |||
6 | 6 | ||
7 | static inline u64 cmpxchg8b(u64 *ptr, u64 old, u64 new) | 7 | static inline u64 cmpxchg8b(u64 *ptr, u64 old, u64 new) |
8 | { | 8 | { |
9 | asm volatile( | 9 | u32 low = new; |
10 | 10 | u32 high = new >> 32; | |
11 | LOCK_PREFIX "cmpxchg8b (%[ptr])\n" | ||
12 | |||
13 | : "=A" (old) | ||
14 | |||
15 | : [ptr] "D" (ptr), | ||
16 | "A" (old), | ||
17 | "b" (ll_low(new)), | ||
18 | "c" (ll_high(new)) | ||
19 | |||
20 | : "memory"); | ||
21 | 11 | ||
12 | asm volatile( | ||
13 | LOCK_PREFIX "cmpxchg8b %1\n" | ||
14 | : "+A" (old), "+m" (*ptr) | ||
15 | : "b" (low), "c" (high) | ||
16 | ); | ||
22 | return old; | 17 | return old; |
23 | } | 18 | } |
24 | 19 | ||