aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiejun Chen <tiejun.chen@windriver.com>2013-01-15 12:01:19 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-01-28 18:18:16 -0500
commit689dfa894c57842a05bf6dc9f97e6bb71ec5f386 (patch)
tree36b1b888f77c68447b57d6db37cafe3032874f31
parentfefd9e6f8860249b2c284d89cb2e51fa71a9503a (diff)
powerpc: Max next_tb to prevent from replaying timer interrupt
With lazy interrupt, we always call __check_irq_replaysome with decrementers_next_tb to check if we need to replay timer interrupt. So in hotplug case we also need to set decrementers_next_tb as MAX to make sure __check_irq_replay don't replay timer interrupt when return as we expect, otherwise we'll trap here infinitely. Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/kernel/time.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 6f6b1cccc916..127361e093f4 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -494,10 +494,15 @@ void timer_interrupt(struct pt_regs * regs)
494 set_dec(DECREMENTER_MAX); 494 set_dec(DECREMENTER_MAX);
495 495
496 /* Some implementations of hotplug will get timer interrupts while 496 /* Some implementations of hotplug will get timer interrupts while
497 * offline, just ignore these 497 * offline, just ignore these and we also need to set
498 * decrementers_next_tb as MAX to make sure __check_irq_replay
499 * don't replay timer interrupt when return, otherwise we'll trap
500 * here infinitely :(
498 */ 501 */
499 if (!cpu_online(smp_processor_id())) 502 if (!cpu_online(smp_processor_id())) {
503 *next_tb = ~(u64)0;
500 return; 504 return;
505 }
501 506
502 /* Conditionally hard-enable interrupts now that the DEC has been 507 /* Conditionally hard-enable interrupts now that the DEC has been
503 * bumped to its maximum value 508 * bumped to its maximum value