Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  amd64_edac: Fix syndrome calculation on K8
This commit is contained in:
Linus Torvalds 2010-07-02 09:52:31 -07:00
commit 4b78c119f0

View File

@ -1958,20 +1958,20 @@ static int get_channel_from_ecc_syndrome(struct mem_ctl_info *mci, u16 syndrome)
u32 value = 0; u32 value = 0;
int err_sym = 0; int err_sym = 0;
amd64_read_pci_cfg(pvt->misc_f3_ctl, 0x180, &value); if (boot_cpu_data.x86 == 0x10) {
/* F3x180[EccSymbolSize]=1, x8 symbols */ amd64_read_pci_cfg(pvt->misc_f3_ctl, 0x180, &value);
if (boot_cpu_data.x86 == 0x10 &&
boot_cpu_data.x86_model > 7 && /* F3x180[EccSymbolSize]=1 => x8 symbols */
value & BIT(25)) { if (boot_cpu_data.x86_model > 7 &&
err_sym = decode_syndrome(syndrome, x8_vectors, value & BIT(25)) {
ARRAY_SIZE(x8_vectors), 8); err_sym = decode_syndrome(syndrome, x8_vectors,
return map_err_sym_to_channel(err_sym, 8); ARRAY_SIZE(x8_vectors), 8);
} else { return map_err_sym_to_channel(err_sym, 8);
err_sym = decode_syndrome(syndrome, x4_vectors, }
ARRAY_SIZE(x4_vectors), 4);
return map_err_sym_to_channel(err_sym, 4);
} }
err_sym = decode_syndrome(syndrome, x4_vectors, ARRAY_SIZE(x4_vectors), 4);
return map_err_sym_to_channel(err_sym, 4);
} }
/* /*