Subject: Re: [PATCH] atomic_dec_if_positive sign extension fix

From: Olof Johansson <[email-masked]>
Date: Sun, 14 Jan 2007 17:20:13 -0600

On Mon, 15 Jan 2007 10:09:42 +1100 Paul Mackerras <[email-masked]> 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