Re: [current tinderbox] failure on ia64/ia64

From: Giorgos Keramidas <keramida_at_linux.gr>
Date: Wed, 1 Sep 2004 18:06:38 +0300
On 2004-09-01 07:57, FreeBSD Tinderbox <tinderbox_at_freebsd.org> 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_core.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/sys/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
_at__at_ -49,23 +49,26 _at__at_
 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
_at__at_ -495,7 +495,6 _at__at_
 {
 	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,
%%%
Received on Wed Sep 01 2004 - 13:06:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:09 UTC