From b9b5cab9b9cf157e245195d60ace0dd2c6f54d26 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Fri, 3 Jul 2009 13:26:41 +0200 Subject: [PATCH] --- yaml --- r: 155210 b: refs/heads/master c: 69237f94e65d3d7f539f1adb98ef68685c595004 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/lib/atomic64_32.c | 19 +++++++------------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 0bc199d4ed37..7b25ffc3982e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: aacf682fd8c66b57383c407eecd9d4a28264ee91 +refs/heads/master: 69237f94e65d3d7f539f1adb98ef68685c595004 diff --git a/trunk/arch/x86/lib/atomic64_32.c b/trunk/arch/x86/lib/atomic64_32.c index afa5d444918b..5fc1e2caa544 100644 --- a/trunk/arch/x86/lib/atomic64_32.c +++ b/trunk/arch/x86/lib/atomic64_32.c @@ -6,19 +6,14 @@ static inline u64 cmpxchg8b(u64 *ptr, u64 old, u64 new) { - asm volatile( - - LOCK_PREFIX "cmpxchg8b (%[ptr])\n" - - : "=A" (old) - - : [ptr] "D" (ptr), - "A" (old), - "b" (ll_low(new)), - "c" (ll_high(new)) - - : "memory"); + u32 low = new; + u32 high = new >> 32; + asm volatile( + LOCK_PREFIX "cmpxchg8b %1\n" + : "+A" (old), "+m" (*ptr) + : "b" (low), "c" (high) + ); return old; }