From patchwork Tue May 16 18:42:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 9729535 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 0093C60386 for ; Tue, 16 May 2017 18:53:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6AE02896B for ; Tue, 16 May 2017 18:53:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB85728972; Tue, 16 May 2017 18:53:09 +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 74EFA289A7 for ; Tue, 16 May 2017 18:53: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=LW/Fw0lNL0PyycHLwSdytMSijsEI7jY7DiIBfRJTiNA=; b=UGcSA/JbtTMHMi /9ZTODU6UhAi8rJU/mjy5kh6cDNdCrNkvSrFwh8TQarMaHw1u9GCvLcC8h7Moh01QqecM9fk+Sp60 r/9SmSpzEyx30q0Qr7EI23rfL5CVifa5BPimSK7Y+5Vb6Z3J9f/qG/Ac3Lz8ZI0tne8y0qgzf7G31 5/XdeFU2G8VBWvfcaBOHn0tWoaJ/IfVFAZH3+l3nEf0QBUCwmXBWeQhkcXims99W/aeiww4fmYKXl 7e4MioYf0Nnu4JH4tlh/baLAFu+YJnMO6Fdp2VkMrWr4pxpa7F/ej3VFwa1tusDY4r3z+Gd6YLco0 7FuTKP/+mBBEz/DTAI8w==; 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 1dAham-0006vi-KD; Tue, 16 May 2017 18:53:08 +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 1dAhaj-0006sL-2A for linux-arm-kernel@lists.infradead.org; Tue, 16 May 2017 18:53:07 +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 1dAhZd-0000fS-6w; Tue, 16 May 2017 20:51:57 +0200 Message-Id: <20170516184735.112589728@linutronix.de> User-Agent: quilt/0.63-1 Date: Tue, 16 May 2017 20:42:34 +0200 From: Thomas Gleixner To: LKML Subject: [patch V2 03/17] arm64: Adjust system_state check References: <20170516184231.564888231@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline; filename=arm64--Adjust-system_state-check.patch X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170516_115305_259584_2E2E1B34 X-CRM114-Status: UNSURE ( 9.70 ) X-CRM114-Notice: Please train this message. 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 , Greg Kroah-Hartman , 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. Adjust the system_state check in smp_send_stop() to handle the extra states. Signed-off-by: Thomas Gleixner Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Acked-by: Mark Rutland Acked-by: Catalin Marinas --- arch/arm64/kernel/smp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -961,8 +961,7 @@ void smp_send_stop(void) cpumask_copy(&mask, cpu_online_mask); cpumask_clear_cpu(smp_processor_id(), &mask); - if (system_state == SYSTEM_BOOTING || - system_state == SYSTEM_RUNNING) + if (system_state <= SYSTEM_RUNNING) pr_crit("SMP: stopping secondary CPUs\n"); smp_cross_call(&mask, IPI_CPU_STOP); }