clockintr: refactor clockintr_queue initialization into clockqueue_init()
authorcheloha <cheloha@openbsd.org>
Fri, 21 Apr 2023 15:49:37 +0000 (15:49 +0000)
committercheloha <cheloha@openbsd.org>
Fri, 21 Apr 2023 15:49:37 +0000 (15:49 +0000)
commitd972f9c4943c622619ee762a7d28b17a6d12d588
tree4e1ea482dd9a6fc3f233d5a85a84a1ab124b99ea
parent2ee1c8eb6b992d8851615c557cb4ca6814d07259
clockintr: refactor clockintr_queue initialization into clockqueue_init()

We need to be able to initialize a given struct clockintr_queue before
clockintr_cpu_init() is called.  This will allow the primary CPU to
establish clock interrupts on other CPUs' queues before those CPUs
have finished booting.

So, move the clockintr_queue structure initialization code out of
clockintr_cpu_init() into a new function, clockqueue_init().
clockqueue_init() sets CQ_INIT the first time it is called.
Subsequent calls do nothing.
sys/kern/kern_clockintr.c