clock: register_int and unregister_int will enable/disable interrupt
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 18 Sep 2011 13:14:42 +0000 (21:14 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 18 Sep 2011 12:57:30 +0000 (20:57 +0800)
sys/platform/pc32/isa/clock.c
sys/platform/pc64/isa/clock.c

index 01d091a..38362ee 100644 (file)
@@ -1085,13 +1085,11 @@ mixed_mode_setup:
                                       INTR_EXCL | INTR_CLOCK |
                                       INTR_NOPOLL | INTR_MPSAFE |
                                       INTR_NOENTROPY);
-               machintr_intr_enable(irq);
        } else {
                register_int(0, clkintr, NULL, "clk", NULL,
                             INTR_EXCL | INTR_CLOCK |
                             INTR_NOPOLL | INTR_MPSAFE |
                             INTR_NOENTROPY);
-               machintr_intr_enable(0);
        }
 
        /* Initialize RTC. */
@@ -1114,7 +1112,6 @@ mixed_mode_setup:
                        } else {
                                kprintf("IOAPIC: warning 8254 is not connected "
                                        "to the correct pin, try mixed mode\n");
-                               machintr_intr_disable(irq);
                                unregister_int(clkdesc);
                                goto mixed_mode_setup;
                        }
index 3614992..420fce2 100644 (file)
@@ -1092,13 +1092,11 @@ mixed_mode_setup:
                                       INTR_EXCL | INTR_CLOCK |
                                       INTR_NOPOLL | INTR_MPSAFE |
                                       INTR_NOENTROPY);
-               machintr_intr_enable(irq);
        } else {
                register_int(0, clkintr, NULL, "clk", NULL,
                             INTR_EXCL | INTR_CLOCK |
                             INTR_NOPOLL | INTR_MPSAFE |
                             INTR_NOENTROPY);
-               machintr_intr_enable(0);
        }
 
        /* Initialize RTC. */
@@ -1121,7 +1119,6 @@ mixed_mode_setup:
                        } else {
                                kprintf("IOAPIC: warning 8254 is not connected "
                                        "to the correct pin, try mixed mode\n");
-                               machintr_intr_disable(irq);
                                unregister_int(clkdesc);
                                goto mixed_mode_setup;
                        }