From owner-freebsd-ia64@FreeBSD.ORG Wed Sep 1 21:13:40 2004 Return-Path: Delivered-To: freebsd-ia64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E204416A4D0 for ; Wed, 1 Sep 2004 21:13:40 +0000 (GMT) Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89B4943D41 for ; Wed, 1 Sep 2004 21:13:40 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 3885 invoked from network); 1 Sep 2004 21:13:40 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 1 Sep 2004 21:13:39 -0000 Received: from [10.50.41.228] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i81LDVpB062794; Wed, 1 Sep 2004 17:13:35 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-ia64@FreeBSD.org Date: Wed, 1 Sep 2004 14:50:00 -0400 User-Agent: KMail/1.6.2 References: <20040901115723.3122E7303F@freebsd-current.sentex.ca> <20040901150638.GA7118@orion.daedalusnetworks.priv> <413607DD.9040702@elischer.org> In-Reply-To: <413607DD.9040702@elischer.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409011450.00269.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: FreeBSD Tinderbox cc: current@FreeBSD.org cc: Julian Elischer cc: Giorgos Keramidas cc: ia64@FreeBSD.org Subject: Re: [current tinderbox] failure on ia64/ia64 X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2004 21:13:41 -0000 On Wednesday 01 September 2004 01:33 pm, Julian Elischer wrote: > my bad.. > I tested it on SMP compiel and forgot a UP compile.. > of course UP has no reason to access those fields to the fact that it > breaks exposes another bug.. Code in modules such as acpi.ko that needs to be agnostic and work on both SMP and UP kernels while still dealing with individual CPUs certainly does need this information. > Giorgos Keramidas wrote: > >On 2004-09-01 07:57, FreeBSD Tinderbox wrote: > >>>>>stage 3.2: building everything > >> > >>[...] > >>/tinderbox/CURRENT/ia64/ia64/src/sys/kern/subr_smp.c:498: undefined > >> reference to `all_cpus' uma_core.o(.text+0x3fa1): In function > >> `zone_timeout': > >>/tinderbox/CURRENT/ia64/ia64/src/sys/vm/uma_core.c:382: undefined > >> reference to `all_cpus' uma_core.o(.text+0x6a21): In function > >> `zone_dtor': > >>/tinderbox/CURRENT/ia64/ia64/src/sys/vm/uma_core.c:1423: undefined > >> reference to `all_cpus' uma_core.o(.text+0x8730): In function > >> `uma_print_zone': > >>/tinderbox/CURRENT/ia64/ia64/src/sys/vm/uma_core.c:2657: undefined > >> reference to `all_cpus' > >> uma_core.o(.text+0x8c31):/tinderbox/CURRENT/ia64/ia64/src/sys/vm/uma_cor > >>e.c:2710: more undefined references to `all_cpus' follow *** Error code 1 > >> > >>Stop in > >> /tinderbox/CURRENT/ia64/ia64/obj/ia64/tinderbox/CURRENT/ia64/ia64/src/sy > >>s/GENERIC. *** Error code 1 > >> > >>Stop in /tinderbox/CURRENT/ia64/ia64/src. > >>*** Error code 1 > >> > >>Stop in /tinderbox/CURRENT/ia64/ia64/src. > >>TB --- 2004-09-01 11:57:23 - WARNING: /usr/bin/make returned exit code 1 > >>TB --- 2004-09-01 11:57:23 - ERROR: failed to build generic kernel > >>TB --- 2004-09-01 11:57:23 - tinderbox aborted > > > >Until Julian or another src-committer fixes the build error, this patch > >unbreaks the build for me on non-SMP i386/i386. Since the affected code > >is not specific to i386, it probably fixes the other architectures too: > > > >%%% > >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, > >%%% > > > >_______________________________________________ > >freebsd-current@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-current > >To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > > _______________________________________________ > freebsd-ia64@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ia64 > To unsubscribe, send any mail to "freebsd-ia64-unsubscribe@freebsd.org" -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org