[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <jewsw3oyl8.fsf@sykes.suse.de>
Date: Fri, 10 Aug 2007 23:42:59 +0200
From: Andreas Schwab <schwab@...e.de>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: "Chris Snook" <csnook@...hat.com>, <linux-kernel@...r.kernel.org>,
<linux-arch@...r.kernel.org>, <torvalds@...ux-foundation.org>,
<netdev@...r.kernel.org>, <akpm@...ux-foundation.org>,
<ak@...e.de>, <heiko.carstens@...ibm.com>, <davem@...emloft.net>,
<schwidefsky@...ibm.com>, <wensong@...ux-vs.org>,
<horms@...ge.net.au>, <wjiang@...ilience.com>,
<cfriesen@...tel.com>, <zlynx@....org>, <rpjday@...dspring.com>,
<jesper.juhl@...il.com>
Subject: Re: [PATCH 9/24] make atomic_read() behave consistently on ia64
"Luck, Tony" <tony.luck@...el.com> writes:
>> That's distressing. I'm about to resubmit with a volatile cast in
>> atomic_set as well, since people expect that behavior and I've been
>> shown a legitimate case where it could matter. Does the assembly look
>> right with that cast in atomic_set() as well?
>
> No. With the casts to volatile in atomic_set and atomic64_set I
> still see places where ld8 is changed to ld4 + sign-extend.
Use atomic64_read to read an atomic64_t.
Signed-off-by: Andreas Schwab <schwab@...e.de>
diff --git a/include/asm-ia64/atomic.h b/include/asm-ia64/atomic.h
index 1fc3b83..50c2b83 100644
--- a/include/asm-ia64/atomic.h
+++ b/include/asm-ia64/atomic.h
@@ -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;
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@...e.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists