kernel - Fix excessive ipiq recursion
* Fix a situation where excessive IPIQ recursion can occur. The problem
was revealed by the previous commit when the passive signalling mechanism
was changed.
* Passive IPI sends now signal at 1/4 full.
* Active IPI sends wait for the FIFO to be < 1/2 full only when the nesting
level is 0, otherwise they allow it to become almost completely full.
This effectively gives IPI callbacks a buffer of roughly 1/2 the FIFO in
which they can issue IPI sends without triggering the wait-process loop
(which is the cause of the nesting).
IPI callbacks do not usually send more than one or two IPI sends to any
given cpu target which should theoretically guarantee that excessive
stacking will not occur.
Reported-by: marino