Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp264874pxb; Thu, 21 Jan 2021 06:40:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmF0q3Vaqq8lVEsLF9LB2lwFjyN6hAR2oQUyMseoGIMxe48T7zz13oCNNH73EWuPww/QnC X-Received: by 2002:a05:6402:378:: with SMTP id s24mr11885983edw.376.1611240026845; Thu, 21 Jan 2021 06:40:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611240026; cv=none; d=google.com; s=arc-20160816; b=yc48yy0h7XKgW9R3oAzSkGQkEiaO5Xvwaq4MK+pNQGUTadO1qvC6QsJhLY+8pTD1XW 9gi/vszZfQfdXASiUF86qjTw6uL8bc8vlDFPYr7ZmQZjjmRSHVzT2DlELaA3P6m3xs+B zyggzS61CA7+Kf++LrsgSEXKfktv1gJIBvq3UH75M4t8ngpad1YSl0JE9O3c3/UP5Dq4 Kd8UOck0jldfZ8Y1BAiUOIRigDmoAHl+SegiSkXp8csw64tQH/xprMlm4H9kqCP+lAWX ufXdw0wBvS8M0lRa2e3l1zCctYi186WWxbR3XbQHZlVk19MXfLn0zsI92IVut8trin2x YTtw== 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=0MXIu+iQRzEA0DF9ZZBMhu5WrA+bTTc3Keto/yNgckI=; b=Jopf48EnkIFbpz3ilioULJWc0YgleYS7Zer6zLPiPE2SjsmJ/MXKErbKr4vgtFJwWP GUcS8fUVuzcYhljl+8/rpJwmntUektAhMPTQQcn64+W/B6mUXdd5Utr7MXVtTOqVCzr1 PrMkXluHU1RzyT31OsUKIeXdLJwib7UHv3yYk24Gd6Xgyhz8fpUkEF4gjWhpWgNl2ijz MLh52dSDKUVUxGZdOTyC8wUB8gZJtFwCQttnY6t/oo6Q0rc4h+OTeuM/Qf2sp0O2iU3m +TyuJJ4bSR7c/spyYUjyit+PL2di89jBucAZgSj5OBZpF5YtDfNYKGlkZi9s3wKRYuQn 4O0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=SdGf8GDm; 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 e5si2350148edy.556.2021.01.21.06.39.44; Thu, 21 Jan 2021 06:40:26 -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=SdGf8GDm; 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 S1731459AbhAUOfj (ORCPT + 99 others); Thu, 21 Jan 2021 09:35:39 -0500 Received: from mx0b-002e3701.pphosted.com ([148.163.143.35]:53454 "EHLO mx0b-002e3701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726162AbhAUOfd (ORCPT ); Thu, 21 Jan 2021 09:35:33 -0500 Received: from pps.filterd (m0134423.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10LEU6cG004315; Thu, 21 Jan 2021 14:34:18 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=0MXIu+iQRzEA0DF9ZZBMhu5WrA+bTTc3Keto/yNgckI=; b=SdGf8GDmXai84lQhYDHo39IAJROpq1KIyl0N5mcZKyUZ/99+IgmIGe2bl7r3DzapvKF0 irhG5GmjvM0/wgikvQYu97u9n/jKvCQv/1UB3TUzgxtTqsMfI94oVROBW3TsXZHHpkcF gtf0ZocE8M4Cr4bXYcMXXQHqlWn/mhry+AAsWGRADIiZkc6KMPfYOQdecdM+Set8HM8a 3s+ELsgECa8Ws5uX+wj8uCe2hUbvxnC4Jau9Adfib/NWknKvxIXQ3k+WcKzZpAcsHTuY Sv9FNUTbMB3tnJ32ipekfJKhAF+j5JYXAkAhHfCmh0o1mNSHOR5+wJQ2hoEYoZcj7b7l vQ== Received: from g4t3426.houston.hpe.com (g4t3426.houston.hpe.com [15.241.140.75]) by mx0b-002e3701.pphosted.com with ESMTP id 3668raffxb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Jan 2021 14:34:18 +0000 Received: from g4t3433.houston.hpecorp.net (g4t3433.houston.hpecorp.net [16.208.49.245]) by g4t3426.houston.hpe.com (Postfix) with ESMTP id 1BA5260; Thu, 21 Jan 2021 14:34:17 +0000 (UTC) Received: from dog.eag.rdlabs.hpecorp.net (dog.eag.rdlabs.hpecorp.net [128.162.243.181]) by g4t3433.houston.hpecorp.net (Postfix) with ESMTP id F2F2846; Thu, 21 Jan 2021 14:34:15 +0000 (UTC) From: Mike Travis To: Borislav_Petkov_ , Thomas_Gleixner_ , Ingo_Molnar_ , Steve_Wahl_ , x86@kernel.org Cc: Mike Travis , Georges Aureau , 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 slave cpu kdump info Date: Thu, 21 Jan 2021 08:33:47 -0600 Message-Id: <20210121143347.439867-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.343,18.0.737 definitions=2021-01-21_06:2021-01-21,2021-01-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 bulkscore=0 adultscore=0 spamscore=0 clxscore=1011 phishscore=0 suspectscore=0 lowpriorityscore=0 mlxlogscore=999 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101210081 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add call to run_crash_ipi_callback() to gather more info of what the slave cpus were doing to help with failure analysis. Excerpt from Georges: 'It is only changing where crash slaves 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.' Signed-off-by: Mike Travis Signed-off-by: Georges Aureau Reviewed-by: Steve Wahl --- arch/x86/platform/uv/uv_nmi.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c index eafc530c8767..811997b16b42 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,28 +835,35 @@ static void uv_nmi_touch_watchdogs(void) touch_nmi_watchdog(); } -static atomic_t uv_nmi_kexec_failed; - #if defined(CONFIG_KEXEC_CORE) +static atomic_t uv_nmi_kexec_failed; static void uv_nmi_kdump(int cpu, int master, struct pt_regs *regs) { + /* Check if kdump kernel loaded for both master and slave CPUs */ + if (!kexec_crash_image) { + if (master) + pr_err("UV: NMI error: kdump kernel not loaded\n"); + return; + } + /* Call crash to dump system state */ if (master) { 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 { + /* If kdump kernel fails, slaves will exit this loop */ + while (atomic_read(&uv_nmi_kexec_failed) == 0) { + /* + * If crash exec sets "crash_ipi_issued", + * ... slaves do not return from callback function. + */ + 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 */ -- 2.21.0