ACPI / processor: Make acpi_cpu_soft_notify() process CPU FROZEN events
authorLan Tianyu <tianyu.lan@intel.com>
Thu, 31 Jul 2014 14:28:50 +0000 (22:28 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 6 Aug 2014 20:22:03 +0000 (22:22 +0200)
CPU hotplug happens during S2RAM and CPU notify event will be CPU_XXX_FROZEN.
acpi_cpu_soft_notify() ignores to check these events. This also may make
acpi_cpu_soft_notify() fall into sleep during CPU_DYING/STARTING_FROZEN
events which don't allow callbacks to sleep. This patch is to fix it.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/processor_driver.c

index 4fcbd670415c6fa1a61b02a970563a5d220a9ea7..d9f71581b79b2ede3d90398a6265f6378fa748ac 100644 (file)
@@ -120,6 +120,7 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb,
        unsigned int cpu = (unsigned long)hcpu;
        struct acpi_processor *pr = per_cpu(processors, cpu);
        struct acpi_device *device;
+       action &= ~CPU_TASKS_FROZEN;
 
        /*
         * CPU_STARTING and CPU_DYING must not sleep. Return here since