From patchwork Wed Nov 18 15:15:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paoloni, Gabriele" X-Patchwork-Id: 11915317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, LOTS_OF_MONEY,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EE18C6379F for ; Wed, 18 Nov 2020 15:16:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E5F272474A for ; Wed, 18 Nov 2020 15:16:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727241AbgKRPQG (ORCPT ); Wed, 18 Nov 2020 10:16:06 -0500 Received: from mga12.intel.com ([192.55.52.136]:8044 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbgKRPQF (ORCPT ); Wed, 18 Nov 2020 10:16:05 -0500 IronPort-SDR: HYv+NxmuI3Dz4yzt6kBd0qUlAe06yEp/sydXK6TufaB/vjVlU/N/tAfU5oa8C6d72dclTo/eDL 1RKBYjGs8PlA== X-IronPort-AV: E=McAfee;i="6000,8403,9808"; a="150399368" X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="150399368" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2020 07:16:05 -0800 IronPort-SDR: FhT7lQxgVb3O+FEWaDT+DGgvl5M7rYr2Jw/7nkzcwdHVSZZFiGNSsXSFvavNBSBPlWoMCVPaHZ TOaOPvn+1F2A== X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="359492116" Received: from paolonig001.ir.intel.com ([163.33.183.93]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Nov 2020 07:16:03 -0800 From: Gabriele Paoloni To: tony.luck@intel.com, bp@alien8.de, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, hpa@zytor.com, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Cc: gabriele.paoloni@intel.com, linux-safety@lists.elisa.tech Subject: [PATCH 3/4] x86/mce: for LMCE panic only if mca_cfg.tolerant < 3 Date: Wed, 18 Nov 2020 15:15:51 +0000 Message-Id: <20201118151552.1412-4-gabriele.paoloni@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201118151552.1412-1-gabriele.paoloni@intel.com> References: <20201118151552.1412-1-gabriele.paoloni@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org Right now for LMCE if no_way_out is set mce_panic() is called regardless of mca_cfg.tolerant. This is not correct as if mca_cfg.tolerant = 3 we should never panic. Signed-off-by: Gabriele Paoloni Reviewed-by: Tony Luck --- arch/x86/kernel/cpu/mce/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c index e025ff04438f..d16cbb05b09c 100644 --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -1367,7 +1367,7 @@ noinstr void do_machine_check(struct pt_regs *regs) * to see it will clear it. */ if (lmce) { - if (no_way_out) + if (no_way_out && mca_cfg.tolerant < 3) mce_panic("Fatal local machine check", &m, msg); } else { order = mce_start(&no_way_out);