Merge tag 'acpi-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6-block.git] / arch / x86 / kernel / acpi / boot.c
index edf48404d15db912533d14fbcd0f4860bfce0a45..9414f84584e40f347c0b9bfbae31fd4688c76edc 100644 (file)
@@ -136,7 +136,7 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)
 {
        struct acpi_table_madt *madt = NULL;
 
-       if (!cpu_has_apic)
+       if (!boot_cpu_has(X86_FEATURE_APIC))
                return -EINVAL;
 
        madt = (struct acpi_table_madt *)table;
@@ -912,6 +912,15 @@ late_initcall(hpet_insert_resource);
 
 static int __init acpi_parse_fadt(struct acpi_table_header *table)
 {
+       if (!(acpi_gbl_FADT.boot_flags & ACPI_FADT_LEGACY_DEVICES)) {
+               pr_debug("ACPI: no legacy devices present\n");
+               x86_platform.legacy.devices.pnpbios = 0;
+       }
+
+       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;
+       }
 
 #ifdef CONFIG_X86_PM_TIMER
        /* detect the location of the ACPI PM Timer */
@@ -950,7 +959,7 @@ static int __init early_acpi_parse_madt_lapic_addr_ovr(void)
 {
        int count;
 
-       if (!cpu_has_apic)
+       if (!boot_cpu_has(X86_FEATURE_APIC))
                return -ENODEV;
 
        /*
@@ -978,7 +987,7 @@ static int __init acpi_parse_madt_lapic_entries(void)
        int ret;
        struct acpi_subtable_proc madt_proc[2];
 
-       if (!cpu_has_apic)
+       if (!boot_cpu_has(X86_FEATURE_APIC))
                return -ENODEV;
 
        /*
@@ -1124,7 +1133,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)
        if (acpi_disabled || acpi_noirq)
                return -ENODEV;
 
-       if (!cpu_has_apic)
+       if (!boot_cpu_has(X86_FEATURE_APIC))
                return -ENODEV;
 
        /*