Just make sure it can't overflow. With spinlocks, you are guaranteed that
you won't have more than NR_CPU's thing, so 20 bits is pretty safe. 30
bits is ridiculously safe.
Sure, you could do things like that, but that sounds like a separate
"debugging" version, not the main one.
Well, you could just change the "testl $3,%eax" into an "andl $3,%eax",
and it will be two bytes shorter with no partial register stall.
I forgot that "testl" doesn't have the byte immediate version.
Linus
--