ioapic/x86_64: Add missing imen_lock/unlock
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 3 Nov 2011 14:58:32 +0000 (22:58 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 3 Nov 2011 14:58:32 +0000 (22:58 +0800)
sys/platform/pc64/apic/ioapic.c

index c3325d7..2ff9d58 100644 (file)
@@ -374,9 +374,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;