Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp652804pxb; Tue, 2 Feb 2021 14:26:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxo+OD3yNPLPg9qblBUfYZ7jr2U1WIO05sYCzVg+cDKeel5wwEymJksPi6U7Sb3ZLwRjg6V X-Received: by 2002:a17:906:2ccb:: with SMTP id r11mr168762ejr.39.1612304797298; Tue, 02 Feb 2021 14:26:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612304797; cv=none; d=google.com; s=arc-20160816; b=dPny65CPyM0mQ2iQ8yksoko9bso765LeG42ZNHnbaGjpmvLBFIFjv0V4rhf66Iwzdf t81WXIeuSmx8ujIa2MX64OSVgfxh0Khhnblyw2noZLIScv4jWY6WNl4IXw87FodPQfoq vCypXlsCZ2/nO+e1QZqceg8z4fnaKr7LMtE2dcZfgUwSZ1oewLFTM5QF8qXlyRf9Tli1 PJ9z62Q8qULpndKNZ8UvTIXlyYXcvnou7dLaIcyfs4AGCqLAUAFzYTW3v6xRuQ9uIo3n qAMvzajuU7c8yxeXNdf9beyDUj01Kbp75rjIXM/BvnHzxdt+CHHx5t6jlapf1VfJ72dl C5Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=KgON0JNjPPn3agmdfKnN9oeNhsJWy56GgPCfWOLOKC0=; b=ELFBUKfQyWZcHiPrKzoUsZOYHTtbmcfMhPfasakEp+L2/mg2rz384bgTSD6knrBcE/ DS2mJhoUIVMdEVbuSnam/Jg1bTODxfNPXROa36n3dLDVNKp9gPpXXUYTB6oKPtt6WCqY 2syEtZ9V9IbJ10L/0avAAdq0LDXPTwJA8tgL+yxx8T0dreGJnkB+WiwgYVmGGJfjvvpr EOPukGieOiC2holEZd1JczHXeWmGrt5t+BWrvXUwHYWioCP9iGZCb8Tf+P7Ufehv4gU+ 4Xis8UQI8orUz4ZpD9Sw7X+sCRETWWRpL0cnUWM7vKF98MgS/Gln2FblwTTlnsS6qa6h H79w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=IpFWp4aQ; 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=NONE dis=NONE) header.from=hpe.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si108936ejx.593.2021.02.02.14.26.10; Tue, 02 Feb 2021 14:26:37 -0800 (PST) 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=@hpe.com header.s=pps0720 header.b=IpFWp4aQ; 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=NONE dis=NONE) header.from=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234403AbhBBObO (ORCPT + 99 others); Tue, 2 Feb 2021 09:31:14 -0500 Received: from mx0a-002e3701.pphosted.com ([148.163.147.86]:55104 "EHLO mx0a-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234452AbhBBO3S (ORCPT ); Tue, 2 Feb 2021 09:29:18 -0500 Received: from pps.filterd (m0150242.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 112EIcSv000968; Tue, 2 Feb 2021 14:28:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pps0720; bh=KgON0JNjPPn3agmdfKnN9oeNhsJWy56GgPCfWOLOKC0=; b=IpFWp4aQwHKekm3gQOeIJ0IQlKo7pLkN5MaFZlchEgRMQLomGLMRI+DslPKYtijNvCRx ctuwbLEyv2ng9tB+PlQWMZ+hrrVl0nOdvmE2Q96pvoAI1XX8Hb6K8L4iHv5jN4nvtvzL pF4p9sixxH9InMmx89lEozQijxLF2Qx6y7V3cJNkossoE2+gBtrKbSGH4uoI8MBltdAJ VXrTG8/D+QyG/AfUE3e5TuHu+Acb6NpSdkuFpXdfZJ5uyfjdOkUy8x450NxWWLiM8V5J /MDJEefWxMXJ++Xi4t5/ale/PjdKB1h03AC35KkQrHkFo8XaAatLbRureMyKGB+Y65B8 bg== Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0a-002e3701.pphosted.com with ESMTP id 36dgwuprs4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Feb 2021 14:28:05 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id BC92566; Tue, 2 Feb 2021 14:28:04 +0000 (UTC) Received: from dog.eag.rdlabs.hpecorp.net (dog.eag.rdlabs.hpecorp.net [128.162.243.181]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id B4E674E; Tue, 2 Feb 2021 14:28:02 +0000 (UTC) From: Mike Travis To: Borislav_Petkov_ , Thomas_Gleixner_ , Ingo_Molnar_ , Steve_Wahl_ , x86@kernel.org Cc: Georges Aureau , Mike Travis , Dimitri_Sivanich_ , Russ_Anderson_ , Darren_Hart_ , Andy_Shevchenko_ , "H._Peter_Anvin_" , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] x86/platform/uv: Add more to secondary cpu kdump info Date: Tue, 2 Feb 2021 08:27:46 -0600 Message-Id: <20210202142746.170353-1-mike.travis@hpe.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.737 definitions=2021-02-02_06:2021-02-02,2021-02-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 mlxscore=0 suspectscore=0 spamscore=0 phishscore=0 mlxlogscore=999 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102020098 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Georges Aureau 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 a5f526ec: change master/slave to main/secondary Signed-off-by: Georges Aureau Signed-off-by: Mike Travis Reviewed-by: Steve Wahl --- 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 eafc530c8767..f83810f7bcc2 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); } -- 2.21.0