diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2008-09-03 02:15:30 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-03 02:15:30 -0700 |
commit | 4d084617fb0d025c42c242362d1f27d337e2d407 (patch) | |
tree | 8bc8a49447713d712aa0f66dd5c9c1e6d44a33b6 /arch | |
parent | e5bd1c3fdd06b6c0fa6dfb98ce31cea1820ce4e9 (diff) | |
download | kernel-crypto-4d084617fb0d025c42c242362d1f27d337e2d407.tar.gz kernel-crypto-4d084617fb0d025c42c242362d1f27d337e2d407.tar.xz kernel-crypto-4d084617fb0d025c42c242362d1f27d337e2d407.zip |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 0712a445f98..2be166c544c 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -1303,10 +1303,6 @@ int __cpu_disable(void) c->core_id = 0; c->proc_id = -1; - ipi_call_lock(); - cpu_clear(cpu, cpu_online_map); - ipi_call_unlock(); - smp_wmb(); /* Make sure no interrupts point to this cpu. */ @@ -1316,6 +1312,10 @@ int __cpu_disable(void) mdelay(1); local_irq_disable(); + ipi_call_lock(); + cpu_clear(cpu, cpu_online_map); + ipi_call_unlock(); + return 0; } |