From patchwork Tue Dec 12 21:22:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luck, Tony" X-Patchwork-Id: 177603 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp8010833vqy; Tue, 12 Dec 2023 13:22:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHo39gi7HxoPnBe0I0zjjOIdm9vNhKLPVIHSANYXk2krrkzPFhaRo+GIaUxcmDgEuEFyV46 X-Received: by 2002:a17:90a:cb08:b0:286:8ae4:3df0 with SMTP id z8-20020a17090acb0800b002868ae43df0mr5977313pjt.56.1702416172537; Tue, 12 Dec 2023 13:22:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702416172; cv=none; d=google.com; s=arc-20160816; b=xWNXuGSjpnwmR+wGrssFfcOq98sYY/otXNDMNM8DRup18pglB2sPt1wWXB8UFquZAB m6XijKbQMPNlhADiPtGi6txmDy9syn44Um9DGISj54T4cUmsdRHEwPz5S3ovW5xp12Mz zHoqO0H3ih7i7rIp+hAIjL25ah0OiF8dkt74XrJ0uYedNnz52R+13lB2/GKAbEI/RByi Q+wZE7tstpnlBEturXTzOvBGf8NBhQuFcfWZJESox859QarP/lL3JaEcEOBpJuyMADSf BkqB9pQWjEGZZrO20KRjbifRPZfz3sRC2nDLQ7RLrsXyjHHs4ssd4F2EuxYVYd36kMep pqsQ== 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=WFmp5wFgLOsrmvScnYgnuQbLnsjNU2R6hxhXkPpVDv4=; fh=3IBVUkHifd8HNmnWzWOObVoN2T6dg23SsD07wIGPgKU=; b=jpoPIbq8VdWA9dTmPiGKoldt3Hd5ByhQ/L1JgD/nPbETjOz7bgYCFJm8DZDwFXM+Ap E8R4DCDaWdGAq912ZjBNewqz9Gfu99Sx6yupwLdch3MgKs+lIQloSxdfftNISQqddILA Tuq7vIiWiGEbkMFmWAgbqxLGUhJf+R6SD/XClvfTvT3mR5HRPqFPNioFui+FiZ/3xsOx 1OFQz3G0cH/XvdLH7Wyjsp0euYHyNds93Py0o68fCJgxeqBdx4Tm13QEQyjMr4FeJjEV N3YLy6zz0HBs2847rK4EpUMjI5wqT1/g5O9lPVpPiJNsEZXtl8Qddbg6QFRUOUM/Zme2 WSfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HCbsEDvs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id o12-20020a17090ac08c00b0028688bb3d17si8359625pjs.159.2023.12.12.13.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 13:22:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HCbsEDvs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 087AC80F6B78; Tue, 12 Dec 2023 13:22:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377558AbjLLVWk (ORCPT + 99 others); Tue, 12 Dec 2023 16:22:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377485AbjLLVWj (ORCPT ); Tue, 12 Dec 2023 16:22:39 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DBE7AD; Tue, 12 Dec 2023 13:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702416165; x=1733952165; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=kSQPBcRC7qiyHc9BBLXSnCeVZp/WbDJvRtGqOuMn0T0=; b=HCbsEDvsUnwkyuAyqqiaO5i+RheqKLg63SqAJzvvWs5b/oWjzJ3uQJzr U7cRA21iGEGEbse/Yx2em7SPmII7nV48gfQFFcnVWnq9kZYjfWS0OrPZl 0y+IJcHHQct3IgYfMOUcpQYbCGi/OxS3LCx3Ryxi5Ywge2kA1cgtMXDhI yKt+DitqgCntcyACJqQw8dliRpkjECKhdRo6yJ8+MmKecECopd2qDteV6 630iVayMmv0Vx8lEw2DxVDskN/OkOux8r0wHp72lRkv2b2lkU3eawTJbq l6E6R00govdti4l+76Mbu+TLHrx/WeU8mhb46ateDHg0x5QLEmFuoN0yY A==; X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="2040514" X-IronPort-AV: E=Sophos;i="6.04,271,1695711600"; d="scan'208";a="2040514" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2023 13:22:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,271,1695711600"; d="scan'208";a="17648342" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2023 13:22:45 -0800 From: Tony Luck To: "Rafael J. Wysocki" Cc: Erwin Tsaur , Borislav Petkov , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH] ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error Date: Tue, 12 Dec 2023 13:22:39 -0800 Message-ID: <20231212212239.8971-1-tony.luck@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 12 Dec 2023 13:22:49 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785112740246474291 X-GMAIL-MSGID: 1785112740246474291 When both CONFIG_RAS_CEC and CONFIG_ACPI_EXTLOG are enabled, Linux does not clear the status word of the BIOS supplied error record for corrected errors. This may prevent logging of subsequent uncorrected errors. Fix by clearing the status. Fixes: 23ba710a0864 ("x86/mce: Fix all mce notifiers to update the mce->kflags bitmask") Reported-by: Erwin Tsaur Signed-off-by: Tony Luck --- drivers/acpi/acpi_extlog.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c index e120a96e1eae..71e8d4e7a36c 100644 --- a/drivers/acpi/acpi_extlog.c +++ b/drivers/acpi/acpi_extlog.c @@ -145,9 +145,14 @@ static int extlog_print(struct notifier_block *nb, unsigned long val, static u32 err_seq; estatus = extlog_elog_entry_check(cpu, bank); - if (estatus == NULL || (mce->kflags & MCE_HANDLED_CEC)) + if (!estatus) return NOTIFY_DONE; + if (mce->kflags & MCE_HANDLED_CEC) { + estatus->block_status = 0; + return NOTIFY_DONE; + } + memcpy(elog_buf, (void *)estatus, ELOG_ENTRY_LEN); /* clear record status to enable BIOS to update it again */ estatus->block_status = 0;