RE: [git pull] ia64 changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux