X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/blobdiff_plain/ee295cbe38bc13d3645c4f0688a642e69a30cfbc..027bbbfe9dce35d65da5926193e7d1ce1624544a:/sys/platform/pc64/isa/clock.c diff --git a/sys/platform/pc64/isa/clock.c b/sys/platform/pc64/isa/clock.c index 420fce2cda..13c5589780 100644 --- a/sys/platform/pc64/isa/clock.c +++ b/sys/platform/pc64/isa/clock.c @@ -1019,7 +1019,7 @@ i8254_ioapic_trial(int irq, struct cputimer_intr *cti) KKASSERT(sys_cputimer == &i8254_cputimer); KKASSERT(cti == &i8254_cputimer_intr); - lastcnt = get_interrupt_counter(irq); + lastcnt = get_interrupt_counter(irq, mycpuid); /* * Force an 8254 Timer0 interrupt and wait 1/100s for @@ -1032,7 +1032,7 @@ i8254_ioapic_trial(int irq, struct cputimer_intr *cti) while (sys_cputimer->count() - base < sys_cputimer->freq / 100) ; /* nothing */ - if (get_interrupt_counter(irq) - lastcnt == 0) + if (get_interrupt_counter(irq, mycpuid) - lastcnt == 0) return ENOENT; return 0; } @@ -1048,7 +1048,8 @@ i8254_intr_initclock(struct cputimer_intr *cti, boolean_t selected) void *clkdesc = NULL; int irq = 0, mixed_mode = 0, error; - callout_init(&sysbeepstop_ch); + KKASSERT(mycpuid == 0); + callout_init_mp(&sysbeepstop_ch); if (!selected && i8254_intr_disable) goto nointr; @@ -1063,14 +1064,14 @@ i8254_intr_initclock(struct cputimer_intr *cti, boolean_t selected) /* Finish initializing 8254 timer 0. */ if (ioapic_enable) { - irq = ioapic_abi_find_irq(0, INTR_TRIGGER_EDGE, + irq = ioapic_find_legacy_by_irq(0, INTR_TRIGGER_EDGE, INTR_POLARITY_HIGH); if (irq < 0) { mixed_mode_setup: - error = ioapic_abi_extint_irqmap(0); + error = ioapic_conf_legacy_extint(0); if (!error) { - irq = ioapic_abi_find_irq(0, INTR_TRIGGER_EDGE, - INTR_POLARITY_HIGH); + irq = ioapic_find_legacy_by_irq(0, + INTR_TRIGGER_EDGE, INTR_POLARITY_HIGH); if (irq < 0) error = ENOENT; } @@ -1091,12 +1092,12 @@ mixed_mode_setup: NULL, INTR_EXCL | INTR_CLOCK | INTR_NOPOLL | INTR_MPSAFE | - INTR_NOENTROPY); + INTR_NOENTROPY, 0); } else { register_int(0, clkintr, NULL, "clk", NULL, INTR_EXCL | INTR_CLOCK | INTR_NOPOLL | INTR_MPSAFE | - INTR_NOENTROPY); + INTR_NOENTROPY, 0); } /* Initialize RTC. */ @@ -1119,7 +1120,7 @@ mixed_mode_setup: } else { kprintf("IOAPIC: warning 8254 is not connected " "to the correct pin, try mixed mode\n"); - unregister_int(clkdesc); + unregister_int(clkdesc, 0); goto mixed_mode_setup; } }