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
Giorgos Keramidas
keramida at freebsd.org
Wed Sep 1 07:04:47 PDT 2004
On 2004-09-01 14:20, Giorgos Keramidas <keramida at freebsd.org> wrote:
> On 2004-09-01 06:42, Julian Elischer <julian at freebsd.org> 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,
%%%
More information about the cvs-src
mailing list