public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Valentine <vbarshak@ru•mvista.com>
To: linuxppc-dev@ozlabs•org
Subject: Re: [PATCH] powerpc: stop_this_cpu: remove the cpu from the online map.
Date: Tue, 08 Dec 2009 00:58:00 +0300	[thread overview]
Message-ID: <4B1D7A68.5000309@ru.mvista.com> (raw)
In-Reply-To: <20091125214852.GA7912@ru.mvista.com>

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

      reply	other threads:[~2009-12-07 21:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B1D7A68.5000309@ru.mvista.com \
    --to=vbarshak@ru$(echo .)mvista.com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox