[PATCH] powerpc: stop_this_cpu: remove the cpu from the online map.

Valentine Barshak vbarshak at ru.mvista.com
Thu Nov 26 08:48:52 EST 2009


Remove the CPU from the online map to prevent smp_call_function
from sending messages to a stopped CPU.

Signed-off-by: Valentine Barshak <vbarshak at ru.mvista.com>
---
 arch/powerpc/kernel/smp.c |    3 +++
 1 file changed, 3 insertions(+)

diff -pruN linux-2.6.orig/arch/powerpc/kernel/smp.c linux-2.6/arch/powerpc/kernel/smp.c
--- linux-2.6.orig/arch/powerpc/kernel/smp.c	2009-11-26 00:22:15.000000000 +0300
+++ linux-2.6/arch/powerpc/kernel/smp.c	2009-11-26 00:26:48.000000000 +0300
@@ -218,6 +218,9 @@ void crash_send_ipi(void (*crash_ipi_cal
 
 static void stop_this_cpu(void *dummy)
 {
+	/* Remove this CPU */
+	set_cpu_online(smp_processor_id(), false);
+
 	local_irq_disable();
 	while (1)
 		;


More information about the Linuxppc-dev mailing list