x86/x2apic: Acpi_gbl_FADT existence depends on CONFIG_ACPI
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 4 May 2015 15:58:00 +0000 (17:58 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 5 May 2015 12:01:37 +0000 (14:01 +0200)
If ACPI is disabled, acpi_gbl_FADT is not available, and and the build
breaks.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Link: http://lkml.kernel.org/r/55479708.2000104@siemens.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/apic/x2apic_phys.c

index 6fae733e9194893dc761ccd06839df81232c7427..3ffd925655e0d4a8338d401d2793a61a5cb3fd6f 100644 (file)
@@ -21,11 +21,13 @@ early_param("x2apic_phys", set_x2apic_phys_mode);
 
 static bool x2apic_fadt_phys(void)
 {
+#ifdef CONFIG_ACPI
        if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) &&
                (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL)) {
                printk(KERN_DEBUG "System requires x2apic physical mode\n");
                return true;
        }
+#endif
        return false;
 }