-/* $OpenBSD: clock.c,v 1.65 2023/07/25 18:16:20 cheloha Exp $ */
+/* $OpenBSD: clock.c,v 1.66 2023/08/22 17:13:22 cheloha Exp $ */
/* $NetBSD: clock.c,v 1.39 1996/05/12 23:11:54 mycroft Exp $ */
/*-
clockintr_cpu_init(NULL);
- /* When using i8254 for clock, we also use the rtc for profclock */
- (void)isa_intr_establish(NULL, 0, IST_PULSE, IPL_CLOCK,
+ /*
+ * When using i8254 for clock, we also use the rtc for profclock.
+ *
+ * These IRQs are not MP-safe, but it is harmless to lie about it
+ * because we cannot reach this point unless we are only booting
+ * a single CPU.
+ */
+ (void)isa_intr_establish(NULL, 0, IST_PULSE, IPL_CLOCK | IPL_MPSAFE,
clockintr, 0, "clock");
- (void)isa_intr_establish(NULL, 8, IST_PULSE, IPL_STATCLOCK,
+ (void)isa_intr_establish(NULL, 8, IST_PULSE, IPL_STATCLOCK | IPL_MPSAFE,
rtcintr, 0, "rtc");
rtcstart(); /* start the mc146818 clock */