From patchwork Sun May 14 18:27:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 9725853 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 24805601E7 for ; Sun, 14 May 2017 18:38:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19C4D28912 for ; Sun, 14 May 2017 18:38:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DC982894F; Sun, 14 May 2017 18:38:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9DECF28912 for ; Sun, 14 May 2017 18:38:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Subject:To:From :Date:Message-Id:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: List-Owner; bh=IhZ4INiVHn2ZRaQuWKn/R3TouSa6pbrGF3LxNKE6ZbY=; b=oKya+4VpASX4Aq MsihT/l+N9edMaUXG5k0OUyj0ZZ5zdBgMDnsvwvNphI364CyCTSjwOvum3NrgW8V9syafgorlkAZM JLhdqpYdN9Md+Sdtvv0DyXu629wKcdIS5RylCjdk13pNoH47N3LYUt0YxSZuCcvzwxH2cc7nlN/Mk tEm2XYA37YaT+3WCnUTX/lVpltaDJijgzwvd8IVTaNVbt3QKcxikdBYRl6rTtVeKyfjFIiNAJsmKX 7hRwRtsnpmLgzXEkKboS7A/92KAqacS2w/Mpiq6ozFEJ+xaouh697P2eN2ey3seQR/xtNN2FGibg1 hqBrImukvEYUh4eTniOA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d9yP9-0002yn-Qb; Sun, 14 May 2017 18:38:07 +0000 Received: from galois.linutronix.de ([2a01:7a0:2:106d:700::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d9yOw-0002TZ-2q for linux-arm-kernel@lists.infradead.org; Sun, 14 May 2017 18:37:56 +0000 Received: from localhost ([127.0.0.1] helo=[127.0.1.1]) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1d9yNs-00073S-VM; Sun, 14 May 2017 20:36:49 +0200 Message-Id: <20170514183613.002084749@linutronix.de> User-Agent: quilt/0.63-1 Date: Sun, 14 May 2017 20:27:23 +0200 From: Thomas Gleixner To: LKML Subject: [patch 07/18] ACPI: Adjust system_state check References: <20170514182716.347236777@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline; filename=ACPI--Adjust-system_state-check.patch X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170514_113754_312872_873AE599 X-CRM114-Status: GOOD ( 10.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Peter Zijlstra , Catalin Marinas , Will Deacon , Steven Rostedt , Ingo Molnar , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 wether a pci root is hotplugged depend on SYSTEM_RUNNING instead of !SYSTEM_BOOTING. Signed-off-by: Thomas Gleixner Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org --- drivers/acpi/pci_root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -523,7 +523,7 @@ static int acpi_pci_root_add(struct acpi 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)