diff options
Diffstat (limited to 'arch/x86/kernel/cpu/amd.c')
-rw-r--r-- | arch/x86/kernel/cpu/amd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index c6eb02e69875..83b217c7225f 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -358,7 +358,7 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) | |||
358 | #endif | 358 | #endif |
359 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI) | 359 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI) |
360 | /* check CPU config space for extended APIC ID */ | 360 | /* check CPU config space for extended APIC ID */ |
361 | if (c->x86 >= 0xf) { | 361 | if (cpu_has_apic && c->x86 >= 0xf) { |
362 | unsigned int val; | 362 | unsigned int val; |
363 | val = read_pci_config(0, 24, 0, 0x68); | 363 | val = read_pci_config(0, 24, 0, 0x68); |
364 | if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18))) | 364 | if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18))) |
@@ -402,6 +402,13 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
402 | level = cpuid_eax(1); | 402 | level = cpuid_eax(1); |
403 | if ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58) | 403 | if ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58) |
404 | set_cpu_cap(c, X86_FEATURE_REP_GOOD); | 404 | set_cpu_cap(c, X86_FEATURE_REP_GOOD); |
405 | |||
406 | /* | ||
407 | * Some BIOSes incorrectly force this feature, but only K8 | ||
408 | * revision D (model = 0x14) and later actually support it. | ||
409 | */ | ||
410 | if (c->x86_model < 0x14) | ||
411 | clear_cpu_cap(c, X86_FEATURE_LAHF_LM); | ||
405 | } | 412 | } |
406 | if (c->x86 == 0x10 || c->x86 == 0x11) | 413 | if (c->x86 == 0x10 || c->x86 == 0x11) |
407 | set_cpu_cap(c, X86_FEATURE_REP_GOOD); | 414 | set_cpu_cap(c, X86_FEATURE_REP_GOOD); |