Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1972098pxb; Mon, 12 Apr 2021 10:53:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxO1G/uzomDihCwkreJB8wnIoEBGXGPY6Z0yricOlSwpfcRKY648BVxq2B3nwzu29vzgtgk X-Received: by 2002:a17:906:250d:: with SMTP id i13mr15452989ejb.474.1618249998128; Mon, 12 Apr 2021 10:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618249998; cv=none; d=google.com; s=arc-20160816; b=WEELoXGFgqhV67RrO50Af8gO8eP8dy1oEfkh9ejq7gWq/fPDQ2tx7BZ5mquzIq4hIC Vo+ZmTSRw6wtZuc2IBwfyd8IPnXjM6q9a85BS7rhYOQIiwdxdLHhroPfHXc1C8j4iG2u CjXpngLvsOD5h3bkwpy7yycsV2O7eMgfSigxYYJHpDEM/KYziG1ClvAp8UaytHBSYVKl 3hxzV2vGrWeQPa7T7oYXs0VpBCfPwKD9dLUYdYSH40J6I32sONfm61nlp4Tdo551TW/L 6vr65XSMoNbUbDY3P83PILaYxXAGCkqLmYfbwWvjIvW1l+QqEMEOjf5wlvRvn8uXTpBD u3oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=EgHC46tfyol7OQrQeY7G9ik6yWtC2dKCb/lnBOMVffQ=; b=B5gxx2zcrDL4OVOs4H1z/nspq7+4BhgqWbhZfqWsNknnoWd2xOTqbguw9RVWpjzqaq 98jeDkKxyb6E56qanpMZHWCNXv+b9PeDw5jQ89/kVc9XRBPi4mk31uU3hFFdi48ZD7ZN bZ7hlfVSw+mwMZQ88ZeezQC4Y+As29KCIaCSt2YE3oNtLlIivIiyQ9HP28wbfZMnDgvu c9RucShIvAYuUw57WuYNROKnUYsfoOSQdeHI08APDlh7WIDGMGFqafo6HI/mmoRuGuHP dDFB5nUhlzgsmyO6axXLcIRNAjTsJZIPJ2N6W3srohm8TRzvxc5/TzCpUdS9PqnclI0C xvqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=a9gS0M+C; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=UKG4MAuY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a11si8425782ejs.551.2021.04.12.10.52.53; Mon, 12 Apr 2021 10:53:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=a9gS0M+C; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=UKG4MAuY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243597AbhDLRtV (ORCPT + 99 others); Mon, 12 Apr 2021 13:49:21 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:40704 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238145AbhDLRtV (ORCPT ); Mon, 12 Apr 2021 13:49:21 -0400 Date: Mon, 12 Apr 2021 17:48:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1618249741; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EgHC46tfyol7OQrQeY7G9ik6yWtC2dKCb/lnBOMVffQ=; b=a9gS0M+CzwcUWv2mRu5SCNaIOPv2PqEsXVysB+cFr1UNoIis1Lm1uBKXlWC31sBOK41SrF FMv2I2B37QzfmK4GDMjXGT2wCIyo46srNqcAbY9+hXU8HmGKX6UI2Akz0dNepdpZGL8HvY Z/EN9WH2nSBLuyRmo2NkEKgkjOfHHSAjIyI2HBJjDcAOl+EDvcvGkxrfNOijwBi8806hy2 K78XSskebHTSaTzAOU9DFOuWMTav692QS4SHN0uIdU498GW/hjxLtcK7L4RejGV9/2viqG HhkVgoW5e1fs0MhgK9kqtgdGx9766mBwNXJq+D2mISzT//fpTNsszorvnCYfWw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1618249741; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EgHC46tfyol7OQrQeY7G9ik6yWtC2dKCb/lnBOMVffQ=; b=UKG4MAuYY6VxKAHTUIf5AiJ5iDFvwIQhya6NksGBRZjCTG3wAEG9SM4sb8Iwho9Dxys9da Qm33JmC/PsnOhHCA== From: "tip-bot2 for Georges Aureau" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/platform] x86/platform/uv: Add more to secondary CPU kdump info Cc: Georges Aureau , Mike Travis , Borislav Petkov , Steve Wahl , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210311151028.82678-1-mike.travis@hpe.com> References: <20210311151028.82678-1-mike.travis@hpe.com> MIME-Version: 1.0 Message-ID: <161824973989.29796.1475506377197380962.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/platform branch of tip: Commit-ID: 8f2aca40dd077f74e62982cd2669845f41ed0ac6 Gitweb: https://git.kernel.org/tip/8f2aca40dd077f74e62982cd2669845f41ed0ac6 Author: Georges Aureau AuthorDate: Thu, 11 Mar 2021 09:10:28 -06:00 Committer: Borislav Petkov CommitterDate: Mon, 12 Apr 2021 19:42:10 +02:00 x86/platform/uv: Add more to secondary CPU kdump info Add call to run_crash_ipi_callback() to gather more info of what the secondary CPUs were doing to help with failure analysis. Excerpt from Georges: 'It is only changing where crash secondaries will be stalling after having taken care of properly laying down "crash note regs". Please note that "crash note regs" are a key piece of data used by crash dump debuggers to provide a reliable backtrace of running processors.' Secondary change pursuant to a5f526ecb075 ("CodingStyle: Inclusive Terminology"): change master/slave to main/secondary. [ bp: Massage commit message. ] Signed-off-by: Georges Aureau Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20210311151028.82678-1-mike.travis@hpe.com --- arch/x86/platform/uv/uv_nmi.c | 39 ++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c index eafc530..f83810f 100644 --- a/arch/x86/platform/uv/uv_nmi.c +++ b/arch/x86/platform/uv/uv_nmi.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -834,34 +835,42 @@ static void uv_nmi_touch_watchdogs(void) touch_nmi_watchdog(); } -static atomic_t uv_nmi_kexec_failed; - #if defined(CONFIG_KEXEC_CORE) -static void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs) +static atomic_t uv_nmi_kexec_failed; +static void uv_nmi_kdump(int cpu, int main, struct pt_regs *regs) { + /* Check if kdump kernel loaded for both main and secondary CPUs */ + if (!kexec_crash_image) { + if (main) + pr_err("UV: NMI error: kdump kernel not loaded\n"); + return; + } + /* Call crash to dump system state */ - if (master) { + if (main) { pr_emerg("UV: NMI executing crash_kexec on CPU%d\n", cpu); crash_kexec(regs); - pr_emerg("UV: crash_kexec unexpectedly returned, "); + pr_emerg("UV: crash_kexec unexpectedly returned\n"); atomic_set(&uv_nmi_kexec_failed, 1); - if (!kexec_crash_image) { - pr_cont("crash kernel not loaded\n"); - return; + + } else { /* secondary */ + + /* If kdump kernel fails, secondaries will exit this loop */ + while (atomic_read(&uv_nmi_kexec_failed) == 0) { + + /* Once shootdown cpus starts, they do not return */ + run_crash_ipi_callback(regs); + + mdelay(10); } - pr_cont("kexec busy, stalling cpus while waiting\n"); } - - /* If crash exec fails the slaves should return, otherwise stall */ - while (atomic_read(&uv_nmi_kexec_failed) == 0) - mdelay(10); } #else /* !CONFIG_KEXEC_CORE */ -static inline void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs) +static inline void uv_nmi_kdump(int cpu, int main, struct pt_regs *regs) { - if (master) + if (main) pr_err("UV: NMI kdump: KEXEC not supported in this kernel\n"); atomic_set(&uv_nmi_kexec_failed, 1); }