]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
EDAC/skx_common: Prepare for skx_set_hi_lo()
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Wed, 19 Nov 2025 20:11:40 +0000 (12:11 -0800)
committerTony Luck <tony.luck@intel.com>
Wed, 19 Nov 2025 20:11:40 +0000 (12:11 -0800)
The upcoming imh_edac driver for Intel Diamond Rapids servers cannot
use skx_get_hi_lo() in skx_common to retrieve the TOHM (Top of High
Memory) and TOLM (Top of Low Memory) parameters. Instead, it obtains
these parameters within its own EDAC driver. To accommodate this,
prepare skx_set_hi_lo() to allow the driver to notify skx_common of
these parameters.

Tested-by: Yi Lai <yi1.lai@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/20251119134132.2389472-4-qiuxu.zhuo@intel.com
drivers/edac/skx_common.c
drivers/edac/skx_common.h

index 6a1b30aa1ee69b37a01b33489524382b058424ce..e45abd0008ef7d757ddc9e18657f20241cbf548d 100644 (file)
@@ -430,6 +430,13 @@ fail:
 }
 EXPORT_SYMBOL_GPL(skx_get_hi_lo);
 
+void skx_set_hi_lo(u64 tolm, u64 tohm)
+{
+       skx_tolm = tolm;
+       skx_tohm = tohm;
+}
+EXPORT_SYMBOL_GPL(skx_set_hi_lo);
+
 static int skx_get_dimm_attr(u32 reg, int lobit, int hibit, int add,
                             int minval, int maxval, const char *name)
 {
index 52734091a79d0871f973effbb61b133b3dbf5eb7..86a883d3c2a4b44c90abcb887ab0510aab8fd402 100644 (file)
@@ -296,6 +296,7 @@ int skx_get_all_bus_mappings(struct res_config *cfg, struct list_head **list);
 struct list_head *skx_get_edac_list(void);
 
 int skx_get_hi_lo(unsigned int did, int off[], u64 *tolm, u64 *tohm);
+void skx_set_hi_lo(u64 tolm, u64 tohm);
 
 int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm,
                      struct skx_imc *imc, int chan, int dimmno,