From owner-freebsd-arch@FreeBSD.ORG Mon Jun 14 17:27:12 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 144AE1065673; Mon, 14 Jun 2010 17:27:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id DB9738FC17; Mon, 14 Jun 2010 17:27:11 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 8D06946B8A; Mon, 14 Jun 2010 13:27:11 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A0FEC8A03C; Mon, 14 Jun 2010 13:27:10 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Date: Mon, 14 Jun 2010 12:51:45 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201006141251.45896.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 14 Jun 2010 13:27:10 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: mdf@freebsd.org Subject: Re: arch-specific directories 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: Mon, 14 Jun 2010 17:27:12 -0000 On Monday 14 June 2010 11:26:45 am mdf@freebsd.org wrote: > This is as much as request for information as a suggestion. > > I am wondering of the current layout of sys/ make sense given > that in several cases the only difference between two "arch" is the > bitness, e.g. powerpc and powerpc64. The 64-bit version supports a > few new instructions, but in many cases is the same. The same issue > exists with i386/amd64 but because both have been supported for a long > time the have full arch separation. However, there has been some > movement of files that are common between i386 and amd64 into a common > x86 directory. > > So what I'm wondering is it it makes more sense to have files broken > up more like: > > sys/ for common file between bitness > sys//32 > sys//64 for files that are specific to the bitness > > This would presumably serve at least powerpc and i386/amd64 well, and > though I don't know for sure I assume at the moment that it works for > sun/sparc as well. > > So... is this reasonable? Or does the existence of ia64 throw a > monkey wrench into this layout? Is it not worth the shuffle (though > I'd argue that, if we're moving some files to x86 and creating a new > powerpc64 that it's better to consider now than later). > > I realize there was a discussion earlier along similar lines (the > bi-yearly architecture source tree layout discussion) but I don't > think it was specifically considering the 32/64 bit differences, which > seem to be more common now. I think for archs that share a lot in common between 32-bit and 64-bit varieties using shared sources of some sort (e.g. sys/x86) should be encouraged. This is probably more true (and feasible) for more recently added architectures such as powerpc, arm, and mips. Alpha and ia64 would not have fit into this category. Since we do not support 32-bit sparc, sparc64 doesn't really fit into it either. However, I think that some of our build infrastructure assumes that that the current MACHINE/TARGET is in the path, so e.g. make buildkernel uses sys/$TARGET/conf to find the kernel config file to build, so we may be stuck with some of the layout differences at the top-level. I suspect the arm, powerpc, and mips target names are already embedded at this point, but I would not mind an organization where common code lived in sys/mips and 32-bit and 64-bit bits lived in sys/mips32 and sys/mips64. (That would work with the existing kernel config path assumptions, but require changing 'arm' -> 'arm32', etc. for MACHINE/TARGET). I'm sure Warner has some ideas on this topic as well. -- John Baldwin