diff options
author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2017-11-25 23:41:05 +0000 |
---|---|---|
committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2017-11-25 23:41:05 +0000 |
commit | efe67753ccbbbba0013dac241c79d2dc124d76a2 (patch) | |
tree | 4be85fd57c569410684dbdb83ad09998aa8530c4 /sys/kern/kern_timeout.c | |
parent | 91419bdafdfee515afb4e20e5c92035cc19074bb (diff) | |
download | src-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_timeout.c')
-rw-r--r-- | sys/kern/kern_timeout.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index d245b0d40597..81b4a14ecf08 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -264,7 +264,7 @@ cc_cce_migrating(struct callout_cpu *cc, int direct) /* * Kernel low level callwheel initialization - * called on cpu0 during kernel startup. + * called on the BSP during kernel startup. */ static void callout_callwheel_init(void *dummy) @@ -277,7 +277,7 @@ callout_callwheel_init(void *dummy) * XXX: Clip callout to result of previous function of maxusers * maximum 384. This is still huge, but acceptable. */ - memset(CC_CPU(0), 0, sizeof(cc_cpu)); + memset(CC_CPU(curcpu), 0, sizeof(cc_cpu)); ncallout = imin(16 + maxproc + maxfiles, 18508); TUNABLE_INT_FETCH("kern.ncallout", &ncallout); @@ -295,7 +295,7 @@ callout_callwheel_init(void *dummy) TUNABLE_INT_FETCH("kern.pin_pcpu_swi", &pin_pcpu_swi); /* - * Only cpu0 handles timeout(9) and receives a preallocation. + * Only BSP handles timeout(9) and receives a preallocation. * * XXX: Once all timeout(9) consumers are converted this can * be removed. @@ -330,7 +330,7 @@ callout_cpu_init(struct callout_cpu *cc, int cpu) cc_cce_cleanup(cc, i); snprintf(cc->cc_ktr_event_name, sizeof(cc->cc_ktr_event_name), "callwheel cpu %d", cpu); - if (cc->cc_callout == NULL) /* Only cpu0 handles timeout(9) */ + if (cc->cc_callout == NULL) /* Only BSP handles timeout(9) */ return; for (i = 0; i < ncallout; i++) { c = &cc->cc_callout[i]; @@ -400,7 +400,7 @@ start_softclock(void *dummy) if (cpu == timeout_cpu) continue; cc = CC_CPU(cpu); - cc->cc_callout = NULL; /* Only cpu0 handles timeout(9). */ + cc->cc_callout = NULL; /* Only BSP handles timeout(9). */ callout_cpu_init(cc, cpu); snprintf(name, sizeof(name), "clock (%d)", cpu); ie = NULL; |