Skip to contentSkip to conversation

x86/x2apic: acpi_gbl_FADT existence depends on CONFIG_ACPI

PATCH New Jan Kiszka 2 participants 2 messages May 4, 2015 – May 5, 2015 x86

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 x86/x2apic: acpi_gbl_FADT existence depends on CONFIG_ACPI

If ACPI is disabled, acpi_gbl_FADT is not available, and and the build breaks.

---
 arch/x86/kernel/apic/x2apic_phys.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/kernel/apic/x2apic_phys.c +2 -0
index 6fae733..3ffd925 100644
@@ -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;
 }
 
Signature · 1 line
2.1.4
#1 lore raw

[tip:x86/apic] x86/x2apic: Acpi_gbl_FADT existence depends on CONFIG_ACPI

x86/x2apic: Acpi_gbl_FADT existence depends on CONFIG_ACPI
Commit-ID:  781674fc33adf0d975a361e111bb45804356aa23
Gitweb:     http://git.kernel.org/tip/781674fc33adf0d975a361e111bb45804356aa23
Author:     Jan Kiszka <[email protected]>
AuthorDate: Mon, 4 May 2015 17:58:00 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Tue, 5 May 2015 14:01:37 +0200

x86/x2apic: Acpi_gbl_FADT existence depends on CONFIG_ACPI

If ACPI is disabled, acpi_gbl_FADT is not available, and and the build breaks.

---
 arch/x86/kernel/apic/x2apic_phys.c | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/kernel/apic/x2apic_phys.c +2 -0
index 6fae733..3ffd925 100644
@@ -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;
 }