diff options
Diffstat (limited to 'sys/pc98/cbus/clock.c')
| -rw-r--r-- | sys/pc98/cbus/clock.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c index b8b9e3fae84f..b70465ab3886 100644 --- a/sys/pc98/cbus/clock.c +++ b/sys/pc98/cbus/clock.c @@ -1331,6 +1331,7 @@ cpu_initclocks() int apic_8254_trial; void *clkdesc; #endif /* APIC_IO */ + register_t crit; #ifndef PC98 if (statclock_disable) { @@ -1367,9 +1368,11 @@ cpu_initclocks() inthand_add("clk", apic_8254_intr, (driver_intr_t *)clkintr, NULL, INTR_TYPE_CLK | INTR_FAST, &clkdesc); + crit = intr_disable(); mtx_lock_spin(&icu_lock); INTREN(1 << apic_8254_intr); mtx_unlock_spin(&icu_lock); + intr_restore(crit); #else /* APIC_IO */ @@ -1380,9 +1383,11 @@ cpu_initclocks() */ inthand_add("clk", 0, (driver_intr_t *)clkintr, NULL, INTR_TYPE_CLK | INTR_FAST, NULL); + crit = intr_disable(); mtx_lock_spin(&icu_lock); INTREN(IRQ0); mtx_unlock_spin(&icu_lock); + intr_restore(crit); #endif /* APIC_IO */ @@ -1408,6 +1413,7 @@ cpu_initclocks() inthand_add("rtc", 8, (driver_intr_t *)rtcintr, NULL, INTR_TYPE_CLK | INTR_FAST, NULL); + crit = intr_disable(); mtx_lock_spin(&icu_lock); #ifdef APIC_IO INTREN(APIC_IRQ8); @@ -1415,6 +1421,7 @@ cpu_initclocks() INTREN(IRQ8); #endif /* APIC_IO */ mtx_unlock_spin(&icu_lock); + intr_restore(crit); writertc(RTC_STATUSB, rtc_statusb); #endif /* PC98 */ @@ -1432,9 +1439,11 @@ cpu_initclocks() * on the IO APIC. * Workaround: Limited variant of mixed mode. */ + crit = intr_disable(); mtx_lock_spin(&icu_lock); INTRDIS(1 << apic_8254_intr); mtx_unlock_spin(&icu_lock); + intr_restore(crit); inthand_remove(clkdesc); printf("APIC_IO: Broken MP table detected: " "8254 is not connected to " @@ -1457,9 +1466,11 @@ cpu_initclocks() inthand_add("clk", apic_8254_intr, (driver_intr_t *)clkintr, NULL, INTR_TYPE_CLK | INTR_FAST, NULL); + crit = intr_disable(); mtx_lock_spin(&icu_lock); INTREN(1 << apic_8254_intr); mtx_unlock_spin(&icu_lock); + intr_restore(crit); } } |
