Merge branches 'pm-cpufreq', 'pm-cpuidle', 'pm-devfreq', 'pm-opp' and 'pm-tools'
[linux-drm-fsl-dcu.git] / arch / x86 / kernel / apic / io_apic.c
index 3f5f60406ab17659e294e725fbe18655c94048ac..f4dc2462a1ac410803cd94ff4944ebf23c636fa9 100644 (file)
@@ -1507,7 +1507,10 @@ void __init enable_IO_APIC(void)
        int i8259_apic, i8259_pin;
        int apic, pin;
 
-       if (!nr_legacy_irqs())
+       if (skip_ioapic_setup)
+               nr_ioapics = 0;
+
+       if (!nr_legacy_irqs() || !nr_ioapics)
                return;
 
        for_each_ioapic_pin(apic, pin) {
@@ -2295,7 +2298,7 @@ static inline void __init check_timer(void)
        }
        local_irq_disable();
        apic_printk(APIC_QUIET, KERN_INFO "..... failed :(.\n");
-       if (x2apic_preenabled)
+       if (apic_is_x2apic_enabled())
                apic_printk(APIC_QUIET, KERN_INFO
                            "Perhaps problem with the pre-enabled x2apic mode\n"
                            "Try booting with x2apic and interrupt-remapping disabled in the bios.\n");
@@ -2373,9 +2376,9 @@ void __init setup_IO_APIC(void)
 {
        int ioapic;
 
-       /*
-        * calling enable_IO_APIC() is moved to setup_local_APIC for BP
-        */
+       if (skip_ioapic_setup || !nr_ioapics)
+               return;
+
        io_apic_irqs = nr_legacy_irqs() ? ~PIC_IRQS : ~0UL;
 
        apic_printk(APIC_VERBOSE, "ENABLING IO-APIC IRQs\n");