From owner-svn-src-head@FreeBSD.ORG Mon Jul 12 09:42:05 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F37B106568C; Mon, 12 Jul 2010 09:42:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 012D38FC0A; Mon, 12 Jul 2010 09:42:04 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6C9g1ra007453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 12 Jul 2010 19:42:02 +1000 Date: Mon, 12 Jul 2010 19:42:01 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "Jayachandran C." In-Reply-To: <201007120724.o6C7OeuT027114@svn.freebsd.org> Message-ID: <20100712185429.B61886@delplex.bde.org> References: <201007120724.o6C7OeuT027114@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r209928 - head/sys/mips/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 09:42:05 -0000 On Mon, 12 Jul 2010, Jayachandran C. wrote: > Log: > Move KSEG address definitions from cpu.h to cpuregs.h with the other > definitions, add some XKPHYS related definitions for n64. This is a good start to cleaning up mips cpu.h. but far from complete. cpu.h is for MD implementations of a few (about 10) MI interfaces. Most cpu.h's are about 2K long but the mips one is about 17K. The arm one is the smallest, partly because it is missing a copyright, but it still consists about half of things that shouldn't be in it. The amd64 one is the most correct. The only bugs in it are: - lots of namespace pollution via nested includes. Unfortunately a couple of things in the nested includes are needed to implement the macros in this file. - COPY_SIGCODE is defined, but seems to have never been used in FreeBSD. 4.4BSD had it in all cpu.h's and may even have used it in its execve(), but FreeBSD only has it in a few cpu.h's and has no references to it in any other source file at any time. - cpu_halt() and cpu_reset() have a MI interface and don't need to be implemented as a macro, so they should be declared in an MI place. Perhaps similarly for some other cpu_*() functions. cpu_excec() and cpu_swapin() are now empty macros for amd64, but they could be empty functions. - fork_trampoline() is are declared, but is not used by MI code (but is referred to in comments in MI code). - swi_vm(): like cpu*_() but more MI. Only missing busdma support for some archines makes it MD. It is a callback function and cannot be a macro since its address is taken so that it can be called back to. amd64 cpu.h ends up with definitions or declarations for: - 3 things that need to be there - 7 things that don't need to be there, but can reasonably be there - 2 things that shouldn't be there - 2 things that really shouldn't be there - 1 thing that shouldn't be anywhere - uncounted namespace pollution from the nested includes. Bruce