Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440590

[patch 36/66] ACPI/processor: avoid STARTING/DYING actions in a more logical way

From Anna-Maria Gleixner <anna-maria@linutronix.de>
Newsgroups linux.kernel
Subject [patch 36/66] ACPI/processor: avoid STARTING/DYING actions in a more logical way
Date 2016-07-11 14:50 +0200
Message-ID <rTIOT-762-43@gated-at.bofh.it> (permalink)
References <rTIFb-70u-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Richard Cochran <rcochran@linutronix.de>

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>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>

---
 drivers/acpi/processor_driver.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -118,12 +118,13 @@ static int acpi_cpu_soft_notify(struct n
 	struct acpi_device *device;
 	action &= ~CPU_TASKS_FROZEN;
 
-	/*
-	 * CPU_STARTING and CPU_DYING must not sleep. Return here since
-	 * acpi_bus_get_device() may sleep.
-	 */
-	if (action == CPU_STARTING || action == CPU_DYING)
+	switch (action) {
+	case CPU_ONLINE:
+	case CPU_DEAD:
+		break;
+	default:
 		return NOTIFY_DONE;
+	}
 
 	if (!pr || acpi_bus_get_device(pr->handle, &device))
 		return NOTIFY_DONE;

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[patch 36/66] ACPI/processor: avoid STARTING/DYING actions in a more  logical way Anna-Maria Gleixner <anna-maria@linutronix.de> - 2016-07-11 14:50 +0200

csiph-web