[MODERATED] Re: [PATCH 1/2] more sampling fun 1

mark gross <[email protected]> Fri, 21 Feb 2020 14:10:51 -0800
Newsgroups org.kernel.lore.historical-speck
Message-ID <[email protected]>
On Thu, Feb 20, 2020 at 07:08:45PM +0000, speck for Ben Hutchings wrote:
> On Thu, 2020-02-06 at 14:11 -0800, speck for mark gross wrote:
> > From: mark gross <[email protected]>
> > Subject: [PATCH 1/2] Add capability to specify a range of steppings in the
> [...]
> > --- a/arch/x86/include/asm/cpu_device_id.h
> > +++ b/arch/x86/include/asm/cpu_device_id.h
> > @@ -35,7 +35,19 @@ struct x86_cpu_desc {
> >  	.x86_microcode_rev	= (revision),			\
> >  }
> >  
> > +/*
> > + * Match a range of steppings
> > + */
> > +
> > +struct x86_cpu_id_ext {
> > +	struct x86_cpu_id id;
> > +	__u16 steppings; /* bit map of steppings to match against */
> > +};
> > +
> > +#define X86_STEPPING_ANY 0
> [...]
> 
> Minor point, but wouldn't it make more sense to define X86_STEPPING_ANY
> as GENMASK(15, 0)?  Then it's no longer a special case.
> 
Right, I had initialy used basicaly the equivelent (-1 or 0xFFFF) for
X86_STEPPING_ANY but, it was pointed out that other similar usages use 0 as a
flag for "ANY" and was encuraged to mimic that logic.  See X86_FAMILY_ANY,
X86_MODEL_ANY, X86_FEATURE_ANY.

I'm cool with either way.

Given this background do you still encurage using GENMASK(15,0)?

--mark