|
@@ -404,9 +404,18 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
|
|
|
/*
|
|
|
* Some BIOSes incorrectly force this feature, but only K8
|
|
|
* revision D (model = 0x14) and later actually support it.
|
|
|
+ * (AMD Erratum #110, docId: 25759).
|
|
|
*/
|
|
|
- if (c->x86_model < 0x14)
|
|
|
+ if (c->x86_model < 0x14 && cpu_has(c, X86_FEATURE_LAHF_LM)) {
|
|
|
+ u64 val;
|
|
|
+
|
|
|
clear_cpu_cap(c, X86_FEATURE_LAHF_LM);
|
|
|
+ if (!rdmsrl_amd_safe(0xc001100d, &val)) {
|
|
|
+ val &= ~(1ULL << 32);
|
|
|
+ wrmsrl_amd_safe(0xc001100d, val);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
if (c->x86 == 0x10 || c->x86 == 0x11)
|
|
|
set_cpu_cap(c, X86_FEATURE_REP_GOOD);
|