MFC r280786:

Try to unbreak !SMP kernels  broken in r280785 (head), r281657 by using
  the proper macros to access cc_cpu.

Requested by:	jmallett
Pointyhat to:	rrs
This commit is contained in:
bz 2015-04-24 07:52:21 +00:00
parent 34a6863b39
commit cb88cb87a1

View File

@ -256,7 +256,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, sizeof(cc_cpu));
memset(CC_CPU(0), 0, sizeof(cc_cpu));
ncallout = imin(16 + maxproc + maxfiles, 18508);
TUNABLE_INT_FETCH("kern.ncallout", &ncallout);
@ -927,7 +927,7 @@ callout_reset_sbt_on(struct callout *c, sbintime_t sbt, sbintime_t precision,
if (cpu == -1) {
ignore_cpu = 1;
} else if ((cpu >= MAXCPU) ||
(cc_cpu[cpu].cc_inited == 0)) {
((CC_CPU(cpu))->cc_inited == 0)) {
/* Invalid CPU spec */
panic("Invalid CPU in callout %d", cpu);
}