From owner-svn-src-all@freebsd.org Tue May 3 16:35:26 2016 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 B411CB2B1E3; Tue, 3 May 2016 16:35:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A4AD1E0A; Tue, 3 May 2016 16:35:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6C577B93A; Tue, 3 May 2016 12:35:25 -0400 (EDT) From: John Baldwin To: Bruce Evans Cc: Pedro Giffuni , "Ngie Cooper (yaneurabeya)" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r298933 - in head: share/man/man9 sys/amd64/include sys/dev/acpica sys/dev/drm2 sys/dev/drm2/i915 sys/kern sys/sys sys/x86/acpica sys/x86/x86 Date: Tue, 03 May 2016 09:35:18 -0700 Message-ID: <8989101.JIAk4LJusf@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <20160503152502.A939@besplex.bde.org> References: <201605021800.u42I0cjK084243@repo.freebsd.org> <20160503152502.A939@besplex.bde.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 03 May 2016 12:35:25 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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: Tue, 03 May 2016 16:35:26 -0000 On Tuesday, May 03, 2016 03:52:56 PM Bruce Evans wrote: > On Mon, 2 May 2016, Pedro Giffuni wrote: > > > > On 05/02/16 15:52, John Baldwin wrote: > >> On Monday, May 02, 2016 11:45:41 AM Ngie Cooper wrote: > >>> > >>>> On May 2, 2016, at 11:00, John Baldwin wrote: > >>>> > >>>> Author: jhb > >>>> [... excessive quoting trimmed] > >>>> New Revision: 298933 > >>>> URL: https://svnweb.freebsd.org/changeset/base/298933 > >>>> > >>>> Log: > >>>> Add a new bus method to fetch device-specific CPU sets. > >>>> [... excessive quoting trimmed] > >>>> kernel > >>> > >>> This broke the build with gcc: > >>> https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc/1211/ > >> > >> I saw. What is odd though is that my tinderbox builds all passed. This > >> might > >> be due to the recent howmany() changes since _bitset.h only needed > >> > >> before but now needs (which is borderline to being pointless > >> for > >> a _foo.h header). > > > > TBH, I thought so too, but I avoided applying such changes to headers, > > and I haven't touched _bitset.h, > > _foo.h headers cannot use howmany() due to namespace pollution. > > _bitset.h was already broken, unless it is supposed to be kernel-only -- > it uses howmany(). It is kernel-only according to its documention -- > bitset is only documented in kernel manpages (in a single unreadable one > than is linked ad nauseum). cpuset.h is used in userland for cpuset_getaffinity(2), etc. > It is otherwise fairly clean. It defines the symbols BITSET_DEFINE, > BITSET_T_INITIALIZER, and BITSET_SET in the application namespace > This is not completely clean for a _foo.h header. All other BITSET* > macros are already in bitset.h I think only BITSET_DEFINE should be > in _bitset.h (for use declarations in other headers). > > select.h avoids this problem by defining its own howmany() macro. This > seems to be correct except for the bogus ifdef around the private macro. > This ifdef is a little more than a style bug (verboseness) -- it breaks > detection of other definitions that might be different. Lexical > differences wouldn't matter, but it is easier to never have them. > > Old versions of select polluted . The select macros just > used howmany(). howmany() was in too. I would be happy to fix _bitset.h and _cpuset.h to not need sys/param.h. However, they also use NBBY which is defined in sys/param.h. _sigset.h gets around this because it uses an array of uint32_t and hardcodes a shift count of 5 in _SIG_WORD() and a mask of 31 in _SIG_BIT(). If you think it is fine to hardcode '8' instead of 'NBBY' I'll do that. Hmm, sys/select.h hardcodes '8' for _NFDBITS, so I guess that is fine. I will fix _bitset.h and _cpuset.h first and then come back to bus_get_cpus(). -- John Baldwin