aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/amd.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/amd.c')
-rw-r--r--arch/x86/kernel/cpu/amd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 63fddcd082cd..0a717fc6aeb6 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -404,9 +404,18 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
404 /* 404 /*
405 * Some BIOSes incorrectly force this feature, but only K8 405 * Some BIOSes incorrectly force this feature, but only K8
406 * revision D (model = 0x14) and later actually support it. 406 * revision D (model = 0x14) and later actually support it.
407 * (AMD Erratum #110, docId: 25759).
407 */ 408 */
408 if (c->x86_model < 0x14) 409 if (c->x86_model < 0x14 && cpu_has(c, X86_FEATURE_LAHF_LM)) {
410 u64 val;
411
409 clear_cpu_cap(c, X86_FEATURE_LAHF_LM); 412 clear_cpu_cap(c, X86_FEATURE_LAHF_LM);
413 if (!rdmsrl_amd_safe(0xc001100d, &val)) {
414 val &= ~(1ULL << 32);
415 wrmsrl_amd_safe(0xc001100d, val);
416 }
417 }
418
410 } 419 }
411 if (c->x86 == 0x10 || c->x86 == 0x11) 420 if (c->x86 == 0x10 || c->x86 == 0x11)
412 set_cpu_cap(c, X86_FEATURE_REP_GOOD); 421 set_cpu_cap(c, X86_FEATURE_REP_GOOD);