RE: [git pull] ia64 changes

Linus Torvalds
2009-09-28T22:54:09Z

On Mon, 28 Sep 2009, Luck, Tony wrote:
>
> ticket = ia64_fetchadd(1, p, acq);
>
> if (!(((ticket >> TICKET_SHIFT) ^ ticket) & ((1L << TICKET_BITS) - 1)))
> return;

I think the above is wrong.

Doesn't 'fetchadd' return the _old_ value?

If so, the "fastcase" above will not trigger in the normal case, so you'll
always fall down to the slowcase:

> do {
> cpu_relax();
> serve = ACCESS_ONCE(*p);
> } while (((serve >> TICKET_SHIFT) ^ ticket) & ((1 << TICKET_BITS) - 1));

Or did I miss something?

Linus