From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936774AbdEWIz7 (ORCPT ); Tue, 23 May 2017 04:55:59 -0400 Received: from terminus.zytor.com ([65.50.211.136]:43075 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752329AbdEWIz4 (ORCPT ); Tue, 23 May 2017 04:55:56 -0400 Date: Tue, 23 May 2017 01:51:10 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, rostedt@goodmis.org, torvalds@linux-foundation.org, lenb@kernel.org, rjw@rjwysocki.net, peterz@infradead.org, mark.rutland@arm.com, hpa@zytor.com, tglx@linutronix.de Reply-To: mingo@kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, rostedt@goodmis.org, torvalds@linux-foundation.org, lenb@kernel.org, hpa@zytor.com, peterz@infradead.org, mark.rutland@arm.com, rjw@rjwysocki.net, tglx@linutronix.de In-Reply-To: <20170516184735.446455652@linutronix.de> References: <20170516184735.446455652@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] ACPI: Adjust system_state check Git-Commit-ID: 9762b33dc31c67e34b36ba4e787e64084b3136ff 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: 9762b33dc31c67e34b36ba4e787e64084b3136ff Gitweb: http://git.kernel.org/tip/9762b33dc31c67e34b36ba4e787e64084b3136ff Author: Thomas Gleixner AuthorDate: Tue, 16 May 2017 20:42:38 +0200 Committer: Ingo Molnar CommitDate: Tue, 23 May 2017 10:01:36 +0200 ACPI: Adjust system_state check To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Make the decision whether a pci root is hotplugged depend on SYSTEM_RUNNING instead of !SYSTEM_BOOTING. It makes no sense to cover states greater than SYSTEM_RUNNING as there are not hotplug events on reboot and poweroff. Tested-by: Mark Rutland Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Cc: Greg Kroah-Hartman Cc: Len Brown Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rafael J. Wysocki Link: http://lkml.kernel.org/r/20170516184735.446455652@linutronix.de Signed-off-by: Ingo Molnar --- drivers/acpi/pci_root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 919be0a..2405442 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -523,7 +523,7 @@ static int acpi_pci_root_add(struct acpi_device *device, struct acpi_pci_root *root; acpi_handle handle = device->handle; int no_aspm = 0; - bool hotadd = system_state != SYSTEM_BOOTING; + bool hotadd = system_state == SYSTEM_RUNNING; root = kzalloc(sizeof(struct acpi_pci_root), GFP_KERNEL); if (!root)