]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/apic.c
x86: io-apic - interrupt remapping fix
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / apic.c
index 784116933c708e73e2091cc1091184846e3ba400..1f48bd1c9f2dd9775a121ff4574bd02f53c8f0c6 100644 (file)
@@ -1360,7 +1360,12 @@ void enable_IR_x2apic(void)
 
        local_irq_save(flags);
        mask_8259A();
-       save_mask_IO_APIC_setup();
+
+       ret = save_mask_IO_APIC_setup();
+       if (ret) {
+               printk(KERN_INFO "Saving IO-APIC state failed: %d\n", ret);
+               goto end;
+       }
 
        ret = enable_intr_remapping(1);
 
@@ -1370,14 +1375,15 @@ void enable_IR_x2apic(void)
        }
 
        if (ret)
-               goto end;
+               goto end_restore;
 
        if (!x2apic) {
                x2apic = 1;
                apic_ops = &x2apic_ops;
                enable_x2apic();
        }
-end:
+
+end_restore:
        if (ret)
                /*
                 * IR enabling failed
@@ -1386,6 +1392,7 @@ end:
        else
                reinit_intr_remapped_IO_APIC(x2apic_preenabled);
 
+end:
        unmask_8259A();
        local_irq_restore(flags);