aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_clocksource.c
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2017-11-25 23:41:05 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2017-11-25 23:41:05 +0000
commitefe67753ccbbbba0013dac241c79d2dc124d76a2 (patch)
tree4be85fd57c569410684dbdb83ad09998aa8530c4 /sys/kern/kern_clocksource.c
parent91419bdafdfee515afb4e20e5c92035cc19074bb (diff)
downloadsrc-efe67753ccbbbba0013dac241c79d2dc124d76a2.tar.gz
src-efe67753ccbbbba0013dac241c79d2dc124d76a2.zip
Remove some, but not all, assumptions that the BSP is CPU 0 and that CPUs
are numbered densely from there to n_cpus. MFC after: 1 month
Notes
Notes: svn path=/head/; revision=326218
Diffstat (limited to 'sys/kern/kern_clocksource.c')
-rw-r--r--sys/kern/kern_clocksource.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_clocksource.c b/sys/kern/kern_clocksource.c
index 61293173f22d..b7d8bb916856 100644
--- a/sys/kern/kern_clocksource.c
+++ b/sys/kern/kern_clocksource.c
@@ -822,6 +822,8 @@ cpu_new_callout(int cpu, sbintime_t bt, sbintime_t bt_opt)
CTR6(KTR_SPARE2, "new co at %d: on %d at %d.%08x - %d.%08x",
curcpu, cpu, (int)(bt_opt >> 32), (u_int)(bt_opt & 0xffffffff),
(int)(bt >> 32), (u_int)(bt & 0xffffffff));
+
+ KASSERT(!CPU_ABSENT(cpu), ("Absent CPU %d", cpu));
state = DPCPU_ID_PTR(cpu, timerstate);
ET_HW_LOCK(state);