Commit 6cba9862 authored by Andreas Schwab's avatar Andreas Schwab Committed by Tony Luck

[IA64] Use atomic64_read to read an atomic64_t.

The routines ia64_atomic64_{add,sub} mistakenly use
atomic_read() to grab the old value instead of using
atomic64_read().
Signed-off-by: default avatarAndreas Schwab <schwab@suse.de>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 71416bea
...@@ -55,7 +55,7 @@ ia64_atomic64_add (__s64 i, atomic64_t *v) ...@@ -55,7 +55,7 @@ ia64_atomic64_add (__s64 i, atomic64_t *v)
do { do {
CMPXCHG_BUGCHECK(v); CMPXCHG_BUGCHECK(v);
old = atomic_read(v); old = atomic64_read(v);
new = old + i; new = old + i;
} while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old); } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old);
return new; return new;
...@@ -83,7 +83,7 @@ ia64_atomic64_sub (__s64 i, atomic64_t *v) ...@@ -83,7 +83,7 @@ ia64_atomic64_sub (__s64 i, atomic64_t *v)
do { do {
CMPXCHG_BUGCHECK(v); CMPXCHG_BUGCHECK(v);
old = atomic_read(v); old = atomic64_read(v);
new = old - i; new = old - i;
} while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old); } while (ia64_cmpxchg(acq, v, old, new, sizeof(atomic64_t)) != old);
return new; return new;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment