svn commit: r304193 - projects/powernv/kern
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Tue Aug 16 00:40:39 UTC 2016
Author: nwhitehorn
Date: Tue Aug 16 00:40:38 2016
New Revision: 304193
URL: https://svnweb.freebsd.org/changeset/base/304193
Log:
Fix yet another place in the kernel that assumes the BSP is CPU 0.
Modified:
projects/powernv/kern/kern_timeout.c
Modified: projects/powernv/kern/kern_timeout.c
==============================================================================
--- projects/powernv/kern/kern_timeout.c Tue Aug 16 00:15:15 2016 (r304192)
+++ projects/powernv/kern/kern_timeout.c Tue Aug 16 00:40:38 2016 (r304193)
@@ -262,7 +262,7 @@ cc_cce_migrating(struct callout_cpu *cc,
/*
* 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)
@@ -275,7 +275,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);
@@ -293,7 +293,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.
@@ -328,7 +328,7 @@ callout_cpu_init(struct callout_cpu *cc,
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];
@@ -398,7 +398,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;
More information about the svn-src-projects
mailing list