Skip to content

Commit 9529e69

Browse files
qzhuo2aegl
authored andcommitted
EDAC/skx_common: Prepare for skx_get_edac_list()
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
1 parent b3d7005 commit 9529e69

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/edac/skx_common.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,12 @@ int skx_get_all_bus_mappings(struct res_config *cfg, struct list_head **list)
384384
}
385385
EXPORT_SYMBOL_GPL(skx_get_all_bus_mappings);
386386

387+
struct list_head *skx_get_edac_list(void)
388+
{
389+
return &dev_edac_list;
390+
}
391+
EXPORT_SYMBOL_GPL(skx_get_edac_list);
392+
387393
int skx_get_hi_lo(unsigned int did, int off[], u64 *tolm, u64 *tohm)
388394
{
389395
struct pci_dev *pdev;

drivers/edac/skx_common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ int skx_get_src_id(struct skx_dev *d, int off, u8 *id);
293293

294294
int skx_get_all_bus_mappings(struct res_config *cfg, struct list_head **list);
295295

296+
struct list_head *skx_get_edac_list(void);
297+
296298
int skx_get_hi_lo(unsigned int did, int off[], u64 *tolm, u64 *tohm);
297299

298300
int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm,

0 commit comments

Comments
 (0)