[IA64] Use atomic64_read to read an atomic64_t.
authorAndreas Schwab <schwab@suse.de>
Fri, 10 Aug 2007 21:42:59 +0000 (23:42 +0200)
committerTony Luck <tony.luck@intel.com>
Mon, 13 Aug 2007 17:21:04 +0000 (10:21 -0700)
The routines ia64_atomic64_{add,sub} mistakenly use
atomic_read() to grab the old value instead of using
atomic64_read().

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
include/asm-ia64/atomic.h

index 1fc3b83..50c2b83 100644 (file)
@@ -55,7 +55,7 @@ ia64_atomic64_add (__s64 i, atomic64_t *v)
 
        do {
                CMPXCHG_BUGCHECK(v);
-               old = atomic_read(v);
+               old = atomic64_read(v);
                new = old + i;
        } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old);
        return new;
@@ -83,7 +83,7 @@ ia64_atomic64_sub (__s64 i, atomic64_t *v)
 
        do {
                CMPXCHG_BUGCHECK(v);
-               old = atomic_read(v);
+               old = atomic64_read(v);
                new = old - i;
        } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old);
        return new;