Skip to contentSkip to conversation

EDAC, sb_edac: Fix reporting wrong DIMM when patrol scrubber finds error

PATCH New Borislav Petkov 1 participant 1 message Sep 11, 2018 EDAC-core

lore
Share & tools
lore

Borislav Petkov

author maintainer
#0 lore raw

PATCH v4 2/2 EDAC, sb_edac: Fix reporting wrong DIMM when patrol scrubber finds error

Quoted 22 lines · Tony

From: Qiuxu Zhuo <[email protected]>

The sb_edac driver sometimes reports the wrong DIMM for a memory error found by the patrol scrubber. It's rooted in h/w that only provides a 4KB page aligned address for the error case. This means that the EDAC driver will point at the DIMM matching offset 0x0 in the 4KB page, but because of interleaving across channels and ranks the actual DIMM involved may be different if the error is on some other cache line within the page.

For this case, we can reconstruct the socket/iMC/channel information from the "mce" structure passed to the EDAC driver. We cannot determine the DIMM, so pass "dimm=-1" to the EDAC core. It will report all the DIMMs on that channel may be affected.

[Tony: Improved comments on the functions to convert bank number
to memory controller number. Minor cleanup to commit comment]

---

Quoted 7 lines

v4:
Fixed typo s/detemine/determine/
Changed the "msg" when we can't determine the "ha" to include the bank number. I've left this in the "msg" because we do use that in the error path to the edac core code. I don't think a KERN_ERROR message will help (especially as this is a "Can't happen(TM)" error).

Fair enough.

All applied,
thx.