From owner-svn-src-all@freebsd.org Sun Dec 3 09:35:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA342DF5AA6; Sun, 3 Dec 2017 09:35:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 929B57262C; Sun, 3 Dec 2017 09:35:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 109D13C41F5; Sun, 3 Dec 2017 20:35:36 +1100 (AEDT) Date: Sun, 3 Dec 2017 20:35:35 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r326486 - in head/stand: ofw/libofw powerpc/boot1.chrp In-Reply-To: <201712030454.vB34ssem056112@repo.freebsd.org> Message-ID: <20171203185027.T872@besplex.bde.org> References: <201712030454.vB34ssem056112@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cK6QihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=DNgnx3KX5R2QDtOBvDsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Dec 2017 09:35:45 -0000 On Sun, 3 Dec 2017, Warner Losh wrote: > Log: > Include machine/md_var to pick up __syncicache prototype. This is nonsense. machine/md_var.h is kernel-only, but on powerpc it declares __syncicache() which also exists in userland. This include is like including the kernel-only header sys/systm.h to declare printf() in userland. It is also an error to include machine/md_var.h in MI files in the kernel. Approx. 72 of the 305 includes of it in -current have this bug. The worst one is probably the one in altq_subr.c. altq_subr.c abuses the MD variable cpu_feature to test for CPUID_TSC. That is just the start of it layering violations and other bugs. > Modified: head/stand/ofw/libofw/elf_freebsd.c > ============================================================================== > --- head/stand/ofw/libofw/elf_freebsd.c Sun Dec 3 04:54:49 2017 (r326485) > +++ head/stand/ofw/libofw/elf_freebsd.c Sun Dec 3 04:54:54 2017 (r326486) > @@ -32,6 +32,9 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#if defined(__powerpc__) > +#include > +#endif Style bug (verbose spelling of 'ifdef'). Bruce