]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/x86/kernel/apic/io_apic.c
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / arch / x86 / kernel / apic / io_apic.c
index 1e35dd06b090ee91189cb5a52fdf026f2ca5e74b..347bb9f6573723f84f439fdc7ebcb82c9e00db14 100644 (file)
@@ -1107,12 +1107,12 @@ int mp_map_gsi_to_irq(u32 gsi, unsigned int flags, struct irq_alloc_info *info)
 
        ioapic = mp_find_ioapic(gsi);
        if (ioapic < 0)
-               return -1;
+               return -ENODEV;
 
        pin = mp_find_ioapic_pin(ioapic, gsi);
        idx = find_irq_entry(ioapic, pin, mp_INT);
        if ((flags & IOAPIC_MAP_CHECK) && idx < 0)
-               return -1;
+               return -ENODEV;
 
        return mp_map_pin_to_irq(gsi, idx, ioapic, pin, flags, info);
 }
@@ -2117,6 +2117,7 @@ static inline void __init check_timer(void)
                        if (idx != -1 && irq_trigger(idx))
                                unmask_ioapic_irq(irq_get_chip_data(0));
                }
+               irq_domain_deactivate_irq(irq_data);
                irq_domain_activate_irq(irq_data);
                if (timer_irq_works()) {
                        if (disable_timer_pin_1 > 0)
@@ -2138,6 +2139,7 @@ static inline void __init check_timer(void)
                 * legacy devices should be connected to IO APIC #0
                 */
                replace_pin_at_irq_node(data, node, apic1, pin1, apic2, pin2);
+               irq_domain_deactivate_irq(irq_data);
                irq_domain_activate_irq(irq_data);
                legacy_pic->unmask(0);
                if (timer_irq_works()) {