x86, amd: Don't probe for extended APIC ID if APICs are disabled
authorJeremy Fitzhardinge <jeremy@goop.org>
Wed, 22 Jul 2009 16:59:35 +0000 (09:59 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 22 Jul 2009 17:06:49 +0000 (10:06 -0700)
If we've logically disabled apics, don't probe the PCI space for the
AMD extended APIC ID.

[ Impact: prevent boot crash under Xen. ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Reported-by: Bastian Blank <bastian@waldi.eu.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/kernel/cpu/amd.c

index 28e5f59560429a7bb754a1dca7cb93935d481e07..e2485b03f1cf2649341c9c8d9412495f894eeaa4 100644 (file)
@@ -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)))