Skip to content

Commit 7a33c14

Browse files
qzhuo2aegl
authored andcommitted
EDAC/{skx_common,i10nm}: Remove the AMAP register for determing DDR5
The configuration flag 'res_config->support_ddr5 = true' sufficiently indicates DDR5 memory support for Sapphire Rapids and Granite Rapids. Additionally, the i10nm_edac driver doesn't need to use the AMAP register for setting the 'fine_grain_bank' of each DIMM. Therefore, remove the AMAP register for determining DDR5. Signed-off-by: Qiuxu Zhuo <[email protected]> Signed-off-by: Tony Luck <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 8b93582 commit 7a33c14

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

drivers/edac/i10nm_base.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@
4747
readl((m)->mbase + ((m)->hbm_mc ? 0xef8 : \
4848
(res_cfg->type == GNR ? 0xaf8 : 0x20ef8)) + \
4949
(i) * (m)->chan_mmio_sz)
50-
#define I10NM_GET_AMAP(m, i) \
51-
readl((m)->mbase + ((m)->hbm_mc ? 0x814 : \
52-
(res_cfg->type == GNR ? 0xc14 : 0x20814)) + \
53-
(i) * (m)->chan_mmio_sz)
5450
#define I10NM_GET_REG32(m, i, offset) \
5551
readl((m)->mbase + (i) * (m)->chan_mmio_sz + (offset))
5652
#define I10NM_GET_REG64(m, i, offset) \
@@ -971,7 +967,7 @@ static int i10nm_get_dimm_config(struct mem_ctl_info *mci,
971967
{
972968
struct skx_pvt *pvt = mci->pvt_info;
973969
struct skx_imc *imc = pvt->imc;
974-
u32 mtr, amap, mcddrtcfg = 0;
970+
u32 mtr, mcddrtcfg = 0;
975971
struct dimm_info *dimm;
976972
int i, j, ndimms;
977973

@@ -980,7 +976,6 @@ static int i10nm_get_dimm_config(struct mem_ctl_info *mci,
980976
continue;
981977

982978
ndimms = 0;
983-
amap = I10NM_GET_AMAP(imc, i);
984979

985980
if (res_cfg->type != GNR)
986981
mcddrtcfg = I10NM_GET_MCDDRTCFG(imc, i);
@@ -992,7 +987,7 @@ static int i10nm_get_dimm_config(struct mem_ctl_info *mci,
992987
mtr, mcddrtcfg, imc->mc, i, j);
993988

994989
if (IS_DIMM_PRESENT(mtr))
995-
ndimms += skx_get_dimm_info(mtr, 0, amap, dimm,
990+
ndimms += skx_get_dimm_info(mtr, 0, 0, dimm,
996991
imc, i, j, cfg);
997992
else if (IS_NVDIMM_PRESENT(mcddrtcfg, j))
998993
ndimms += skx_get_nvdimm_info(dimm, imc, i, j,

drivers/edac/skx_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm,
363363
if (imc->hbm_mc) {
364364
banks = 32;
365365
mtype = MEM_HBM2;
366-
} else if (cfg->support_ddr5 && (amap & 0x8)) {
366+
} else if (cfg->support_ddr5) {
367367
banks = 32;
368368
mtype = MEM_DDR5;
369369
} else {

0 commit comments

Comments
 (0)