public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* [PATCH] powerpc: stop_this_cpu: remove the cpu from the online map.
@ 2009-11-25 21:48 Valentine Barshak
  2009-12-07 21:58 ` Valentine
  0 siblings, 1 reply; 2+ messages in thread
From: Valentine Barshak @ 2009-11-25 21:48 UTC (permalink / raw)
  To: linuxppc-dev

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@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)
 		;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc: stop_this_cpu: remove the cpu from the online map.
  2009-11-25 21:48 [PATCH] powerpc: stop_this_cpu: remove the cpu from the online map Valentine Barshak
@ 2009-12-07 21:58 ` Valentine
  0 siblings, 0 replies; 2+ messages in thread
From: Valentine @ 2009-12-07 21:58 UTC (permalink / raw)
  To: linuxppc-dev

Ben, is this OK?
Other architectures do the same thing.

Thanks,
Val.

Valentine Barshak wrote:
> 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@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)
>  		;
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists•ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-07 21:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-25 21:48 [PATCH] powerpc: stop_this_cpu: remove the cpu from the online map Valentine Barshak
2009-12-07 21:58 ` Valentine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox