Re: [git pull] ia64 changes

Linus Torvalds
2009-09-27T00:08:46Z

On Sat, 26 Sep 2009, Linus Torvalds wrote:
>
> - spinlock:
>
> fetchadd4.acq r1=[p],1
> target = (r1 & 32767);

Oh, and this should have been "target = (r1+1) & 32767", since fetchadd
will return the old value (I think), not the incremented one.

In general, that whole thing was meant to be more pseudo-code than
anything directly working. As if that wasn't obvious from me freely mixing
assembler code ('fetchadd4.acq' and 'st2.rel') with C-like pseudo-code.

But I checked, and 'st2.rel' seems to be a valid opcode, and the memory
ordering constraints seems to be ok with mixing differently sized
operations on the same memory. So I think my basic algorithm of
using fetchadd4 should be ok.

Linus