From 7d4d61544a12333600bdb9b018a149868418692e Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Mon, 6 Feb 2006 22:44:23 -0600 Subject: [PATCH] powerpc: avoid timer interrupt replay effect when onlining cpu When a cpu is hotplug-onlined, if we don't set per_cpu(last_jiffy) to something sane, timer_interrupt will execute its while loop for every tick missed since the cpu was last online (or since the system was booted, if we're adding a new cpu). This can cause weird hangs, ssh sessions dropping, and we can even go xmon if we take a global IPI at the wrong time. Signed-off-by: Nathan Lynch Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/smp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/powerpc/kernel/smp.c') diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index c8458c531b2..13595a64f01 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -540,6 +540,9 @@ int __devinit start_secondary(void *unused) if (smp_ops->take_timebase) smp_ops->take_timebase(); + if (system_state > SYSTEM_BOOTING) + per_cpu(last_jiffy, cpu) = get_tb(); + spin_lock(&call_lock); cpu_set(cpu, cpu_online_map); spin_unlock(&call_lock); -- cgit v1.2.3