[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171012081634.5xu2vtmmt3hbqohp@gmail.com>
Date: Thu, 12 Oct 2017 10:16:34 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Andi Kleen <andi@...stfloor.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Andi Kleen <ak@...ux.intel.com>,
Jonathan McDowell <noodles@...th.li>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v9 2/5] x86/cpuid: Add generic table for cpuid
dependencies
* Ingo Molnar <mingo@...nel.org> wrote:
> > + bool changed;
> > + __u32 disable[NCAPINTS + NBUGINTS];
> > + unsigned long *disable_mask = (unsigned long *)disable;
> > + const struct cpuid_dep *d;
>
> The constant forced types are really ugly and permeate the whole code. Please
> introduce some suitably named helpers in the x86 bitops file that work on local
> variables:
>
> var &= ~(1<<bit);
> var |= 1<<bit;
So instead of adding helpers the 1<< ops can be written out explicitly - they are
easy to read after all. Can also be:
var &= ~BIT(bit);
var |= BIT(bit);
Thanks,
Ingo
Powered by blists - more mailing lists