EDAC, sb_edac: Fix reporting wrong DIMM when patrol scrubber finds error
Borislav Petkov
maintainerPATCH 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_edacdriver 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 offset0x0in 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]Signed-off-by Qiuxu Zhuo <[email protected]>Signed-off-by Tony Luck <[email protected]>---
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 aKERN_ERRORmessage will help (especially as this is a "Can't happen(TM)" error).
Fair enough.
All applied,
thx.