aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2008-09-03 05:15:30 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-03 05:15:30 -0400
commit4d084617fb0d025c42c242362d1f27d337e2d407 (patch)
tree8bc8a49447713d712aa0f66dd5c9c1e6d44a33b6 /arch
parente5bd1c3fdd06b6c0fa6dfb98ce31cea1820ce4e9 (diff)
sparc64: Prevent sparc64 from invoking irq handlers on offline CPUs
Make sparc64 refrain from clearing a given to-be-offlined CPU's bit in the cpu_online_mask until it has processed pending irqs. This change prevents other CPUs from being blindsided by an apparently offline CPU nevertheless changing globally visible state. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/smp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 0712a445f98e..2be166c544ca 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -1303,10 +1303,6 @@ int __cpu_disable(void)
1303 c->core_id = 0; 1303 c->core_id = 0;
1304 c->proc_id = -1; 1304 c->proc_id = -1;
1305 1305
1306 ipi_call_lock();
1307 cpu_clear(cpu, cpu_online_map);
1308 ipi_call_unlock();
1309
1310 smp_wmb(); 1306 smp_wmb();
1311 1307
1312 /* Make sure no interrupts point to this cpu. */ 1308 /* Make sure no interrupts point to this cpu. */
@@ -1316,6 +1312,10 @@ int __cpu_disable(void)
1316 mdelay(1); 1312 mdelay(1);
1317 local_irq_disable(); 1313 local_irq_disable();
1318 1314
1315 ipi_call_lock();
1316 cpu_clear(cpu, cpu_online_map);
1317 ipi_call_unlock();
1318
1319 return 0; 1319 return 0;
1320} 1320}
1321 1321