Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 05 Feb 2019 16:53:17 -0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gr3yG-0002O4-2x for speck@linutronix.de; Tue, 05 Feb 2019 17:53:16 +0100 Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gr3yE-0005Gg-Gk for speck@linutronix.de; Tue, 05 Feb 2019 16:53:14 +0000 Date: Tue, 5 Feb 2019 17:53:11 +0100 From: Peter Zijlstra Subject: [MODERATED] Re: [PATCH v1 4/9] PERFv1 2 Message-ID: <20190205165311.GF17550@hirez.programming.kicks-ass.net> References: <20190205145109.GV17528@hirez.programming.kicks-ass.net> <20190205163558.GE31598@tassilo.jf.intel.com> MIME-Version: 1.0 In-Reply-To: <20190205163558.GE31598@tassilo.jf.intel.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Tue, Feb 05, 2019 at 08:35:58AM -0800, speck for Andi Kleen wrote: > On Tue, Feb 05, 2019 at 03:51:09PM +0100, speck for Peter Zijlstra wrote: > > On Mon, Feb 04, 2019 at 05:14:05PM -0800, speck for Andi Kleen wrote: > > > @@ -242,6 +242,11 @@ struct cpu_hw_events { > > > struct intel_excl_cntrs *excl_cntrs; > > > int excl_thread_id; /* 0 or 1 */ > > > > > > + /* > > > + * Manage using counter 3 on Skylake with TSX. > > > + */ > > > + bool force_rtm_abort_active; /* We set the MSR */ > > > + > > > /* > > > * AMD specific bits > > > */ > > > > How often must we repeat; no bool in composite types... and could you > > really not come up with a longer name? > > Okay. > > However let me point to https://blogs.msdn.microsoft.com/oldnewthing/20081126-00/?p=20073 I'm not saying you have to use a bitfield, but use a type with well-defined storage size. Note how that article assumes BOOL := int, this is not true in general. C spec does not define sizeof(_Bool) and leaves it to ABI specs. For linux-x86 _Bool ends up being u8 for example. For Darwin-PowerPC _Bool is u32 (just like that windows thing). And us having to tell you things over and over is just annoying.