linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PM/Sleep, ACPI: Teach acpi_cpu_soft_notify() to handle CPU hotplug in suspend/resume path
@ 2012-02-28 16:26 Srivatsa S. Bhat
  2012-03-04 22:33 ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Srivatsa S. Bhat @ 2012-02-28 16:26 UTC (permalink / raw)
  To: lenb, rjw; +Cc: deepthi, linux-acpi, linux-kernel, linux-pm, srivatsa.bhat

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..

 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


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

end of thread, other threads:[~2012-03-09 13:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-03-05  6:33   ` Srivatsa S. Bhat
2012-03-09 13:16   ` Srivatsa S. Bhat

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).