From owner-svn-src-head@freebsd.org Sun Dec 3 21:17:08 2017 Return-Path: Delivered-To: svn-src-head@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 B80EBE68A0E for ; Sun, 3 Dec 2017 21:17:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A7056A22E for ; Sun, 3 Dec 2017 21:17:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22a.google.com with SMTP id x28so8249625ita.0 for ; Sun, 03 Dec 2017 13:17:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ILOt0twH0E8paA3wLkpnYiwu9Mnf+0G8MeK1ZdeVJsw=; b=dh0X0Eh+PS9XLp+d1BTZTmrCrYB+t1u1IoOsCQK6H+cjaQF41jDHvywdNjx2GZk2jt XedM0fKhL5dxEA4uo4NkkHziTSQZVCO9aEt5mWhivYg4Mcn02lu0OuxUWIjZGF+J0GdB gtDTC7rqEUtSjHhJf5gTWZVLCPA4aYmjb8w7Vs9J3HyKguthTOdHlGCcys1J9MstIMx6 u6TVROWX0tlxp33bgPnLjzkjH7oFMOicfiss5R03obEheqPS5Ph9NkOugu2pTFKKH4qD FAKuH/wMx5UZR/yY+yjywumL3H4+ctnnqqTYZmmus+wVITVTSFqwn7f6dccmbp4BEqle sRJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ILOt0twH0E8paA3wLkpnYiwu9Mnf+0G8MeK1ZdeVJsw=; b=DgmVf9Ajo8TJ4YOUE9ddLEnZS8bs6fAoeM1STcTWDI5YaTu36EuJ6hSY+JV7BfJwbv qzdojFe+tfNp/v5ryaZvdvF+CliGO/9ECroIXxrfwvqABpunX4yzlFTyKe+9VNx89lbj NMeyfHIAirJoxOHvnqqRYWtHD/q5ksdvTRt145LKrBK3hRmhGE729ZRp38STjuuzRhD3 s22SaZTMKGjRnb4tajG6J4T9mkkVwMC1Wt5NbWVNcxgQsKOZpAwycEQ7yamdiwu0Yvnu wEBGtasm3PN5NoBUNf9heoyAjuVuGbGrhSKsaB/IfBzWCEztuw+3YnwZXOXu3H5Oy/jg WevA== X-Gm-Message-State: AKGB3mJ7ATm061gs5e72OmGtu8zOInaFiD0pdf1bXjkw2v1TEHLJKS4n 2ueArSN7epsaJXm07xmDHpVcMgYKb0pxlTx4jHy5UA== X-Google-Smtp-Source: AGs4zMbr878PITxdLjbIhMuWmr8Yd8IO7NPST4bDYrLwOIrblGdnkfVk7jpuexKXUZMWW1XNyW/F+dcIukbWwbZypkE= X-Received: by 10.107.52.140 with SMTP id b134mr9145678ioa.291.1512335827641; Sun, 03 Dec 2017 13:17:07 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Sun, 3 Dec 2017 13:17:07 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <20171203185027.T872@besplex.bde.org> References: <201712030454.vB34ssem056112@repo.freebsd.org> <20171203185027.T872@besplex.bde.org> From: Warner Losh Date: Sun, 3 Dec 2017 14:17:07 -0700 X-Google-Sender-Auth: qQWtuWX4LBwtwQ9V_JtGc0KpNMI Message-ID: Subject: Re: svn commit: r326486 - in head/stand: ofw/libofw powerpc/boot1.chrp To: Bruce Evans Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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, 03 Dec 2017 21:17:08 -0000 On Sun, Dec 3, 2017 at 2:35 AM, Bruce Evans wrote: > 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. > Yea.... This is the sort of thing that should be defined in cpufunc.h or similar. I didn't feel like moving it, so I made one more bad place in the tree instead... So I agree with this feedback. > 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. There's a number of swamps in the tree, alas. This is one of them... I'm draining the boot loader and associated programs swamp, which is a big enough job as it is... 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'). Agreed. It matches the style used elsewhere, but that's a poor excuse. Warner