Subject: kern/10291: kernel build failure on sparc in kern_clock.c if MULTIPROCESSOR
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 06/05/2000 13:41:45
>Synopsis: kernel build failure on sparc in kern_clock.c if MULTIPROCESSOR
>Arrival-Date: Mon Jun 05 13:41:00 PDT 2000
>Originator: Jim Bernard
>Release: June 5, 2000
Speaking for myself
System: NetBSD knox 1.4V NetBSD 1.4V (KNOX-$Revision: 1.5 $) #0: Sun Mar 19 10:27:24 MST 2000 jbernard@knox:/fh/usr/tmp/compile/sys/arch/sparc/compile/KNOX sparc
Config file has MULTIPROCESSOR defined. Build system is sparc.
Kernel build chokes:
cc -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-main -I. -I../../../../arch -I../../../.. -nostdinc -I../../../../../gnu/sys -DSUN4M -DRASTERCONSOLE -DDIAGNOSTIC -DMIIVERBOSE -DMAXUSERS=32 -D_KERNEL -c ../../../../kern/kern_clock.c
../../../../kern/kern_clock.c: In function `hardclock':
../../../../kern/kern_clock.c:514: structure has no member named `ci_master'
*** Error code 1
kern_clock.c is: 1.60 2000/06/03 20:42:42, and line 514 is the first
code line in:
* If we are not the primary CPU, we're not allowed to do
* any more work.
if (CPU_IS_PRIMARY(curcpu()) == 0)
The commit message for 1.60 suggests that the problem was introduced
with changes associated with that revision:
Move schedticks and cp_time into schedstate_percpu. Also, allow
non-primary CPUs to call hardclock(), but make them bail about
before updating global timekeeping state (that's the job of the
Try to build a MULTIPROCESSOR kernel with current sources.
This appears to be caused by a spelling error. There is a structure
called cpuinfo used in sparc/include/cpu.h (to define curcpu()) that
is apparently supposed to be defined in sparc/sparc/cpuvar.h, but the
structure there is called cpu_info (note different spelling). Choose
whichever is correct/preferred, and change the other. Note that in
the cpu.h file for alpha, cpu_info is used.