Skip to contentSkip to conversation

EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell

PATCH In review Eric Badger 2 participants 2 messages Oct 10, 2021 – Oct 11, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EDAC/sb_edac: Fix top-of-high-memory value for Broadwell/Haswell

The computation of TOHM is off by one bit. This missed bit results in too low a value for TOHM, which can cause errors in regular memory to incorrectly report:

EDAC MC0: 1 CE Error at MMIOH area, on addr 0x000000207fffa680 on any memory

---
 drivers/edac/sb_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/sb_edac.c +1 -1
index 4c626fc..1522d4a 100644
@@ -1052,7 +1052,7 @@ static u64 haswell_get_tohm(struct sbridge_pvt *pvt)
 	pci_read_config_dword(pvt->info.pci_vtd, HASWELL_TOHM_1, &reg);
 	rc = ((reg << 6) | rc) << 26;
 
-	return rc | 0x1ffffff;
+	return rc | 0x3ffffff;
 }
 
 static u64 knl_get_tolm(struct sbridge_pvt *pvt)
maintainer
#1 lore raw
Quoted 8 lines · Eric Badger

The computation of TOHM is off by one bit. This missed bit results in too low a value for TOHM, which can cause errors in regular memory to incorrectly report:

EDAC MC0: 1 CE Error at MMIOH area, on addr 0x000000207fffa680 on any memory

Applied (with added Fixes: tag and Cc: stable).

Thanks

-Tony