-/* $OpenBSD: cpu.c,v 1.46 2022/12/10 15:02:29 cheloha Exp $ */
+/* $OpenBSD: cpu.c,v 1.47 2023/06/15 22:18:06 cheloha Exp $ */
/* $NetBSD: cpu.c,v 1.44 2000/05/23 05:12:53 thorpej Exp $ */
/*-
ALPHA_TBIA();
alpha_pal_imb();
+ clockqueue_init(&ci->ci_queue);
KERNEL_LOCK();
sched_init_cpu(ci);
nanouptime(&ci->ci_schedstate.spc_runtime);
-/* $OpenBSD: cpu.c,v 1.168 2023/04/24 09:04:03 dv Exp $ */
+/* $OpenBSD: cpu.c,v 1.169 2023/06/15 22:18:06 cheloha Exp $ */
/* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */
/*-
#if defined(MULTIPROCESSOR)
cpu_intr_init(ci);
cpu_start_secondary(ci);
+ clockqueue_init(&ci->ci_queue);
sched_init_cpu(ci);
ncpus++;
if (ci->ci_flags & CPUF_PRESENT) {
-/* $OpenBSD: cpu.c,v 1.57 2022/03/12 14:40:41 mpi Exp $ */
+/* $OpenBSD: cpu.c,v 1.58 2023/06/15 22:18:06 cheloha Exp $ */
/* $NetBSD: cpu.c,v 1.56 2004/04/14 04:01:49 bsh Exp $ */
"cpu-release-addr", 0);
}
+ clockqueue_init(&ci->ci_queue);
sched_init_cpu(ci);
if (cpu_hatch_secondary(ci, spinup_method, spinup_data)) {
atomic_setbits_int(&ci->ci_flags, CPUF_IDENTIFY);
-/* $OpenBSD: cpu.c,v 1.94 2023/06/11 21:42:01 kettenis Exp $ */
+/* $OpenBSD: cpu.c,v 1.95 2023/06/15 22:18:07 cheloha Exp $ */
/*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
"cpu-release-addr", 0);
}
+ clockqueue_init(&ci->ci_queue);
sched_init_cpu(ci);
if (cpu_start_secondary(ci, spinup_method, spinup_data)) {
atomic_setbits_int(&ci->ci_flags, CPUF_IDENTIFY);
-/* $OpenBSD: cpu.c,v 1.44 2022/12/06 00:40:09 cheloha Exp $ */
+/* $OpenBSD: cpu.c,v 1.45 2023/06/15 22:18:07 cheloha Exp $ */
/*
* Copyright (c) 1998-2003 Michael Shalayeff
ci->ci_randseed = (arc4random() & 0x7fffffff) + 1;
+ clockqueue_init(&ci->ci_queue);
sched_init_cpu(ci);
/* Release the specified CPU by triggering an EIR{0}. */
-/* $OpenBSD: cpu.c,v 1.111 2023/01/30 10:49:04 jsg Exp $ */
+/* $OpenBSD: cpu.c,v 1.112 2023/06/15 22:18:07 cheloha Exp $ */
/* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */
/*-
#endif
cpu_tsx_disable(ci);
identifycpu(ci);
+ clockqueue_init(&ci->ci_queue);
sched_init_cpu(ci);
ci->ci_next = cpu_info_list->ci_next;
cpu_info_list->ci_next = ci;
-/* $OpenBSD: machdep.c,v 1.142 2022/12/10 02:41:56 aoyama Exp $ */
+/* $OpenBSD: machdep.c,v 1.143 2023/06/15 22:18:07 cheloha Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
cpu_configuration_print(0);
ncpus++;
+ clockqueue_init(&ci->ci_queue);
sched_init_cpu(ci);
nanouptime(&ci->ci_schedstate.spc_runtime);
ci->ci_curproc = NULL;
-/* $OpenBSD: cpu.c,v 1.85 2022/03/13 12:33:01 mpi Exp $ */
+/* $OpenBSD: cpu.c,v 1.86 2023/06/15 22:18:07 cheloha Exp $ */
/*
* Copyright (c) 1997 Per Fogelstrom
continue;
ci->ci_randseed = (arc4random() & 0x7fffffff) + 1;
+ clockqueue_init(&ci->ci_queue);
sched_init_cpu(ci);
cpu_spinup(NULL, ci);
-/* $OpenBSD: cpu.c,v 1.82 2022/04/06 18:59:26 naddy Exp $ */
+/* $OpenBSD: cpu.c,v 1.83 2023/06/15 22:18:07 cheloha Exp $ */
/*
* Copyright (c) 1997-2004 Opsycon AB (www.opsycon.se)
continue;
ci->ci_randseed = (arc4random() & 0x7fffffff) + 1;
+ clockqueue_init(&ci->ci_queue);
sched_init_cpu(ci);
cpu_boot_secondary(ci);
}
-/* $OpenBSD: cpu.c,v 1.25 2023/01/25 09:53:53 kettenis Exp $ */
+/* $OpenBSD: cpu.c,v 1.26 2023/06/15 22:18:07 cheloha Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
if (dev->dv_unit != 0) {
int timeout = 10000;
+ clockqueue_init(&ci->ci_queue);
sched_init_cpu(ci);
ncpus++;
-/* $OpenBSD: cpu.c,v 1.13 2022/04/06 18:59:27 naddy Exp $ */
+/* $OpenBSD: cpu.c,v 1.14 2023/06/15 22:18:08 cheloha Exp $ */
/*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
if (ci->ci_flags & CPUF_AP) {
int timeout = 10000;
+ clockqueue_init(&ci->ci_queue);
sched_init_cpu(ci);
if (cpu_hatch_secondary(ci)) {
atomic_setbits_int(&ci->ci_flags, CPUF_IDENTIFY);
-/* $OpenBSD: cpu.c,v 1.73 2021/10/24 17:05:04 mpi Exp $ */
+/* $OpenBSD: cpu.c,v 1.74 2023/06/15 22:18:08 cheloha Exp $ */
/* $NetBSD: cpu.c,v 1.13 2001/05/26 21:27:15 chs Exp $ */
/*
cpi->ci_self = cpi;
cpi->ci_node = ma->ma_node;
+ clockqueue_init(&cpi->ci_queue);
sched_init_cpu(cpi);
/*
-/* $OpenBSD: init_main.c,v 1.320 2023/01/01 07:00:51 jsg Exp $ */
+/* $OpenBSD: init_main.c,v 1.321 2023/06/15 22:18:06 cheloha Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
#include <sys/resourcevar.h>
#include <sys/signalvar.h>
#include <sys/systm.h>
+#include <sys/clockintr.h>
#include <sys/namei.h>
#include <sys/vnode.h>
#include <sys/tty.h>
/* Initialize run queues */
sched_init_runqueues();
sleep_queue_init();
+ clockqueue_init(&curcpu()->ci_queue);
sched_init_cpu(curcpu());
p->p_cpu->ci_randseed = (arc4random() & 0x7fffffff) + 1;
-/* $OpenBSD: kern_clockintr.c,v 1.21 2023/04/23 00:08:36 cheloha Exp $ */
+/* $OpenBSD: kern_clockintr.c,v 1.22 2023/06/15 22:18:06 cheloha Exp $ */
/*
* Copyright (c) 2003 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
void clockintr_schedule_locked(struct clockintr *, uint64_t);
void clockintr_statclock(struct clockintr *, void *);
void clockintr_statvar_init(int, uint32_t *, uint32_t *, uint32_t *);
-void clockqueue_init(struct clockintr_queue *);
uint64_t clockqueue_next(const struct clockintr_queue *);
void clockqueue_reset_intrclock(struct clockintr_queue *);
uint64_t nsec_advance(uint64_t *, uint64_t, uint64_t);
KASSERT(ISSET(clockintr_flags, CL_INIT));
- clockqueue_init(cq);
if (ic != NULL && !ISSET(cq->cq_flags, CQ_INTRCLOCK)) {
cq->cq_intrclock = *ic;
SET(cq->cq_flags, CQ_INTRCLOCK);
-/* $OpenBSD: clockintr.h,v 1.7 2023/04/20 14:51:28 cheloha Exp $ */
+/* $OpenBSD: clockintr.h,v 1.8 2023/06/15 22:18:06 cheloha Exp $ */
/*
* Copyright (c) 2020-2022 Scott Cheloha <cheloha@openbsd.org>
*
* Kernel API
*/
+void clockqueue_init(struct clockintr_queue *);
int sysctl_clockintr(int *, u_int, void *, size_t *, void *, size_t);
#endif /* _KERNEL */