linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: lenb@kernel.org, deepthi@linux.vnet.ibm.com,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH] PM/Sleep, ACPI: Teach acpi_cpu_soft_notify() to handle CPU hotplug in suspend/resume path
Date: Sun, 4 Mar 2012 23:33:18 +0100	[thread overview]
Message-ID: <201203042333.18501.rjw@sisk.pl> (raw)
In-Reply-To: <20120228155137.3061.97133.stgit@srivatsabhat.in.ibm.com>

On Tuesday, February 28, 2012, Srivatsa S. Bhat wrote:
> acpi_cpu_soft_notify handles only CPU_ONLINE and CPU_DEAD events. However,
> during a system-wide suspend/hibernation operation, CPU_ONLINE_FROZEN and
> CPU_DEAD_FROZEN events are sent as part of CPU hotplug.
> 
> Those events are really no different from regular CPU hotplug in this context,
> and hence acpi shouldn't ignore them. So, teach acpi_cpu_soft_notify() to
> handle those events as well.
> 
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> ---
> 
> I am no ACPI expert! So requesting a thorough review of this patch..

Well, as far as I can tell, it _looks_ correct.  That said, I don't think
anyone will really tell you on the basis of code review alone, this requires
testing.

Since Len hasn't been very responsive recently, I can take this patch into
linux-pm/linux-next and see what the feedback is.

Thanks,
Rafael


>  drivers/acpi/processor_driver.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
> index 2801b41..3a87b13 100644
> --- a/drivers/acpi/processor_driver.c
> +++ b/drivers/acpi/processor_driver.c
> @@ -422,6 +422,12 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb,
>  	unsigned int cpu = (unsigned long)hcpu;
>  	struct acpi_processor *pr = per_cpu(processors, cpu);
>  
> +	/*
> +	 * Regular CPU hotplug, and CPU hotplug as part of the suspend/resume
> +	 * sequence are really no different for us. So, let us handle both.
> +	 */
> +	action &= ~CPU_TASKS_FROZEN;
> +
>  	if (action == CPU_ONLINE && pr) {
>  		/* CPU got physically hotplugged and onlined the first time:
>  		 * Initialize missing things
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 


  reply	other threads:[~2012-03-04 22:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 16:26 [PATCH] PM/Sleep, ACPI: Teach acpi_cpu_soft_notify() to handle CPU hotplug in suspend/resume path Srivatsa S. Bhat
2012-03-04 22:33 ` Rafael J. Wysocki [this message]
2012-03-05  6:33   ` Srivatsa S. Bhat
2012-03-09 13:16   ` Srivatsa S. Bhat

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=201203042333.18501.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=deepthi@linux.vnet.ibm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).