From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753247AbcGSHR6 (ORCPT ); Tue, 19 Jul 2016 03:17:58 -0400 Received: from terminus.zytor.com ([198.137.202.10]:45792 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752781AbcGSHRy (ORCPT ); Tue, 19 Jul 2016 03:17:54 -0400 Date: Tue, 19 Jul 2016 00:17:21 -0700 From: tip-bot for Richard Cochran Message-ID: Cc: peterz@infradead.org, hpa@zytor.com, linux-kernel@vger.kernel.org, rcochran@linutronix.de, lenb@kernel.org, bigeasy@linutronix.de, mingo@kernel.org, anna-maria@linutronix.de, torvalds@linux-foundation.org, tglx@linutronix.de, rjw@rjwysocki.net Reply-To: anna-maria@linutronix.de, torvalds@linux-foundation.org, mingo@kernel.org, rjw@rjwysocki.net, tglx@linutronix.de, rcochran@linutronix.de, bigeasy@linutronix.de, lenb@kernel.org, peterz@infradead.org, hpa@zytor.com, linux-kernel@vger.kernel.org In-Reply-To: <20160713153335.964962885@linutronix.de> References: <20160713153335.964962885@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/hotplug] ACPI/processor: Avoid STARTING/DYING actions in a more logical way Git-Commit-ID: e1272f541c6ad476426ef24b56b4e1d3403db513 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e1272f541c6ad476426ef24b56b4e1d3403db513 Gitweb: http://git.kernel.org/tip/e1272f541c6ad476426ef24b56b4e1d3403db513 Author: Richard Cochran AuthorDate: Wed, 13 Jul 2016 17:16:38 +0000 Committer: Ingo Molnar CommitDate: Fri, 15 Jul 2016 10:40:24 +0200 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 Signed-off-by: Anna-Maria Gleixner Reviewed-by: Sebastian Andrzej Siewior Cc: Len Brown Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Thomas Gleixner 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 --- drivers/acpi/processor_driver.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index d2fa8cb..eecdb19 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, 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;