Re: [PATCH 01/20] x86, intel: Introduce macros for Intel family numbers

From: Darren Hart
Date: Thu Jun 02 2016 - 17:46:11 EST


On Wed, Jun 01, 2016 at 05:11:57PM -0700, Dave Hansen wrote:
>
> From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
>
> If you are cc'd on this code, please check _your_ code vs. the
> model list in "intel-family.h". Please make sure you have all
> the models listed that you intend to.
>
> Problem:
>
> We have a boatload of open-coded family-6 model numbers. Half of
> them have these model numbers in hex and the other half in
> decimal. This makes grepping for them tons of fun, if you were
> to try.
>
> Solution:
>
> Consolidate all the magic numbers. Put all the definitions in
> one header.
>
> The names here are closely derived from the comments describing
> the models from arch/x86/events/intel/core.c. We could easily
> make them shorter by doing things like s/SANDYBRIDGE/SNB/, but
> they seemed fine even with the longer versions to me.
>
> Do not take any of these names too literally, like "DESKTOP"
> or "MOBILE". These are all colloquial names and not precise
> descriptions of everywhere a given model will show up.
>
> Signed-off-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
> Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> Cc: Andy Lutomirski <luto@xxxxxxxxxx>
> Cc: Borislav Petkov <bp@xxxxxxxxx>
> Cc: Darren Hart <dvhart@xxxxxxxxxxxxx>

For platform/drivers/x86:

Magic number to macro mapping verified.

Acked-by: Darren Hart <dvhart@xxxxxxxxxxxxxxx>

--
Darren Hart
Intel Open Source Technology Center