[PATCH] 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@xxxxxxxxxxxxxxxxxx>
---

smp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 743ccad..b83a683 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -1305,10 +1305,6 @@ int __cpu_disable(void)
c->core_id = 0;
c->proc_id = -1;

- spin_lock(&call_lock);
- cpu_clear(cpu, cpu_online_map);
- spin_unlock(&call_lock);
-
smp_wmb();

/* Make sure no interrupts point to this cpu. */
@@ -1318,6 +1314,10 @@ int __cpu_disable(void)
mdelay(1);
local_irq_disable();

+ spin_lock(&call_lock);
+ cpu_clear(cpu, cpu_online_map);
+ spin_unlock(&call_lock);
+
return 0;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • [PATCH] prevent ia64 from invoking irq handlers on offline CPUs
    ... Make ia64 refrain from clearing a given to-be-offlined CPU's bit in the ... cpu_online_mask until it has processed pending irqs. ... prevents other CPUs from being blindsided by an apparently offline CPU ...
    (Linux-Kernel)
  • Re: [PATCH] prevent sparc64 from invoking irq handlers on offline CPUs
    ... cpu_online_mask until it has processed pending irqs. ... prevents other CPUs from being blindsided by an apparently offline CPU ... A few architectures use it to exclude some of the IPI code while ...
    (Linux-Kernel)
  • Re: Auction: PC Server 720 and 3518 and more
    ... Thanks for clearing everything up. ... I apologize for being so naive about the 720, but I just never tinkered with ... MMX is not supported, nor should it even be tried unless ALL the CPU ... Still need a couple of CPUs though. ...
    (comp.sys.ibm.ps2.hardware)
  • Re: [PATCH] percpu data: only iterate over possible CPUs
    ... Heiko Carstens a écrit: ... cpu_possible_map is changed back to reflect a smaller number of cpus. ... Doesn't look like the correct way to fix this. ... of course you may loose some bits of memory but clearing a cpu in cpu_possible_map is allowed. ...
    (Linux-Kernel)