From owner-freebsd-arch@FreeBSD.ORG Wed Oct 27 21:25:22 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 146D6106566B; Wed, 27 Oct 2010 21:25:22 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id A77A98FC18; Wed, 27 Oct 2010 21:25:21 +0000 (UTC) Received: by qyk2 with SMTP id 2so87244qyk.13 for ; Wed, 27 Oct 2010 14:25:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=qs6IucI1SR1E1SRR4IuhurFvsXyOVQYwHNMcJh/MWoU=; b=SwL4/j34ay+WKW9VQxNS1tHAoh6PtnaxwSBB2ndV3kWcBwGL4beHi4nsBLNcuHroUK puq1ZsjGSgLb4OLiqZVZGmJOw/xdfFTRDA+R/jdnOimu2DkH2bNqLl5JSnqoUQ+NNMs5 y4/sYJiz0qlQu3i4cKSZQcVpA/JyR/4JJXB7c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=gqDv0JU3yNCjwluWaSM6fVXkgsA6X4LzebLNHLuyhc6GkL7vMT/+s0y6tTjcW4S8ld pWtK3WpHcBSrWdo/VqH69xaWmfBwgCqa5Mck25S5y+RaFsCKl2Yz7HftGcr3l4ggB5xR qIL5mNyKmFb0fhYBn5YsJ2AQOJmW//Nx+2wcc= MIME-Version: 1.0 Received: by 10.229.212.5 with SMTP id gq5mr1620607qcb.275.1288214720808; Wed, 27 Oct 2010 14:25:20 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.229.237.9 with HTTP; Wed, 27 Oct 2010 14:25:20 -0700 (PDT) In-Reply-To: <201010271649.47880.jhb@freebsd.org> References: <201010271355.40685.jhb@freebsd.org> <201010271649.47880.jhb@freebsd.org> Date: Wed, 27 Oct 2010 23:25:20 +0200 X-Google-Sender-Auth: 0HE71wz6rJQqxiuaAA2C7DybL-Y Message-ID: From: Attilio Rao To: John Baldwin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arch@freebsd.org Subject: Re: [PATCH] Headers for the x86 subtree X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Oct 2010 21:25:22 -0000 2010/10/27 John Baldwin : > On Wednesday, October 27, 2010 4:00:15 pm Attilio Rao wrote: >> 2010/10/27 John Baldwin : >> > On Wednesday, October 27, 2010 10:56:06 am 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 movin= g >> >> other files as time permits. >> > >> > No, we want to do this differently because we also want this to work i= n >> > userland. =C2=A0(e.g. I'd like to outright move mca.h to x86/include a= nd then use >> > '#include ' in both kernel and userland for it). =C2=A0We'd= need some >> > special glue to setup an 'x86' symlink during a kernel build that poin= ts to >> > @/x86/include as we do now to setup an 'i386' link for pc98 kernels. >> > >> > We'd also need to install the x86 headers into /usr/include during an >> > installworld. =C2=A0Warner has some more pointers on this I think. >> >> So you probabilly are suggesting to go w/ the "pc98 approach". >> I'm fine with it, I'll try to look for how it works and implement as wel= l. > > Thanks. =C2=A0I think it is fine to use '#include ' in code di= rectly > with this approach as well. =C2=A0I only think we should provide wrappers= in > /usr/include/machine if compatibility is needed. =C2=A0mca.h and mptable.= h > shouldn't need compatibility for example, but specialreg.h might. I'd expect to potentially mirror any header, otherwise on which criterias we can say some are needed and other not? Thanks, Attilio --=20 Peace can only be achieved by understanding - A. Einstein