diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2009-08-25 15:40:29 -0700 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2009-08-25 15:40:29 -0700 |
| commit | e8a2eb47e6ca03d4a4f98f0beef73720c5dddc0c (patch) | |
| tree | 31c4d7718111abddfaaa8d3fb14ab4a7e2554cd9 /arch/x86/kernel/cpu/amd.c | |
| parent | 8b5a10fc6fd02289ea03480f93382b1a99006142 (diff) | |
| parent | c62e43202e7cf50ca24bce58b255df7bf5de69d0 (diff) | |
Merge commit 'origin/x86/urgent' into x86/asm
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 28e5f5956042..63fddcd082cd 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -356,7 +356,7 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) #endif #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI) /* check CPU config space for extended APIC ID */ - if (c->x86 >= 0xf) { + if (cpu_has_apic && c->x86 >= 0xf) { unsigned int val; val = read_pci_config(0, 24, 0, 0x68); if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18))) @@ -400,6 +400,13 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) level = cpuid_eax(1); if((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58) set_cpu_cap(c, X86_FEATURE_REP_GOOD); + + /* + * Some BIOSes incorrectly force this feature, but only K8 + * revision D (model = 0x14) and later actually support it. + */ + if (c->x86_model < 0x14) + clear_cpu_cap(c, X86_FEATURE_LAHF_LM); } if (c->x86 == 0x10 || c->x86 == 0x11) set_cpu_cap(c, X86_FEATURE_REP_GOOD); |
