]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
EDAC/skx_common: Prepare for skx_get_edac_list()
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 Intel EDAC library 'skx_common' maintains the Intel server EDAC device
list for {skx, i10nm}_edac drivers, which use skx_get_all_bus_mappings()
to build and retrieve the EDAC device list.

However, the upcoming Intel EDAC driver, imh_edac, for Diamond Rapids
servers is designed for memory controllers that are MMIO-based devices
rather than PCI devices. Consequently, it can't use
skx_get_all_bus_mappings() due to the absence of a PCI bus. To accommodate
this, prepare skx_get_edac_list() to enable the upcoming imh_edac driver
to obtain the EDAC device list from the skx_common library and build the
EDAC device list independently.

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-3-qiuxu.zhuo@intel.com
drivers/edac/skx_common.c
drivers/edac/skx_common.h

index cf58cb5951abf411560073fceb50f1aa99f51b0b..6a1b30aa1ee69b37a01b33489524382b058424ce 100644 (file)
@@ -384,6 +384,12 @@ int skx_get_all_bus_mappings(struct res_config *cfg, struct list_head **list)
 }
 EXPORT_SYMBOL_GPL(skx_get_all_bus_mappings);
 
+struct list_head *skx_get_edac_list(void)
+{
+       return &dev_edac_list;
+}
+EXPORT_SYMBOL_GPL(skx_get_edac_list);
+
 int skx_get_hi_lo(unsigned int did, int off[], u64 *tolm, u64 *tohm)
 {
        struct pci_dev *pdev;
index 0be088f475878a014de1a285fce9b8837ce5982d..52734091a79d0871f973effbb61b133b3dbf5eb7 100644 (file)
@@ -293,6 +293,8 @@ int skx_get_src_id(struct skx_dev *d, int off, u8 *id);
 
 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);
 
 int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm,