x86: Fix atomic_long_xchg() on 64bit
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 2 Jun 2009 15:01:58 +0000 (17:01 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 2 Jun 2009 19:45:29 +0000 (21:45 +0200)
Apparently I'm the first to use it :-)

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/asm-generic/atomic.h

index 3673a13b6703fd22fea48db3443fb0a92a5fea52..81d3be459efb55e931662ad492c072749538d5e8 100644 (file)
@@ -134,7 +134,7 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
 #define atomic_long_cmpxchg(l, old, new) \
        (atomic64_cmpxchg((atomic64_t *)(l), (old), (new)))
 #define atomic_long_xchg(v, new) \
-       (atomic64_xchg((atomic64_t *)(l), (new)))
+       (atomic64_xchg((atomic64_t *)(v), (new)))
 
 #else  /*  BITS_PER_LONG == 64  */