Subject: kern/10291: kernel build failure on sparc in kern_clock.c if MULTIPROCESSOR
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jbernard@mines.edu>
List: netbsd-bugs
Date: 06/05/2000 13:41:45
>Number: 10291
>Category: kern
>Synopsis: kernel build failure on sparc in kern_clock.c if MULTIPROCESSOR
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jun 05 13:41:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Jim Bernard
>Release: June 5, 2000
>Organization:
Speaking for myself
>Environment:
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
>Description:
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 defined(MULTIPROCESSOR)
/*
* If we are not the primary CPU, we're not allowed to do
* any more work.
*/
if (CPU_IS_PRIMARY(curcpu()) == 0)
return;
#endif
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
primary CPU).
>How-To-Repeat:
Try to build a MULTIPROCESSOR kernel with current sources.
>Fix:
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.
>Release-Note:
>Audit-Trail:
>Unformatted: