From patchwork Tue Jun 11 18:10:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 10988103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79F9C14C0 for ; Tue, 11 Jun 2019 18:11:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 680A228355 for ; Tue, 11 Jun 2019 18:11:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C2052867C; Tue, 11 Jun 2019 18:11:20 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 0E65528355 for ; Tue, 11 Jun 2019 18:11:20 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=xouho1x+Zd6G2FNha7TlfcPFFNvznzDA+b6b4yW7jZM=; b=NdEalwoGk+DzyBACToz/FvWdNA hNoMFlpCLECV690l/eNAzUHGc3g6fSAQEsKLAODXZrMY3nvppVJusZMI7XqhX0BosFu71YHY4j/TZ w2Nkq1XLdXVwu+OnefrFpsgI47QcTo79uP8Ek23/nTzahKItJJRG/CzW6IjlDstWDhJAtTcb4lJir Afq4hVAUAihYS5qiW9KwtbO3GpdJyaJYjhLeSS4SxqfRsdQzGpmNLNZgFPIeHrHfihJxm6sDoCVK3 gYh7qlmnKoI3Q1Habfj4kKAFCz35FA7ERrRqUuwUOsSPOk1VIQRPi+V8T1EFQ1/8ow+nGWetvXW2/ sYXL4rvA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1halEp-0007Xd-6x; Tue, 11 Jun 2019 18:11:15 +0000 Received: from emh03.mail.saunalahti.fi ([62.142.5.109]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1halEV-0007HT-PO for linux-arm-kernel@lists.infradead.org; Tue, 11 Jun 2019 18:10:58 +0000 Received: from localhost.localdomain (85-76-70-161-nat.elisa-mobile.fi [85.76.70.161]) by emh03.mail.saunalahti.fi (Postfix) with ESMTP id 1A3EA40051; Tue, 11 Jun 2019 21:10:50 +0300 (EEST) From: Aaro Koskinen To: Catalin Marinas , Will Deacon , James Morse , Jayachandran Chandrasekharan Nair Subject: [PATCH 2/2] arm64: Implement panic_smp_self_stop() Date: Tue, 11 Jun 2019 21:10:50 +0300 Message-Id: <20190611181050.9647-2-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190611181050.9647-1-aaro.koskinen@iki.fi> References: <20190611181050.9647-1-aaro.koskinen@iki.fi> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190611_111056_011011_A525626E X-CRM114-Status: UNSURE ( 6.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aaro Koskinen , linux-arm-kernel@lists.infradead.org, Aaro Koskinen MIME-Version: 1.0 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 From: Aaro Koskinen Currently arm64 uses the default implementation of panic_smp_self_stop() that is simply a cpu_relax() loop. As a result, when two CPUs panic() simultaneously we get "SMP: failed to stop secondary CPUs" warnings and extra delays before a reset. Provide an implementation of panic_smp_self_stop() that offlines the CPU properly. Signed-off-by: Aaro Koskinen Reviewed-by: James Morse --- arch/arm64/kernel/smp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 1a1b96a50245..5e09e5032409 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -857,6 +857,11 @@ static void ipi_cpu_stop(unsigned int cpu) cpu_park_loop(); } +void panic_smp_self_stop(void) +{ + ipi_cpu_stop(smp_processor_id()); +} + #ifdef CONFIG_KEXEC_CORE static atomic_t waiting_for_crash_ipi = ATOMIC_INIT(0); #endif