Skip to content

Commit d483958

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

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/edac/skx_common.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,13 @@ int skx_get_hi_lo(unsigned int did, int off[], u64 *tolm, u64 *tohm)
430430
}
431431
EXPORT_SYMBOL_GPL(skx_get_hi_lo);
432432

433+
void skx_set_hi_lo(u64 tolm, u64 tohm)
434+
{
435+
skx_tolm = tolm;
436+
skx_tohm = tohm;
437+
}
438+
EXPORT_SYMBOL_GPL(skx_set_hi_lo);
439+
433440
static int skx_get_dimm_attr(u32 reg, int lobit, int hibit, int add,
434441
int minval, int maxval, const char *name)
435442
{

drivers/edac/skx_common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ int skx_get_all_bus_mappings(struct res_config *cfg, struct list_head **list);
296296
struct list_head *skx_get_edac_list(void);
297297

298298
int skx_get_hi_lo(unsigned int did, int off[], u64 *tolm, u64 *tohm);
299+
void skx_set_hi_lo(u64 tolm, u64 tohm);
299300

300301
int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm,
301302
struct skx_imc *imc, int chan, int dimmno,

0 commit comments

Comments
 (0)