]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/x86/kernel/acpi/boot.c
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / arch / x86 / kernel / acpi / boot.c
index 931ced8ca345114397536ae1998a438a84889193..7ff007ed899d1731c97eba25fc40ccac38a90309 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/bootmem.h>
 #include <linux/ioport.h>
 #include <linux/pci.h>
+#include <linux/efi-bgrt.h>
 
 #include <asm/irqdomain.h>
 #include <asm/pci_x86.h>
@@ -76,6 +77,7 @@ int acpi_fix_pin2_polarity __initdata;
 static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
 #endif
 
+#ifdef CONFIG_X86_IO_APIC
 /*
  * Locks related to IOAPIC hotplug
  * Hotplug side:
@@ -88,6 +90,7 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
  *                     ->ioapic_lock
  */
 static DEFINE_MUTEX(acpi_ioapic_lock);
+#endif
 
 /* --------------------------------------------------------------------------
                               Boot-time Configuration
@@ -713,7 +716,7 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
        int nid;
 
        nid = acpi_get_node(handle);
-       if (nid != -1) {
+       if (nid != NUMA_NO_NODE) {
                set_apicid_to_node(physid, nid);
                numa_set_node(cpu, nid);
        }
@@ -928,6 +931,13 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
                x86_platform.legacy.devices.pnpbios = 0;
        }
 
+       if (acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID &&
+           !(acpi_gbl_FADT.boot_flags & ACPI_FADT_8042) &&
+           x86_platform.legacy.i8042 != X86_LEGACY_I8042_PLATFORM_ABSENT) {
+               pr_debug("ACPI: i8042 controller is absent\n");
+               x86_platform.legacy.i8042 = X86_LEGACY_I8042_FIRMWARE_ABSENT;
+       }
+
        if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_CMOS_RTC) {
                pr_debug("ACPI: not registering RTC platform device\n");
                x86_platform.legacy.rtc = 0;
@@ -1548,6 +1558,12 @@ int __init early_acpi_boot_init(void)
        return 0;
 }
 
+static int __init acpi_parse_bgrt(struct acpi_table_header *table)
+{
+       efi_bgrt_init(table);
+       return 0;
+}
+
 int __init acpi_boot_init(void)
 {
        /* those are executed after early-quirks are executed */
@@ -1572,6 +1588,8 @@ int __init acpi_boot_init(void)
        acpi_process_madt();
 
        acpi_table_parse(ACPI_SIG_HPET, acpi_parse_hpet);
+       if (IS_ENABLED(CONFIG_ACPI_BGRT))
+               acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt);
 
        if (!acpi_noirq)
                x86_init.pci.init = pci_acpi_init;