From owner-svn-src-head@FreeBSD.ORG Sun Oct 27 19:19:16 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 95066565; Sun, 27 Oct 2013 19:19:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 68B2427A1; Sun, 27 Oct 2013 19:19:16 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VaVrh-000AQS-2d; Sun, 27 Oct 2013 19:19:09 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r9RJJ6cn049074; Sun, 27 Oct 2013 13:19:06 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/q7q+4SfU1fL54ecXzGSWe Subject: Re: svn commit: r257200 - in head/sys/arm: allwinner allwinner/a20 arm at91 broadcom/bcm2835 econa freescale/imx include lpc mv rockchip samsung/exynos tegra ti ti/am335x ti/omap4 ti/twl versatile xili... From: Ian Lepore To: Bruce Evans In-Reply-To: <20131028030951.V929@besplex.bde.org> References: <201310270134.r9R1YBbI037760@svn.freebsd.org> <20131028030951.V929@besplex.bde.org> Content-Type: text/plain; charset="us-ascii" Date: Sun, 27 Oct 2013 13:19:06 -0600 Message-ID: <1382901546.1170.236.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 27 Oct 2013 19:19:16 -0000 On Mon, 2013-10-28 at 04:01 +1100, Bruce Evans wrote: > On Sun, 27 Oct 2013, Ian Lepore wrote: > > > Log: > > Remove #include from all the arm code that doesn't > > really need it. That would be almost everywhere it was included. Add > > it in a couple files that really do need it and were previously getting > > it by accident via another header. > > Oops, I complained too soon about style bugs attached to these includes > in another reply. Removing the includes also removes most of the > collateral style bugs. > > How do you find the files that _really_ do need it? Nested pollution > makes this difficult. tools/kerninclude barely works. When I tried > to reduce nested pollution, I used a predecessor of tools/kerninclude > that was more usable because it was more localized, but it got other > things wrong. Mostly by brute force and a fast machine for compiling. I removed it from pretty much everywhere it appeared except the few places I knew were legit (such as arm/trap.c), then added it back as needed to get a clean compile. At one point I realized that a place where it was included from within another header was really required[1] and I had to backtrack a bit, do that, then re-iterate forward. Luckily that didn't happen until most of the arm tree had compiled without frame.h being included from any other .h. I've had this brute force method break down completely with more complex situations, but it went pretty quickly with this one. [1] Really required given the way other code is structured now. There's a macro in cpu.h that expands to derefence trapframe, and that macro is used in kern/something.c. Maybe that macro could be a function, but I didn't want to sidetrack and review the performance implications of that change at the time. -- Ian