NetBSD Problem Report #10291

Received: (qmail 18964 invoked from network); 5 Jun 2000 20:40:02 -0000
Message-Id: <200006052040.OAA23773@knox.mines.edu>
Date: Mon, 5 Jun 2000 14:40:01 -0600 (MDT)
From: jbernard@mines.edu
Reply-To: jbernard@mines.edu
To: gnats-bugs@gnats.netbsd.org
Subject: kernel build failure on sparc in kern_clock.c if MULTIPROCESSOR
X-Send-Pr-Version: 3.95

>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:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 05 20:41:00 +0000 2000
>Closed-Date:    Mon Jun 05 20:48:02 +0000 2000
>Last-Modified:  Mon Jun 05 20:48:02 +0000 2000
>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:
State-Changed-From-To: open->closed 
State-Changed-By: thorpej 
State-Changed-When: Mon Jun 5 13:47:53 PDT 2000 
State-Changed-Why:  
Fixed. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.