amd64_edac: restrict PCI config space access
authorBorislav Petkov <borislav.petkov@amd.com>
Mon, 21 Dec 2009 18:21:41 +0000 (19:21 +0100)
committerBorislav Petkov <borislav.petkov@amd.com>
Thu, 24 Dec 2009 10:07:08 +0000 (11:07 +0100)
Do not access F2x19[0,4] on K8 since they're undefined there.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
drivers/edac/amd64_edac.c

index 63c04d31cd7ee52627bbd121e6ea57736fd8fa81..c5facd951dda965e1c0f217b824289445c9e3165 100644 (file)
@@ -2349,7 +2349,7 @@ static void amd64_read_mc_registers(struct amd64_pvt *pvt)
        amd64_read_pci_cfg(pvt->dram_f2_ctl, F10_DCLR_0, &pvt->dclr0);
        amd64_read_pci_cfg(pvt->dram_f2_ctl, F10_DCHR_0, &pvt->dchr0);
 
-       if (!dct_ganging_enabled(pvt)) {
+       if (!dct_ganging_enabled(pvt) && boot_cpu_data.x86 >= 0x10) {
                amd64_read_pci_cfg(pvt->dram_f2_ctl, F10_DCLR_1, &pvt->dclr1);
                amd64_read_pci_cfg(pvt->dram_f2_ctl, F10_DCHR_1, &pvt->dchr1);
        }