Skip to content

Commit ee470bb

Browse files
committed
EDAC/amd64: Read back the scrub rate PCI register on F15h
Commit: da92110 ("EDAC, amd64_edac: Extend scrub rate support to F15hM60h") added support for F15h, model 0x60 CPUs but in doing so, missed to read back SCRCTRL PCI config register on F15h CPUs which are *not* model 0x60. Add that read so that doing $ cat /sys/devices/system/edac/mc/mc0/sdram_scrub_rate can show the previously set DRAM scrub rate. Fixes: da92110 ("EDAC, amd64_edac: Extend scrub rate support to F15hM60h") Reported-by: Anders Andersson <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Cc: <[email protected]> #v4.4.. Link: https://lkml.kernel.org/r/CAKkunMbNWppx_i6xSdDHLseA2QQmGJqj_crY=NF-GZML5np4Vw@mail.gmail.com
1 parent b3a9e3b commit ee470bb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/edac/amd64_edac.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ static int get_scrub_rate(struct mem_ctl_info *mci)
269269

270270
if (pvt->model == 0x60)
271271
amd64_read_pci_cfg(pvt->F2, F15H_M60H_SCRCTRL, &scrubval);
272+
else
273+
amd64_read_pci_cfg(pvt->F3, SCRCTRL, &scrubval);
272274
} else {
273275
amd64_read_pci_cfg(pvt->F3, SCRCTRL, &scrubval);
274276
}

0 commit comments

Comments
 (0)