diff options
| author | Tony Luck <tony.luck@intel.com> | 2026-08-28 08:29:58 -0700 |
|---|---|---|
| committer | Tony Luck <tony.luck@intel.com> | 2026-09-08 13:48:08 -0700 |
| commit | d4ffdf94fe08e0e3be978fbce85633ef2e7c623a (patch) | |
| tree | 41fffdc17a314a6ad35f88d99e44bfd53711fb3f | |
| parent | 46cff0be63379264a311cd43be09e1fdd38d1abc (diff) | |
| download | linux-next-d4ffdf94fe08e0e3be978fbce85633ef2e7c623a.tar.gz linux-next-d4ffdf94fe08e0e3be978fbce85633ef2e7c623a.zip | |
EDAC/intel-bff: Add stub Intel bitfix filter driver
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>
Link: https://patch.msgid.link/20260828153002.10290-4-tony.luck@intel.com
| -rw-r--r-- | MAINTAINERS | 6 | ||||
| -rw-r--r-- | drivers/edac/Kconfig | 13 | ||||
| -rw-r--r-- | drivers/edac/Makefile | 2 | ||||
| -rw-r--r-- | drivers/edac/intel-bff.c | 54 |
4 files changed, 75 insertions, 0 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 6215fcb07770..77383c50e240 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9490,6 +9490,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 L: linux-edac@vger.kernel.org S: Orphan 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 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"); |
