From: Tony Luck <tony.luck@intel.com>
To: Tony Luck <tony.luck@intel.com>
Cc: "Borislav Petkov" <bp@alien8.de>,
"Qiuxu Zhuo" <qiuxu.zhuo@intel.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Breno Leitao" <leitao@debian.org>,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@lists.linux.dev
Subject: [PATCH v2 3/7] EDAC/intel-bff: Add stub Intel bitfix filter driver
Date: Fri, 28 Aug 2026 08:29:58 -0700 [thread overview]
Message-ID: <20260828153002.10290-4-tony.luck@intel.com> (raw)
In-Reply-To: <20260828153002.10290-1-tony.luck@intel.com>
Check if the platform supports threshold based cache error reporting and
the bitfix filter reset feature.
Co-developed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
drivers/edac/intel-bff.c | 54 ++++++++++++++++++++++++++++++++++++++++
MAINTAINERS | 6 +++++
drivers/edac/Kconfig | 13 ++++++++++
drivers/edac/Makefile | 2 ++
4 files changed, 75 insertions(+)
create mode 100644 drivers/edac/intel-bff.c
diff --git a/drivers/edac/intel-bff.c b/drivers/edac/intel-bff.c
new file mode 100644
index 000000000000..905cbe58bc53
--- /dev/null
+++ b/drivers/edac/intel-bff.c
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/* Copyright(c) 2026 Intel Corporation. */
+
+/*
+ * Intel driver to reset bitfix filters when they overflow.
+ *
+ * Each bitfix filter has limited slots to track corrected errors.
+ * These slots can be filled by transient corrected errors (e.g.,
+ * bit flips from particle strikes) that don't represent permanent
+ * hardware defects.
+ *
+ * When the filter overflows (yellow status), reset it to reclaim
+ * slots occupied by transient corrected errors. If the overflow
+ * repeats frequently after reset, it indicates persistent hardware
+ * defects that need attention: the system should be scheduled for
+ * servicing.
+ */
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+#include <linux/cpufeature.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/types.h>
+
+#include <asm/cpufeatures.h>
+#include <asm/mce.h>
+#include <asm/msr.h>
+#include <asm/msr-index.h>
+
+static int __init bff_init(void)
+{
+ u64 core_caps, mcg_cap;
+
+ if (!cpu_feature_enabled(X86_FEATURE_MCA))
+ return -ENODEV;
+ rdmsrq(MSR_IA32_MCG_CAP, mcg_cap);
+ if (!(mcg_cap & MCG_TES_P))
+ return -ENODEV;
+
+ if (!cpu_feature_enabled(X86_FEATURE_CORE_CAPABILITIES))
+ return -ENODEV;
+ rdmsrq(MSR_IA32_CORE_CAPS, core_caps);
+ if (!(core_caps & MSR_IA32_CORE_CAPS_BFF_RESET))
+ return -ENODEV;
+
+ return 0;
+}
+
+module_init(bff_init);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Tony Luck");
+MODULE_DESCRIPTION("Intel bitfix filter reset driver");
diff --git a/MAINTAINERS b/MAINTAINERS
index 8014b9f8253e..edc50f7cb025 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9405,6 +9405,12 @@ L: linux-edac@vger.kernel.org
S: Maintained
F: drivers/edac/igen6_edac.c
+EDAC-INTEL-BFF-RESET
+M: Tony Luck <tony.luck@intel.com>
+L: linux-edac@vger.kernel.org
+S: Maintained
+F: drivers/edac/intel-bff.c
+
EDAC-MPC85XX
M: Johannes Thumshirn <morbidrsa@gmail.com>
L: linux-edac@vger.kernel.org
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index a44b85c440ca..f7964cd9545e 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -280,6 +280,19 @@ config EDAC_IMH
first used on the Diamond Rapids servers but may appear on
others in the future.
+config EDAC_INTEL_BFF_RESET
+ tristate "Intel bitfix filter reset driver"
+ depends on X86_64 && X86_MCE_INTEL
+ help
+ Support for Intel systems that implement bitfix filters to
+ suppress repeated logging and signaling of the same corrected
+ error. Those filters can become clogged with transient errors
+ over time. Clearing the filter may make space for additional
+ hard errors.
+
+ To compile this driver as a module, choose M here: the module
+ will be called intel_bff.
+
config EDAC_PND2
tristate "Intel Pondicherry2"
depends on PCI && X86_64 && X86_MCE_INTEL
diff --git a/drivers/edac/Makefile b/drivers/edac/Makefile
index a37534300ab9..c2bae03f247b 100644
--- a/drivers/edac/Makefile
+++ b/drivers/edac/Makefile
@@ -66,6 +66,8 @@ obj-$(CONFIG_EDAC_I10NM) += i10nm_edac.o skx_edac_common.o
imh_edac-y := imh_base.o
obj-$(CONFIG_EDAC_IMH) += imh_edac.o skx_edac_common.o
+obj-$(CONFIG_EDAC_INTEL_BFF_RESET) += intel-bff.o
+
obj-$(CONFIG_EDAC_HIGHBANK_MC) += highbank_mc_edac.o
obj-$(CONFIG_EDAC_HIGHBANK_L2) += highbank_l2_edac.o
--
2.55.0
next prev parent reply other threads:[~2026-08-28 15:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 15:29 [PATCH v2 0/7] EDAC/intel-bff: Driver to reset bitfix filters Tony Luck
2026-08-28 15:29 ` [PATCH v2 1/7] cacheinfo: Export get_cpu_cacheinfo_id() for loadable modules Tony Luck
2026-08-28 15:29 ` [PATCH v2 2/7] x86/mce: Add enumeration for Intel bitfix filter reset Tony Luck
2026-08-28 15:29 ` Tony Luck [this message]
2026-08-28 15:29 ` [PATCH v2 4/7] EDAC/intel-bff: Add Diamond Rapids support Tony Luck
2026-08-28 15:30 ` [PATCH v2 5/7] EDAC/intel-bff: Reset bitfix filter when it overflows Tony Luck
2026-08-28 15:30 ` [PATCH v2 6/7] EDAC/intel-bff: Compute unique ID for overflowed filter Tony Luck
2026-08-28 15:30 ` [PATCH v2 7/7] EDAC/intel-bff: Report frequent filter overflows Tony Luck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260828153002.10290-4-tony.luck@intel.com \
--to=tony.luck@intel.com \
--cc=bp@alien8.de \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=leitao@debian.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=qiuxu.zhuo@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®