[PATCH] x86-64/i386: Don't process APICs/IO-APICs in ACPI when APIC is disabled.
authorAndi Kleen <ak@suse.de>
Tue, 11 Apr 2006 10:54:36 +0000 (12:54 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:38:57 +0000 (06:38 -0700)
When nolapic was passed or the local APIC was disabled
for another reason ACPI would still parse the IO-APICs
until these were explicitely disabled with noapic.

Usually this resulted in a non booting configuration unless
"nolapic noapic" was used.

I also disabled the local APIC parsing in this case, although
that's only cosmetic (suppresses a few printks)

This hopefully makes nolapic work in all cases.

Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/acpi/boot.c

index 8dab3527bc97a9f8ac3965c8c0beb7db98ee224b..030a0007a4e075a5cf28408c18056088ab8d6f89 100644 (file)
@@ -168,7 +168,7 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size)
        unsigned long i;
        int config_size;
 
-       if (!phys_addr || !size)
+       if (!phys_addr || !size || !cpu_has_apic)
                return -EINVAL;
 
        mcfg = (struct acpi_table_mcfg *)__acpi_map_table(phys_addr, size);
@@ -693,6 +693,9 @@ static int __init acpi_parse_madt_lapic_entries(void)
 {
        int count;
 
+       if (!cpu_has_apic)
+               return -ENODEV;
+
        /* 
         * Note that the LAPIC address is obtained from the MADT (32-bit value)
         * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value).