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

John Baldwin jhb at FreeBSD.org
Wed Sep 1 14:13:49 PDT 2004


On Wednesday 01 September 2004 10:04 am, Giorgos Keramidas wrote:
> 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:

Please no!  There is a _reason_ for this:

----------------------------
revision 1.180
date: 2003/12/03 14:55:31;  author: jhb;  state: Exp;  lines: +36 -0
Export a few SMP related symbols in UP kernels as well.  This is needed to
aid other kernel code, especially code which can be in a module such as
the acpi_cpu(4) driver, to work properly with both SMP and UP kernels.
The exported symbols include mp_ncpus, all_cpus, mp_maxid, smp_started, and
the smp_rendezvous() function.  This also means that CPU_ABSENT() is now
always implemented the same on all kernels.

Approved by:    re (scottl)
----------------------------

The idea is to cut down on the number of #ifdef SMP's in the kernel, esp the 
parts in modules which can't possibly work.  Part of the whole SMPng deal is 
that one now needs to think of the kernel as inherently SMP and 
multithreaded.  SMP is no longer a special case bolted onto the side as in 
4.x.

-- 
John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org


More information about the cvs-src mailing list