[PATCH] atomic_dec_if_positive sign extension fix
Olof Johansson
olof at lixom.net
Mon Jan 15 10:20:13 EST 2007
On Mon, 15 Jan 2007 10:09:42 +1100 Paul Mackerras <paulus at samba.org> wrote:
> NAK: Good fix for 64-bit, but it will break 32-bit. I think a better
> fix would be to use a cmpwi after the lwarx, and use addi rather than
> addic..
Good point, I forgot about that when I suggested extsw to Rob.
Seems like spinlock.h solves the same problem by using a
__DO_SIGN_EXTEND define instead. Should we keep logic common as much as
possible and use the same method in atomic.h?
-Olof
More information about the Linuxppc-dev
mailing list