[PATCH] Headers for the x86 subtree

John Baldwin jhb at freebsd.org
Fri Oct 29 13:44:56 UTC 2010


On Thursday, October 28, 2010 4:58:15 pm Ulrich Spörlein wrote:
> On Wed, 27.10.2010 at 16:56:06 +0200, Attilio Rao wrote:
> > This patch should convert a (simple and 100% shared between amd64 and
> > i386 header) under the x86 sub-tree. Please note that in this patch I
> > "svn cp" the file from sys/amd64/include/mptable.h into
> > sys/x86/include/mptable.h:
> > http://www.freebsd.org/~attilio/headers-x86.diff
> > 
> > This is someway a POC, that I really want to get in. The idea is
> > simple and someway follows the pc98 case (even if not entirely): the
> > files under machine/include/* became just mere stubs for x86/include/*
> > contents and redirect there.
> > This won't particulary help reducing the number of available files,
> > but generally removing verbatim and would also be the way to go for
> > handling MFCs.
> > If you find this is the right way I'll commit the fix and start moving
> > other files as time permits.
> 
> What I don't quite get with the new x86 directory is, why we didn't make
> it arch/x86 from the start? The usual argument against moving
> architecture specific stuff to arch/ is that it will break diffs for
> vendors. Now with x86 and the merging we are breaking their stuff
> anyway, but we don't actually improve the clutter under /sys and even
> gain a new arch-specific dir, not under arch/
> 
> Somehow, this seems like a missed opportunity for an often requested
> cleanup. :/

Because you'd need to move all the architectures to be consistent.  Also, the 
point of 'x86' is that there are a lot of bits that are shared between i386 
and amd64.  Prior to 'x86' many of that code was simply duplicated making it 
harder to maintain.  The goal of an 'x86' arch is to be a repository for code 
shared between i386 and amd64.  Note that both Linux and NetBSD have adopted a 
similar model for code shared between i386 and amd64.

-- 
John Baldwin


More information about the freebsd-arch mailing list