Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp435203pxf; Thu, 11 Mar 2021 07:13:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvRFqbJYTcH/z3VJGe6pI8cjIu5gecK9L7GsTzfJM1BOYWJm/SrRrUlc/jjrkNwfM2axmP X-Received: by 2002:a17:906:5611:: with SMTP id f17mr3607589ejq.208.1615475601571; Thu, 11 Mar 2021 07:13:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615475601; cv=none; d=google.com; s=arc-20160816; b=aXOg52AEidoHIz/esMALgksEnTD1tk8G+9Xe/miVpHFRHM5mTPZUDT4XvSM4KXdXqq PPogoIkBe1t81bdhxRAXTy625mTTKeptwy7HT+odjwNoe8G3e0FIJEERXKWSvZ8+5jC6 UnEuFB+oPAugtCUSfRM7+czP9l4cWyyak5+TUwoQDIlAO9HRED66Tg2IndCuWwybsbZW ZAW2gFqRH7riGgp4fCUTzofvsJzHluwWen+w0rqs6X6gu7DxyvetYltr45LMpVonQ8HF IQpcTmBwXv1v0mYrN0ezfjW3QmFR4+R8N1WkhJ3V/AJkUobCVjVNUZ4PeAM1TPvKaRmS aNWg== 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=NXa6OVP7yBfZIXXTlXMRUkEX/gmfU6wEVXa0nws4IG7TaVYqpwhRyGdCZhygqKCZtM pm8TaPyP6BHX41XPd+NEEexP1NBsTGW6u7Zr6bd7amXdLpgYFAv3QX1Y7WF9p1SaQmK0 hIL6nIqNhf63a1C08T1T5ZuU9wx86rVAsyE87klbAb+5TTDs1NAjXKAedyUfMDH8En2C xxDep7W0A891PcZse8zKJ+PqfAT6l1+A+zUnHf8kUDm8DkACzpQxg8vFSTieI/xvF2Bb QnDFOuaMvlQAYijTyRRvjDsWWdkTkoKX+A9FmM8DT6xCJBUmcvwzAaWnazY5t4pSSNvh XkjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=Z9lP1LFR; 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 js6si1901063ejc.497.2021.03.11.07.12.58; Thu, 11 Mar 2021 07:13:21 -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=Z9lP1LFR; 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 S233985AbhCKPL3 (ORCPT + 99 others); Thu, 11 Mar 2021 10:11:29 -0500 Received: from mx0b-002e3701.pphosted.com ([148.163.143.35]:32886 "EHLO mx0b-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233978AbhCKPLZ (ORCPT ); Thu, 11 Mar 2021 10:11:25 -0500 Received: from pps.filterd (m0148664.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 12BF3LwI011868; Thu, 11 Mar 2021 15:10:43 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=Z9lP1LFRS8/LA/bKCcS3pd9zGFa2gSRWwWgFmkIDK8C9x9Y1uY8bEPg3efU7W0wJJKxY +R75srS9eatU0wLo2eiKNb8+6WYaW0+3PPpNnbimAA4cJrb5YS+QMPT7VvpAemMO0zbw K55jjZQnaCAVvuDK+TkXwmFt0hD9c40gIuT6gAaVXfJzsVgYvbWH6ThLyRETMXFhWpAL w5xO5K3MButeSR/Bi7rd3TvR9WX1557i+PpPsbqyQqZFOf05W7ywHGStH8Ias4P7bxgW 3GL23KaVsdzLT4eRggl93Fo2SuGOVNtf0uklzbS9vz78P2n34Jc/s5Yy4que/L8kzR12 fw== Received: from g9t5008.houston.hpe.com (g9t5008.houston.hpe.com [15.241.48.72]) by mx0b-002e3701.pphosted.com with ESMTP id 377ev23ee1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Mar 2021 15:10:43 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5008.houston.hpe.com (Postfix) with ESMTP id 4AB6653; Thu, 11 Mar 2021 15:10:42 +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 20DC748; Thu, 11 Mar 2021 15:10:39 +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: Thu, 11 Mar 2021 09:10:28 -0600 Message-Id: <20210311151028.82678-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.761 definitions=2021-03-11_05:2021-03-10,2021-03-11 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1011 adultscore=0 mlxlogscore=999 impostorscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103110082 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