Skip to content

Commit

Permalink
[IA64] Use atomic64_read to read an atomic64_t.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andreas Schwab authored and Tony Luck committed Aug 13, 2007
1 parent 71416be commit 6cba986
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/asm-ia64/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6cba986

Please sign in to comment.