From owner-cvs-all@FreeBSD.ORG Wed Sep 1 14:04:47 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 977AE16A4CE; Wed, 1 Sep 2004 14:04:47 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id E93B543D4C; Wed, 1 Sep 2004 14:04:46 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])i81E4bMx004833; Wed, 1 Sep 2004 17:04:42 +0300 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) i81E4ObH006810; Wed, 1 Sep 2004 17:04:24 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost)i81E4OHv006809; Wed, 1 Sep 2004 17:04:24 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Wed, 1 Sep 2004 17:04:24 +0300 From: Giorgos Keramidas To: Julian Elischer Message-ID: <20040901140424.GA6322@orion.daedalusnetworks.priv> References: <200409010642.i816g2lK094069@repoman.freebsd.org> <20040901112017.GA43387@orion.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040901112017.GA43387@orion.daedalusnetworks.priv> 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 14:04:47 -0000 On 2004-09-01 14:20, Giorgos Keramidas wrote: > On 2004-09-01 06:42, Julian Elischer wrote: > > 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: [...] > > 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: [...] Hmmm, now that I look at sys/smp.h the all_cpus and nearby externs should be moved inside #ifdef SMP too to match the changes of 1.191 subr_smp.c: %%% 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 14:00:30 -0000 @@ -49,23 +49,26 @@ extern int smp_cpus; extern volatile cpumask_t started_cpus; extern volatile cpumask_t stopped_cpus; +extern cpumask_t all_cpus; +extern cpumask_t idle_cpus_mask; +extern cpumask_t hlt_cpus_mask; +extern cpumask_t logical_cpus_mask; #endif /* SMP */ extern u_int mp_maxid; extern int mp_ncpus; extern volatile int smp_started; -extern cpumask_t all_cpus; -extern cpumask_t idle_cpus_mask; -extern cpumask_t hlt_cpus_mask; -extern cpumask_t logical_cpus_mask; - /* * Macro allowing us to determine whether a CPU is absent at any given * 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, %%%