diff options
author | Richard Cochran <rcochran@linutronix.de> | 2016-07-13 13:16:38 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-07-15 04:40:24 -0400 |
commit | e1272f541c6ad476426ef24b56b4e1d3403db513 (patch) | |
tree | 25831e12ad90a127d2bb7c1176090ab7d91ccb51 | |
parent | 8c18b2d2d0881b116ea52498c6d624c0a71e1fdc (diff) |
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:
8da8373447d6a57a5a9f55233d35beb15d92d0d2 ("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: Richard Cochran <rcochran@linutronix.de>
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Reviewed-by: Sebastian 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.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | drivers/acpi/processor_driver.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index d2fa8cb82d2b..eecdb196b2d1 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -118,12 +118,13 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb, | |||
118 | struct acpi_device *device; | 118 | struct acpi_device *device; |
119 | action &= ~CPU_TASKS_FROZEN; | 119 | action &= ~CPU_TASKS_FROZEN; |
120 | 120 | ||
121 | /* | 121 | switch (action) { |
122 | * CPU_STARTING and CPU_DYING must not sleep. Return here since | 122 | case CPU_ONLINE: |
123 | * acpi_bus_get_device() may sleep. | 123 | case CPU_DEAD: |
124 | */ | 124 | break; |
125 | if (action == CPU_STARTING || action == CPU_DYING) | 125 | default: |
126 | return NOTIFY_DONE; | 126 | return NOTIFY_DONE; |
127 | } | ||
127 | 128 | ||
128 | if (!pr || acpi_bus_get_device(pr->handle, &device)) | 129 | if (!pr || acpi_bus_get_device(pr->handle, &device)) |
129 | return NOTIFY_DONE; | 130 | return NOTIFY_DONE; |