From owner-cvs-all@FreeBSD.ORG Wed Sep 1 11:20:31 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9309616A4CF; Wed, 1 Sep 2004 11:20:31 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC03B43D45; Wed, 1 Sep 2004 11:20:30 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])i81BKRgc009674; Wed, 1 Sep 2004 14:20:28 +0300 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) i81BKIMn051683; Wed, 1 Sep 2004 14:20:18 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost)i81BKIW7051678; Wed, 1 Sep 2004 14:20:18 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Wed, 1 Sep 2004 14:20:18 +0300 From: Giorgos Keramidas To: Julian Elischer Message-ID: <20040901112017.GA43387@orion.daedalusnetworks.priv> References: <200409010642.i816g2lK094069@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200409010642.i816g2lK094069@repoman.freebsd.org> cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/amd64/amd64 mp_machdep.c src/sys/i386/i386 mp_machdep.c src/sys/i386/include param.h src/sys/kern kern_idle.c kern_switch.c sched_4bsd.c subr_smp.c src/sys/sys smp.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2004 11:20:31 -0000 On 2004-09-01 06:42, Julian Elischer wrote: > Give the 4bsd scheduler the ability to wake up idle processors > when there is new work to be done. > 1.191 +135 -1 src/sys/kern/subr_smp.c This moved all_cpus in an #ifdef SMP which breaks the compilation on non-SPM systems: : linking kernel.debug : subr_smp.o(.text+0x1f): In function `mp_setvariables_for_up': : /usr/src/sys/kern/subr_smp.c:498: undefined reference to `all_cpus' : uma_core.o(.text+0x1ff): In function `zone_timeout': : /usr/src/sys/vm/uma_core.c:384: undefined reference to `all_cpus' : uma_core.o(.text+0x5e3): In function `cache_drain': : /usr/src/sys/vm/uma_core.c:610: undefined reference to `all_cpus' : uma_core.o(.text+0x6b3):/usr/src/sys/vm/uma_core.c:626: undefined reference to `all_cpus' : uma_core.o(.text+0x2fcb): In function `uma_print_zone': : /usr/src/sys/vm/uma_core.c:2660: undefined reference to `all_cpus' : uma_core.o(.text+0x314b):/usr/src/sys/vm/uma_core.c:2712: more undefined references to `all_cpus' follow : *** Error code 1 : : Stop in /usr/obj/usr/src/sys/ORION. If all_cpus is only meaningful in the #ifdef SMP case, the following diff seems necessary to unbreak the build of HEAD on non-SMP systems: %%% Index: sys/smp.h =================================================================== RCS file: /home/ncvs/src/sys/sys/smp.h,v retrieving revision 1.80 diff -u -r1.80 smp.h --- sys/smp.h 1 Sep 2004 06:42:02 -0000 1.80 +++ sys/smp.h 1 Sep 2004 11:14:29 -0000 @@ -65,7 +65,11 @@ * time, thus permitting us to configure sparse maps of cpuid-dependent * (per-CPU) structures. */ +#ifdef SMP #define CPU_ABSENT(x_cpu) ((all_cpus & (1 << (x_cpu))) == 0) +#else +#define CPU_ABSENT(x_cpu) (0) +#endif #ifdef SMP /* Index: kern/subr_smp.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_smp.c,v retrieving revision 1.191 diff -u -r1.191 subr_smp.c --- kern/subr_smp.c 1 Sep 2004 06:42:01 -0000 1.191 +++ kern/subr_smp.c 1 Sep 2004 11:12:38 -0000 @@ -495,7 +495,6 @@ { mp_ncpus = 1; mp_maxid = PCPU_GET(cpuid); - all_cpus = PCPU_GET(cpumask); KASSERT(PCPU_GET(cpuid) == 0, ("UP must have a CPU ID of zero")); } SYSINIT(cpu_mp_setvariables, SI_SUB_TUNABLES, SI_ORDER_FIRST, %%%