-/* $OpenBSD: kern_clockintr.c,v 1.6 2023/04/03 00:20:24 cheloha Exp $ */
+/* $OpenBSD: kern_clockintr.c,v 1.7 2023/04/03 17:40:51 cheloha Exp $ */
/*
* Copyright (c) 2003 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
mtx_init(&cq->cq_mtx, IPL_CLOCK);
TAILQ_INIT(&cq->cq_est);
TAILQ_INIT(&cq->cq_pend);
+ if (ic != NULL) {
+ cq->cq_intrclock = *ic;
+ SET(cq->cq_flags, CL_CPU_INTRCLOCK);
+ }
+ cq->cq_gen = 1;
+
+ /* TODO: Remove these from struct clockintr_queue. */
cq->cq_hardclock = clockintr_establish(cq, clockintr_hardclock);
if (cq->cq_hardclock == NULL)
panic("%s: failed to establish hardclock", __func__);
__func__);
}
}
- if (ic != NULL) {
- cq->cq_intrclock = *ic;
- SET(cq->cq_flags, CL_CPU_INTRCLOCK);
- }
- cq->cq_gen = 1;
}
/*