Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4926310rdb; Tue, 12 Dec 2023 13:22:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IH17hFKPJvzw2gwj70zKwRHr9dYh/5fiZruRl8XbjMwm9RipOKEh8GNI8CpLVvSF5tx7NEg X-Received: by 2002:a05:6a20:72a0:b0:18b:8158:86ea with SMTP id o32-20020a056a2072a000b0018b815886eamr8065396pzk.10.1702416175289; Tue, 12 Dec 2023 13:22:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702416175; cv=none; d=google.com; s=arc-20160816; b=jkk/PC+kP4gTe8k6NU1AIP13N4YEckWpZ6MKtzDdQpwsXB2aev/495OtoQEsURO1LW NiAW1sBrta1lD6qsoOJ+QgWJNPoZAmiGfVGZ6ndj3SnTcsfxAdWjbWUTVhd0pdASffZc LBobRBAZsNnnrqvRo4dYgtfBXwYhQjMHiQwLJAZhql2oaYOtd1iB+FSmzmpYrBSIIO30 hksTVDDjPmQER03EcbTi/Q7ckj7A5/iP8VUvDYkr6vdCYKYXRYWuigU5pja0smaX79no TkreS/RxNsftXk5byOe6DacnY7XrwijjllJq+VKXpnCK/2HjNin5TaJoQhtAA6xf03P1 2zbw== 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 Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id h16-20020a056a00219000b006ceda12a350si8053391pfi.227.2023.12.12.13.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 13:22:55 -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 E31BB804270B; Tue, 12 Dec 2023 13:22:52 -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 Content-Transfer-Encoding: 8bit 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:53 -0800 (PST) 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; -- 2.43.0