Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Sep 2004 15:19:42 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        Giorgos Keramidas <keramida@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
Message-ID:  <200409011519.42627.jhb@FreeBSD.org>
In-Reply-To: <20040901140424.GA6322@orion.daedalusnetworks.priv>
References:  <200409010642.i816g2lK094069@repoman.freebsd.org> <20040901112017.GA43387@orion.daedalusnetworks.priv> <20040901140424.GA6322@orion.daedalusnetworks.priv>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 01 September 2004 10:04 am, Giorgos Keramidas wrote:
> On 2004-09-01 14:20, Giorgos Keramidas <keramida@freebsd.org> wrote:
> > On 2004-09-01 06:42, Julian Elischer <julian@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@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409011519.42627.jhb>