Skip to content

Commit

Permalink
[PATCH] powerpc: avoid timer interrupt replay effect when onlining cpu
Browse files Browse the repository at this point in the history
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 <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Nathan Lynch authored and Paul Mackerras committed Feb 7, 2006
1 parent 4dc4325 commit 7d4d615
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7d4d615

Please sign in to comment.