From patchwork Fri Nov 6 19:14:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 7571921 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0D03AC05C6 for ; Fri, 6 Nov 2015 19:58:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42F27206E8 for ; Fri, 6 Nov 2015 19:58:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 672A220502 for ; Fri, 6 Nov 2015 19:58:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zun8A-00084M-A3; Fri, 06 Nov 2015 19:57:02 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zun60-0004wL-QY; Fri, 06 Nov 2015 19:54:48 +0000 Received: from geoff by merlin.infradead.org with local (Exim 4.85 #2 (Red Hat Linux)) id 1ZumT7-0000CM-DW; Fri, 06 Nov 2015 19:14:37 +0000 Message-Id: <2b09b58c7586a4ca929400327d394fec3135fdd0.1446836443.git.geoff@infradead.org> In-Reply-To: References: From: Geoff Levand Patch-Date: Tue, 6 Oct 2015 14:54:40 +0900 Subject: [PATCH 15/15] arm64: kdump: relax BUG_ON() if more than one cpus are still active To: Catalin Marinas , Will Deacon Date: Fri, 06 Nov 2015 19:14:37 +0000 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , marc.zyngier@arm.com, kexec@lists.infradead.org, AKASHI Takahiro , christoffer.dall@linaro.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: AKASHI Takahiro We should try best in case of kdump. So even if not all secondary cpus have shut down, we do kdump anyway. --- arch/arm64/kernel/machine_kexec.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c index d2d7e90..482aae7 100644 --- a/arch/arm64/kernel/machine_kexec.c +++ b/arch/arm64/kernel/machine_kexec.c @@ -148,7 +148,13 @@ void machine_kexec(struct kimage *kimage) phys_addr_t reboot_code_buffer_phys; void *reboot_code_buffer; - BUG_ON(num_online_cpus() > 1); + if (num_online_cpus() > 1) { + if (in_crash_kexec) + pr_warn("kdump might fail because %d cpus are still online\n", + num_online_cpus()); + else + BUG(); + } reboot_code_buffer_phys = page_to_phys(kimage->control_code_page); reboot_code_buffer = phys_to_virt(reboot_code_buffer_phys);