[PATCH v2 3/7] EDAC/intel-bff: Add stub Intel bitfix filter driver
From: Tony Luck
Date: Fri Aug 28 2026 - 11:34:21 EST
Check if the platform supports threshold based cache error reporting and
the bitfix filter reset feature.
Co-developed-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>
Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
S: Maintained
F: drivers/edac/igen6_edac.c
+EDAC-INTEL-BFF-RESET
+M: Tony Luck <tony.luck@xxxxxxxxx>
+L: linux-edac@xxxxxxxxxxxxxxx
+S: Maintained
+F: drivers/edac/intel-bff.c
+
EDAC-MPC85XX
M: Johannes Thumshirn <morbidrsa@xxxxxxxxx>
L: linux-edac@xxxxxxxxxxxxxxx
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