]> 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 4764fa56924d200c724473a1c02a9823b56b5912..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>
@@ -715,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);
        }
@@ -930,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;
@@ -1550,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 */
@@ -1574,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;