Commit e1272f54 authored by Richard Cochran's avatar Richard Cochran Committed by Ingo Molnar

ACPI/processor: Avoid STARTING/DYING actions in a more logical way

As part of the hotplug cleanup, the CPU_STARTING/DYING actions are going
away soon.  This driver needlessly uses those two macro, and so this patch
replaces that code with something more sensible.

Commit:

  8da83734 ("ACPI / processor: Fix STARTING/DYING action in acpi_cpu_soft_notify()")

added checks for those two actions, because the notification callback can
sleep, causing a hung CPU. This patch instead checks for the ONLINE/DEAD
actions, which are the ones that are handled by the driver in the first
place.
Signed-off-by: default avatarRichard Cochran <rcochran@linutronix.de>
Signed-off-by: default avatarAnna-Maria Gleixner <anna-maria@linutronix.de>
Reviewed-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Len Brown <lenb@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-acpi@vger.kernel.org
Cc: rt@linutronix.de
Link: http://lkml.kernel.org/r/20160713153335.964962885@linutronix.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 8c18b2d2
...@@ -118,12 +118,13 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb, ...@@ -118,12 +118,13 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb,
struct acpi_device *device; struct acpi_device *device;
action &= ~CPU_TASKS_FROZEN; action &= ~CPU_TASKS_FROZEN;
/* switch (action) {
* CPU_STARTING and CPU_DYING must not sleep. Return here since case CPU_ONLINE:
* acpi_bus_get_device() may sleep. case CPU_DEAD:
*/ break;
if (action == CPU_STARTING || action == CPU_DYING) default:
return NOTIFY_DONE; return NOTIFY_DONE;
}
if (!pr || acpi_bus_get_device(pr->handle, &device)) if (!pr || acpi_bus_get_device(pr->handle, &device))
return NOTIFY_DONE; return NOTIFY_DONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment