powerpc: Fix races with irq_work
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 14 Jan 2014 06:11:39 +0000 (17:11 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 15 Jan 2014 02:59:03 +0000 (13:59 +1100)
If we set irq_work on a processor and immediately afterward, before the
irq work has a chance to be processed, we change the decrementer value,
we can seriously delay the handling of that irq_work.

Fix it by checking in a few places for pending irq work, first before
changing the decrementer in decrementer_set_next_event() and after
changing it in the same function and in timer_interrupt().

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/time.c

Simple merge