i386/ioapic: Add missing imen_lock/unlock
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 11 Dec 2011 11:41:11 +0000 (19:41 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 11 Dec 2011 11:41:11 +0000 (19:41 +0800)
This merges b551073687d461dc8b9e6d3a34dd285de40a26a6

sys/platform/pc32/apic/ioapic.c

index ef62cc2..45f6f01 100644 (file)
@@ -377,9 +377,11 @@ ioapic_gsi_setup(int gsi)
                                 *
                                 * This GSI is not used, disable it.
                                 */
+                               imen_lock();
                                ioapic_pin_setup(ioapic_gsi_ioaddr(gsi),
                                    ioapic_gsi_pin(gsi), 0,
                                    INTR_TRIGGER_EDGE, INTR_POLARITY_HIGH, 0);
+                               imen_unlock();
                                return;
                        }
                        trig = INTR_TRIGGER_EDGE;