Skip to content

Commit 92f8358

Browse files
committed
Merge remote-tracking branches 'ras/edac-amd-atl', 'ras/edac-misc' and 'ras/edac-drivers' into edac-updates
* ras/edac-amd-atl: RAS/AMD/ATL: Translate normalized to system physical addresses using PRM ACPI: PRM: Add PRM handler direct call support * ras/edac-misc: EDAC/synopsys: Fix error injection on Zynq UltraScale+ * ras/edac-drivers: EDAC: Drop obsolete PPC4xx driver EDAC/sb_edac: Fix the compile warning of large frame size EDAC/{skx_common,i10nm}: Remove the AMAP register for determing DDR5 EDAC/{skx_common,skx,i10nm}: Move the common debug code to skx_common EDAC/igen6: Fix conversion of system address to physical memory address Signed-off-by: Borislav Petkov (AMD) <[email protected]>
3 parents 26e43c9 + 35e6dbf + a5f285d commit 92f8358

File tree

11 files changed

+115
-1729
lines changed

11 files changed

+115
-1729
lines changed

drivers/edac/Kconfig

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -311,15 +311,6 @@ config EDAC_CELL
311311
Cell Broadband Engine internal memory controller
312312
on platform without a hypervisor
313313

314-
config EDAC_PPC4XX
315-
tristate "PPC4xx IBM DDR2 Memory Controller"
316-
depends on 4xx
317-
help
318-
This enables support for EDAC on the ECC memory used
319-
with the IBM DDR2 memory controller found in various
320-
PowerPC 4xx embedded processors such as the 405EX[r],
321-
440SP, 440SPe, 460EX, 460GT and 460SX.
322-
323314
config EDAC_AMD8131
324315
tristate "AMD8131 HyperTransport PCI-X Tunnel"
325316
depends on PCI && PPC_MAPLE

drivers/edac/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ i10nm_edac-y := i10nm_base.o
6363
obj-$(CONFIG_EDAC_I10NM) += i10nm_edac.o skx_edac_common.o
6464

6565
obj-$(CONFIG_EDAC_CELL) += cell_edac.o
66-
obj-$(CONFIG_EDAC_PPC4XX) += ppc4xx_edac.o
6766
obj-$(CONFIG_EDAC_AMD8111) += amd8111_edac.o
6867
obj-$(CONFIG_EDAC_AMD8131) += amd8131_edac.o
6968

drivers/edac/i10nm_base.c

Lines changed: 4 additions & 57 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,
@@ -1013,54 +1008,6 @@ static struct notifier_block i10nm_mce_dec = {
10131008
.priority = MCE_PRIO_EDAC,
10141009
};
10151010

1016-
#ifdef CONFIG_EDAC_DEBUG
1017-
/*
1018-
* Debug feature.
1019-
* Exercise the address decode logic by writing an address to
1020-
* /sys/kernel/debug/edac/i10nm_test/addr.
1021-
*/
1022-
static struct dentry *i10nm_test;
1023-
1024-
static int debugfs_u64_set(void *data, u64 val)
1025-
{
1026-
struct mce m;
1027-
1028-
pr_warn_once("Fake error to 0x%llx injected via debugfs\n", val);
1029-
1030-
memset(&m, 0, sizeof(m));
1031-
/* ADDRV + MemRd + Unknown channel */
1032-
m.status = MCI_STATUS_ADDRV + 0x90;
1033-
/* One corrected error */
1034-
m.status |= BIT_ULL(MCI_STATUS_CEC_SHIFT);
1035-
m.addr = val;
1036-
skx_mce_check_error(NULL, 0, &m);
1037-
1038-
return 0;
1039-
}
1040-
DEFINE_SIMPLE_ATTRIBUTE(fops_u64_wo, NULL, debugfs_u64_set, "%llu\n");
1041-
1042-
static void setup_i10nm_debug(void)
1043-
{
1044-
i10nm_test = edac_debugfs_create_dir("i10nm_test");
1045-
if (!i10nm_test)
1046-
return;
1047-
1048-
if (!edac_debugfs_create_file("addr", 0200, i10nm_test,
1049-
NULL, &fops_u64_wo)) {
1050-
debugfs_remove(i10nm_test);
1051-
i10nm_test = NULL;
1052-
}
1053-
}
1054-
1055-
static void teardown_i10nm_debug(void)
1056-
{
1057-
debugfs_remove_recursive(i10nm_test);
1058-
}
1059-
#else
1060-
static inline void setup_i10nm_debug(void) {}
1061-
static inline void teardown_i10nm_debug(void) {}
1062-
#endif /*CONFIG_EDAC_DEBUG*/
1063-
10641011
static int __init i10nm_init(void)
10651012
{
10661013
u8 mc = 0, src_id = 0, node_id = 0;
@@ -1159,7 +1106,7 @@ static int __init i10nm_init(void)
11591106

11601107
opstate_init();
11611108
mce_register_decode_chain(&i10nm_mce_dec);
1162-
setup_i10nm_debug();
1109+
skx_setup_debug("i10nm_test");
11631110

11641111
if (retry_rd_err_log && res_cfg->offsets_scrub && res_cfg->offsets_demand) {
11651112
skx_set_decode(i10nm_mc_decode, show_retry_rd_err_log);
@@ -1187,7 +1134,7 @@ static void __exit i10nm_exit(void)
11871134
enable_retry_rd_err_log(false);
11881135
}
11891136

1190-
teardown_i10nm_debug();
1137+
skx_teardown_debug();
11911138
mce_unregister_decode_chain(&i10nm_mce_dec);
11921139
skx_adxl_put();
11931140
skx_remove();

drivers/edac/igen6_edac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ static u64 ehl_err_addr_to_imc_addr(u64 eaddr, int mc)
316316
if (igen6_tom <= _4GB)
317317
return eaddr + igen6_tolud - _4GB;
318318

319-
if (eaddr < _4GB)
319+
if (eaddr >= igen6_tom)
320320
return eaddr + igen6_tolud - igen6_tom;
321321

322322
return eaddr;

0 commit comments

Comments
 (0)