diff mbox series

[v1] intel_idle: Get rid of custom ICPU() macro

Message ID 20180831082229.67325-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Mainlined
Delegated to: Rafael Wysocki
Headers show
Series [v1] intel_idle: Get rid of custom ICPU() macro | expand

Commit Message

Andy Shevchenko Aug. 31, 2018, 8:22 a.m. UTC
Replace custom grown macro with generic INTEL_CPU_FAM6() one.

No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/idle/intel_idle.c | 75 +++++++++++++++++++--------------------
 1 file changed, 36 insertions(+), 39 deletions(-)

Comments

Jacob Pan Sept. 4, 2018, 3:56 p.m. UTC | #1
On Fri, 31 Aug 2018 11:22:29 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> Replace custom grown macro with generic INTEL_CPU_FAM6() one.
> 
> No functional change intended.
> 
Looks good to me. Perhaps you can also do the same to intel_rapl.c,
RAPL_CPU().

Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>

Thanks,

Jacob

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/idle/intel_idle.c | 75
> +++++++++++++++++++-------------------- 1 file changed, 36
> insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index b2ccce5fb071..791b8a366e6e 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -1066,46 +1066,43 @@ static const struct idle_cpu idle_cpu_dnv = {
>  	.disable_promotion_to_c1e = true,
>  };
>  
> -#define ICPU(model, cpu) \
> -	{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned
> long)&cpu } -
>  static const struct x86_cpu_id intel_idle_ids[] __initconst = {
> -	ICPU(INTEL_FAM6_NEHALEM_EP,		idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_NEHALEM,		idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_NEHALEM_G,		idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_WESTMERE,		idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_WESTMERE_EP,
> idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_NEHALEM_EX,		idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_ATOM_PINEVIEW,		idle_cpu_atom),
> -	ICPU(INTEL_FAM6_ATOM_LINCROFT,
> idle_cpu_lincroft),
> -	ICPU(INTEL_FAM6_WESTMERE_EX,
> idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_SANDYBRIDGE,		idle_cpu_snb),
> -	ICPU(INTEL_FAM6_SANDYBRIDGE_X,		idle_cpu_snb),
> -	ICPU(INTEL_FAM6_ATOM_CEDARVIEW,
> idle_cpu_atom),
> -	ICPU(INTEL_FAM6_ATOM_SILVERMONT1,	idle_cpu_byt),
> -	ICPU(INTEL_FAM6_ATOM_MERRIFIELD,	idle_cpu_tangier),
> -	ICPU(INTEL_FAM6_ATOM_AIRMONT,		idle_cpu_cht),
> -	ICPU(INTEL_FAM6_IVYBRIDGE,		idle_cpu_ivb),
> -	ICPU(INTEL_FAM6_IVYBRIDGE_X,		idle_cpu_ivt),
> -	ICPU(INTEL_FAM6_HASWELL_CORE,		idle_cpu_hsw),
> -	ICPU(INTEL_FAM6_HASWELL_X,		idle_cpu_hsw),
> -	ICPU(INTEL_FAM6_HASWELL_ULT,		idle_cpu_hsw),
> -	ICPU(INTEL_FAM6_HASWELL_GT3E,		idle_cpu_hsw),
> -	ICPU(INTEL_FAM6_ATOM_SILVERMONT2,	idle_cpu_avn),
> -	ICPU(INTEL_FAM6_BROADWELL_CORE,		idle_cpu_bdw),
> -	ICPU(INTEL_FAM6_BROADWELL_GT3E,		idle_cpu_bdw),
> -	ICPU(INTEL_FAM6_BROADWELL_X,		idle_cpu_bdw),
> -	ICPU(INTEL_FAM6_BROADWELL_XEON_D,	idle_cpu_bdw),
> -	ICPU(INTEL_FAM6_SKYLAKE_MOBILE,		idle_cpu_skl),
> -	ICPU(INTEL_FAM6_SKYLAKE_DESKTOP,	idle_cpu_skl),
> -	ICPU(INTEL_FAM6_KABYLAKE_MOBILE,	idle_cpu_skl),
> -	ICPU(INTEL_FAM6_KABYLAKE_DESKTOP,	idle_cpu_skl),
> -	ICPU(INTEL_FAM6_SKYLAKE_X,		idle_cpu_skx),
> -	ICPU(INTEL_FAM6_XEON_PHI_KNL,		idle_cpu_knl),
> -	ICPU(INTEL_FAM6_XEON_PHI_KNM,		idle_cpu_knl),
> -	ICPU(INTEL_FAM6_ATOM_GOLDMONT,		idle_cpu_bxt),
> -	ICPU(INTEL_FAM6_ATOM_GEMINI_LAKE,	idle_cpu_bxt),
> -	ICPU(INTEL_FAM6_ATOM_DENVERTON,		idle_cpu_dnv),
> +	INTEL_CPU_FAM6(NEHALEM_EP,		idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(NEHALEM,
> idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(NEHALEM_G,		idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(WESTMERE,		idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(WESTMERE_EP,		idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(NEHALEM_EX,		idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(ATOM_PINEVIEW,		idle_cpu_atom),
> +	INTEL_CPU_FAM6(ATOM_LINCROFT,
> idle_cpu_lincroft),
> +	INTEL_CPU_FAM6(WESTMERE_EX,		idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(SANDYBRIDGE,		idle_cpu_snb),
> +	INTEL_CPU_FAM6(SANDYBRIDGE_X,		idle_cpu_snb),
> +	INTEL_CPU_FAM6(ATOM_CEDARVIEW,		idle_cpu_atom),
> +	INTEL_CPU_FAM6(ATOM_SILVERMONT1,	idle_cpu_byt),
> +	INTEL_CPU_FAM6(ATOM_MERRIFIELD,
> idle_cpu_tangier),
> +	INTEL_CPU_FAM6(ATOM_AIRMONT,		idle_cpu_cht),
> +	INTEL_CPU_FAM6(IVYBRIDGE,		idle_cpu_ivb),
> +	INTEL_CPU_FAM6(IVYBRIDGE_X,		idle_cpu_ivt),
> +	INTEL_CPU_FAM6(HASWELL_CORE,		idle_cpu_hsw),
> +	INTEL_CPU_FAM6(HASWELL_X,		idle_cpu_hsw),
> +	INTEL_CPU_FAM6(HASWELL_ULT,		idle_cpu_hsw),
> +	INTEL_CPU_FAM6(HASWELL_GT3E,		idle_cpu_hsw),
> +	INTEL_CPU_FAM6(ATOM_SILVERMONT2,	idle_cpu_avn),
> +	INTEL_CPU_FAM6(BROADWELL_CORE,		idle_cpu_bdw),
> +	INTEL_CPU_FAM6(BROADWELL_GT3E,		idle_cpu_bdw),
> +	INTEL_CPU_FAM6(BROADWELL_X,		idle_cpu_bdw),
> +	INTEL_CPU_FAM6(BROADWELL_XEON_D,	idle_cpu_bdw),
> +	INTEL_CPU_FAM6(SKYLAKE_MOBILE,		idle_cpu_skl),
> +	INTEL_CPU_FAM6(SKYLAKE_DESKTOP,		idle_cpu_skl),
> +	INTEL_CPU_FAM6(KABYLAKE_MOBILE,		idle_cpu_skl),
> +	INTEL_CPU_FAM6(KABYLAKE_DESKTOP,	idle_cpu_skl),
> +	INTEL_CPU_FAM6(SKYLAKE_X,		idle_cpu_skx),
> +	INTEL_CPU_FAM6(XEON_PHI_KNL,		idle_cpu_knl),
> +	INTEL_CPU_FAM6(XEON_PHI_KNM,		idle_cpu_knl),
> +	INTEL_CPU_FAM6(ATOM_GOLDMONT,		idle_cpu_bxt),
> +	INTEL_CPU_FAM6(ATOM_GEMINI_LAKE,	idle_cpu_bxt),
> +	INTEL_CPU_FAM6(ATOM_DENVERTON,		idle_cpu_dnv),
>  	{}
>  };
>  

[Jacob Pan]
Andy Shevchenko Sept. 4, 2018, 4:59 p.m. UTC | #2
On Tue, Sep 04, 2018 at 08:56:12AM -0700, Jacob Pan wrote:
> On Fri, 31 Aug 2018 11:22:29 +0300
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> 
> > Replace custom grown macro with generic INTEL_CPU_FAM6() one.
> > 
> > No functional change intended.
> > 
> Looks good to me. Perhaps you can also do the same to intel_rapl.c,
> RAPL_CPU().

MAINTAINERS doesn't show you for RAPL.
See [1].

[1]: https://marc.info/?l=linux-pm&m=153570391713066&w=2

> 
> Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
> 
> Thanks,
> 
> Jacob
> 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >  drivers/idle/intel_idle.c | 75
> > +++++++++++++++++++-------------------- 1 file changed, 36
> > insertions(+), 39 deletions(-)
> > 
> > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> > index b2ccce5fb071..791b8a366e6e 100644
> > --- a/drivers/idle/intel_idle.c
> > +++ b/drivers/idle/intel_idle.c
> > @@ -1066,46 +1066,43 @@ static const struct idle_cpu idle_cpu_dnv = {
> >  	.disable_promotion_to_c1e = true,
> >  };
> >  
> > -#define ICPU(model, cpu) \
> > -	{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned
> > long)&cpu } -
> >  static const struct x86_cpu_id intel_idle_ids[] __initconst = {
> > -	ICPU(INTEL_FAM6_NEHALEM_EP,		idle_cpu_nehalem),
> > -	ICPU(INTEL_FAM6_NEHALEM,		idle_cpu_nehalem),
> > -	ICPU(INTEL_FAM6_NEHALEM_G,		idle_cpu_nehalem),
> > -	ICPU(INTEL_FAM6_WESTMERE,		idle_cpu_nehalem),
> > -	ICPU(INTEL_FAM6_WESTMERE_EP,
> > idle_cpu_nehalem),
> > -	ICPU(INTEL_FAM6_NEHALEM_EX,		idle_cpu_nehalem),
> > -	ICPU(INTEL_FAM6_ATOM_PINEVIEW,		idle_cpu_atom),
> > -	ICPU(INTEL_FAM6_ATOM_LINCROFT,
> > idle_cpu_lincroft),
> > -	ICPU(INTEL_FAM6_WESTMERE_EX,
> > idle_cpu_nehalem),
> > -	ICPU(INTEL_FAM6_SANDYBRIDGE,		idle_cpu_snb),
> > -	ICPU(INTEL_FAM6_SANDYBRIDGE_X,		idle_cpu_snb),
> > -	ICPU(INTEL_FAM6_ATOM_CEDARVIEW,
> > idle_cpu_atom),
> > -	ICPU(INTEL_FAM6_ATOM_SILVERMONT1,	idle_cpu_byt),
> > -	ICPU(INTEL_FAM6_ATOM_MERRIFIELD,	idle_cpu_tangier),
> > -	ICPU(INTEL_FAM6_ATOM_AIRMONT,		idle_cpu_cht),
> > -	ICPU(INTEL_FAM6_IVYBRIDGE,		idle_cpu_ivb),
> > -	ICPU(INTEL_FAM6_IVYBRIDGE_X,		idle_cpu_ivt),
> > -	ICPU(INTEL_FAM6_HASWELL_CORE,		idle_cpu_hsw),
> > -	ICPU(INTEL_FAM6_HASWELL_X,		idle_cpu_hsw),
> > -	ICPU(INTEL_FAM6_HASWELL_ULT,		idle_cpu_hsw),
> > -	ICPU(INTEL_FAM6_HASWELL_GT3E,		idle_cpu_hsw),
> > -	ICPU(INTEL_FAM6_ATOM_SILVERMONT2,	idle_cpu_avn),
> > -	ICPU(INTEL_FAM6_BROADWELL_CORE,		idle_cpu_bdw),
> > -	ICPU(INTEL_FAM6_BROADWELL_GT3E,		idle_cpu_bdw),
> > -	ICPU(INTEL_FAM6_BROADWELL_X,		idle_cpu_bdw),
> > -	ICPU(INTEL_FAM6_BROADWELL_XEON_D,	idle_cpu_bdw),
> > -	ICPU(INTEL_FAM6_SKYLAKE_MOBILE,		idle_cpu_skl),
> > -	ICPU(INTEL_FAM6_SKYLAKE_DESKTOP,	idle_cpu_skl),
> > -	ICPU(INTEL_FAM6_KABYLAKE_MOBILE,	idle_cpu_skl),
> > -	ICPU(INTEL_FAM6_KABYLAKE_DESKTOP,	idle_cpu_skl),
> > -	ICPU(INTEL_FAM6_SKYLAKE_X,		idle_cpu_skx),
> > -	ICPU(INTEL_FAM6_XEON_PHI_KNL,		idle_cpu_knl),
> > -	ICPU(INTEL_FAM6_XEON_PHI_KNM,		idle_cpu_knl),
> > -	ICPU(INTEL_FAM6_ATOM_GOLDMONT,		idle_cpu_bxt),
> > -	ICPU(INTEL_FAM6_ATOM_GEMINI_LAKE,	idle_cpu_bxt),
> > -	ICPU(INTEL_FAM6_ATOM_DENVERTON,		idle_cpu_dnv),
> > +	INTEL_CPU_FAM6(NEHALEM_EP,		idle_cpu_nehalem),
> > +	INTEL_CPU_FAM6(NEHALEM,
> > idle_cpu_nehalem),
> > +	INTEL_CPU_FAM6(NEHALEM_G,		idle_cpu_nehalem),
> > +	INTEL_CPU_FAM6(WESTMERE,		idle_cpu_nehalem),
> > +	INTEL_CPU_FAM6(WESTMERE_EP,		idle_cpu_nehalem),
> > +	INTEL_CPU_FAM6(NEHALEM_EX,		idle_cpu_nehalem),
> > +	INTEL_CPU_FAM6(ATOM_PINEVIEW,		idle_cpu_atom),
> > +	INTEL_CPU_FAM6(ATOM_LINCROFT,
> > idle_cpu_lincroft),
> > +	INTEL_CPU_FAM6(WESTMERE_EX,		idle_cpu_nehalem),
> > +	INTEL_CPU_FAM6(SANDYBRIDGE,		idle_cpu_snb),
> > +	INTEL_CPU_FAM6(SANDYBRIDGE_X,		idle_cpu_snb),
> > +	INTEL_CPU_FAM6(ATOM_CEDARVIEW,		idle_cpu_atom),
> > +	INTEL_CPU_FAM6(ATOM_SILVERMONT1,	idle_cpu_byt),
> > +	INTEL_CPU_FAM6(ATOM_MERRIFIELD,
> > idle_cpu_tangier),
> > +	INTEL_CPU_FAM6(ATOM_AIRMONT,		idle_cpu_cht),
> > +	INTEL_CPU_FAM6(IVYBRIDGE,		idle_cpu_ivb),
> > +	INTEL_CPU_FAM6(IVYBRIDGE_X,		idle_cpu_ivt),
> > +	INTEL_CPU_FAM6(HASWELL_CORE,		idle_cpu_hsw),
> > +	INTEL_CPU_FAM6(HASWELL_X,		idle_cpu_hsw),
> > +	INTEL_CPU_FAM6(HASWELL_ULT,		idle_cpu_hsw),
> > +	INTEL_CPU_FAM6(HASWELL_GT3E,		idle_cpu_hsw),
> > +	INTEL_CPU_FAM6(ATOM_SILVERMONT2,	idle_cpu_avn),
> > +	INTEL_CPU_FAM6(BROADWELL_CORE,		idle_cpu_bdw),
> > +	INTEL_CPU_FAM6(BROADWELL_GT3E,		idle_cpu_bdw),
> > +	INTEL_CPU_FAM6(BROADWELL_X,		idle_cpu_bdw),
> > +	INTEL_CPU_FAM6(BROADWELL_XEON_D,	idle_cpu_bdw),
> > +	INTEL_CPU_FAM6(SKYLAKE_MOBILE,		idle_cpu_skl),
> > +	INTEL_CPU_FAM6(SKYLAKE_DESKTOP,		idle_cpu_skl),
> > +	INTEL_CPU_FAM6(KABYLAKE_MOBILE,		idle_cpu_skl),
> > +	INTEL_CPU_FAM6(KABYLAKE_DESKTOP,	idle_cpu_skl),
> > +	INTEL_CPU_FAM6(SKYLAKE_X,		idle_cpu_skx),
> > +	INTEL_CPU_FAM6(XEON_PHI_KNL,		idle_cpu_knl),
> > +	INTEL_CPU_FAM6(XEON_PHI_KNM,		idle_cpu_knl),
> > +	INTEL_CPU_FAM6(ATOM_GOLDMONT,		idle_cpu_bxt),
> > +	INTEL_CPU_FAM6(ATOM_GEMINI_LAKE,	idle_cpu_bxt),
> > +	INTEL_CPU_FAM6(ATOM_DENVERTON,		idle_cpu_dnv),
> >  	{}
> >  };
> >  
> 
> [Jacob Pan]
Rafael J. Wysocki Sept. 14, 2018, 8:28 a.m. UTC | #3
On Friday, August 31, 2018 10:22:29 AM CEST Andy Shevchenko wrote:
> Replace custom grown macro with generic INTEL_CPU_FAM6() one.
> 
> No functional change intended.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/idle/intel_idle.c | 75 +++++++++++++++++++--------------------
>  1 file changed, 36 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index b2ccce5fb071..791b8a366e6e 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -1066,46 +1066,43 @@ static const struct idle_cpu idle_cpu_dnv = {
>  	.disable_promotion_to_c1e = true,
>  };
>  
> -#define ICPU(model, cpu) \
> -	{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long)&cpu }
> -
>  static const struct x86_cpu_id intel_idle_ids[] __initconst = {
> -	ICPU(INTEL_FAM6_NEHALEM_EP,		idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_NEHALEM,		idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_NEHALEM_G,		idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_WESTMERE,		idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_WESTMERE_EP,		idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_NEHALEM_EX,		idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_ATOM_PINEVIEW,		idle_cpu_atom),
> -	ICPU(INTEL_FAM6_ATOM_LINCROFT,		idle_cpu_lincroft),
> -	ICPU(INTEL_FAM6_WESTMERE_EX,		idle_cpu_nehalem),
> -	ICPU(INTEL_FAM6_SANDYBRIDGE,		idle_cpu_snb),
> -	ICPU(INTEL_FAM6_SANDYBRIDGE_X,		idle_cpu_snb),
> -	ICPU(INTEL_FAM6_ATOM_CEDARVIEW,		idle_cpu_atom),
> -	ICPU(INTEL_FAM6_ATOM_SILVERMONT1,	idle_cpu_byt),
> -	ICPU(INTEL_FAM6_ATOM_MERRIFIELD,	idle_cpu_tangier),
> -	ICPU(INTEL_FAM6_ATOM_AIRMONT,		idle_cpu_cht),
> -	ICPU(INTEL_FAM6_IVYBRIDGE,		idle_cpu_ivb),
> -	ICPU(INTEL_FAM6_IVYBRIDGE_X,		idle_cpu_ivt),
> -	ICPU(INTEL_FAM6_HASWELL_CORE,		idle_cpu_hsw),
> -	ICPU(INTEL_FAM6_HASWELL_X,		idle_cpu_hsw),
> -	ICPU(INTEL_FAM6_HASWELL_ULT,		idle_cpu_hsw),
> -	ICPU(INTEL_FAM6_HASWELL_GT3E,		idle_cpu_hsw),
> -	ICPU(INTEL_FAM6_ATOM_SILVERMONT2,	idle_cpu_avn),
> -	ICPU(INTEL_FAM6_BROADWELL_CORE,		idle_cpu_bdw),
> -	ICPU(INTEL_FAM6_BROADWELL_GT3E,		idle_cpu_bdw),
> -	ICPU(INTEL_FAM6_BROADWELL_X,		idle_cpu_bdw),
> -	ICPU(INTEL_FAM6_BROADWELL_XEON_D,	idle_cpu_bdw),
> -	ICPU(INTEL_FAM6_SKYLAKE_MOBILE,		idle_cpu_skl),
> -	ICPU(INTEL_FAM6_SKYLAKE_DESKTOP,	idle_cpu_skl),
> -	ICPU(INTEL_FAM6_KABYLAKE_MOBILE,	idle_cpu_skl),
> -	ICPU(INTEL_FAM6_KABYLAKE_DESKTOP,	idle_cpu_skl),
> -	ICPU(INTEL_FAM6_SKYLAKE_X,		idle_cpu_skx),
> -	ICPU(INTEL_FAM6_XEON_PHI_KNL,		idle_cpu_knl),
> -	ICPU(INTEL_FAM6_XEON_PHI_KNM,		idle_cpu_knl),
> -	ICPU(INTEL_FAM6_ATOM_GOLDMONT,		idle_cpu_bxt),
> -	ICPU(INTEL_FAM6_ATOM_GEMINI_LAKE,	idle_cpu_bxt),
> -	ICPU(INTEL_FAM6_ATOM_DENVERTON,		idle_cpu_dnv),
> +	INTEL_CPU_FAM6(NEHALEM_EP,		idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(NEHALEM,			idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(NEHALEM_G,		idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(WESTMERE,		idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(WESTMERE_EP,		idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(NEHALEM_EX,		idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(ATOM_PINEVIEW,		idle_cpu_atom),
> +	INTEL_CPU_FAM6(ATOM_LINCROFT,		idle_cpu_lincroft),
> +	INTEL_CPU_FAM6(WESTMERE_EX,		idle_cpu_nehalem),
> +	INTEL_CPU_FAM6(SANDYBRIDGE,		idle_cpu_snb),
> +	INTEL_CPU_FAM6(SANDYBRIDGE_X,		idle_cpu_snb),
> +	INTEL_CPU_FAM6(ATOM_CEDARVIEW,		idle_cpu_atom),
> +	INTEL_CPU_FAM6(ATOM_SILVERMONT1,	idle_cpu_byt),
> +	INTEL_CPU_FAM6(ATOM_MERRIFIELD,		idle_cpu_tangier),
> +	INTEL_CPU_FAM6(ATOM_AIRMONT,		idle_cpu_cht),
> +	INTEL_CPU_FAM6(IVYBRIDGE,		idle_cpu_ivb),
> +	INTEL_CPU_FAM6(IVYBRIDGE_X,		idle_cpu_ivt),
> +	INTEL_CPU_FAM6(HASWELL_CORE,		idle_cpu_hsw),
> +	INTEL_CPU_FAM6(HASWELL_X,		idle_cpu_hsw),
> +	INTEL_CPU_FAM6(HASWELL_ULT,		idle_cpu_hsw),
> +	INTEL_CPU_FAM6(HASWELL_GT3E,		idle_cpu_hsw),
> +	INTEL_CPU_FAM6(ATOM_SILVERMONT2,	idle_cpu_avn),
> +	INTEL_CPU_FAM6(BROADWELL_CORE,		idle_cpu_bdw),
> +	INTEL_CPU_FAM6(BROADWELL_GT3E,		idle_cpu_bdw),
> +	INTEL_CPU_FAM6(BROADWELL_X,		idle_cpu_bdw),
> +	INTEL_CPU_FAM6(BROADWELL_XEON_D,	idle_cpu_bdw),
> +	INTEL_CPU_FAM6(SKYLAKE_MOBILE,		idle_cpu_skl),
> +	INTEL_CPU_FAM6(SKYLAKE_DESKTOP,		idle_cpu_skl),
> +	INTEL_CPU_FAM6(KABYLAKE_MOBILE,		idle_cpu_skl),
> +	INTEL_CPU_FAM6(KABYLAKE_DESKTOP,	idle_cpu_skl),
> +	INTEL_CPU_FAM6(SKYLAKE_X,		idle_cpu_skx),
> +	INTEL_CPU_FAM6(XEON_PHI_KNL,		idle_cpu_knl),
> +	INTEL_CPU_FAM6(XEON_PHI_KNM,		idle_cpu_knl),
> +	INTEL_CPU_FAM6(ATOM_GOLDMONT,		idle_cpu_bxt),
> +	INTEL_CPU_FAM6(ATOM_GEMINI_LAKE,	idle_cpu_bxt),
> +	INTEL_CPU_FAM6(ATOM_DENVERTON,		idle_cpu_dnv),
>  	{}
>  };
>  
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index b2ccce5fb071..791b8a366e6e 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -1066,46 +1066,43 @@  static const struct idle_cpu idle_cpu_dnv = {
 	.disable_promotion_to_c1e = true,
 };
 
-#define ICPU(model, cpu) \
-	{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long)&cpu }
-
 static const struct x86_cpu_id intel_idle_ids[] __initconst = {
-	ICPU(INTEL_FAM6_NEHALEM_EP,		idle_cpu_nehalem),
-	ICPU(INTEL_FAM6_NEHALEM,		idle_cpu_nehalem),
-	ICPU(INTEL_FAM6_NEHALEM_G,		idle_cpu_nehalem),
-	ICPU(INTEL_FAM6_WESTMERE,		idle_cpu_nehalem),
-	ICPU(INTEL_FAM6_WESTMERE_EP,		idle_cpu_nehalem),
-	ICPU(INTEL_FAM6_NEHALEM_EX,		idle_cpu_nehalem),
-	ICPU(INTEL_FAM6_ATOM_PINEVIEW,		idle_cpu_atom),
-	ICPU(INTEL_FAM6_ATOM_LINCROFT,		idle_cpu_lincroft),
-	ICPU(INTEL_FAM6_WESTMERE_EX,		idle_cpu_nehalem),
-	ICPU(INTEL_FAM6_SANDYBRIDGE,		idle_cpu_snb),
-	ICPU(INTEL_FAM6_SANDYBRIDGE_X,		idle_cpu_snb),
-	ICPU(INTEL_FAM6_ATOM_CEDARVIEW,		idle_cpu_atom),
-	ICPU(INTEL_FAM6_ATOM_SILVERMONT1,	idle_cpu_byt),
-	ICPU(INTEL_FAM6_ATOM_MERRIFIELD,	idle_cpu_tangier),
-	ICPU(INTEL_FAM6_ATOM_AIRMONT,		idle_cpu_cht),
-	ICPU(INTEL_FAM6_IVYBRIDGE,		idle_cpu_ivb),
-	ICPU(INTEL_FAM6_IVYBRIDGE_X,		idle_cpu_ivt),
-	ICPU(INTEL_FAM6_HASWELL_CORE,		idle_cpu_hsw),
-	ICPU(INTEL_FAM6_HASWELL_X,		idle_cpu_hsw),
-	ICPU(INTEL_FAM6_HASWELL_ULT,		idle_cpu_hsw),
-	ICPU(INTEL_FAM6_HASWELL_GT3E,		idle_cpu_hsw),
-	ICPU(INTEL_FAM6_ATOM_SILVERMONT2,	idle_cpu_avn),
-	ICPU(INTEL_FAM6_BROADWELL_CORE,		idle_cpu_bdw),
-	ICPU(INTEL_FAM6_BROADWELL_GT3E,		idle_cpu_bdw),
-	ICPU(INTEL_FAM6_BROADWELL_X,		idle_cpu_bdw),
-	ICPU(INTEL_FAM6_BROADWELL_XEON_D,	idle_cpu_bdw),
-	ICPU(INTEL_FAM6_SKYLAKE_MOBILE,		idle_cpu_skl),
-	ICPU(INTEL_FAM6_SKYLAKE_DESKTOP,	idle_cpu_skl),
-	ICPU(INTEL_FAM6_KABYLAKE_MOBILE,	idle_cpu_skl),
-	ICPU(INTEL_FAM6_KABYLAKE_DESKTOP,	idle_cpu_skl),
-	ICPU(INTEL_FAM6_SKYLAKE_X,		idle_cpu_skx),
-	ICPU(INTEL_FAM6_XEON_PHI_KNL,		idle_cpu_knl),
-	ICPU(INTEL_FAM6_XEON_PHI_KNM,		idle_cpu_knl),
-	ICPU(INTEL_FAM6_ATOM_GOLDMONT,		idle_cpu_bxt),
-	ICPU(INTEL_FAM6_ATOM_GEMINI_LAKE,	idle_cpu_bxt),
-	ICPU(INTEL_FAM6_ATOM_DENVERTON,		idle_cpu_dnv),
+	INTEL_CPU_FAM6(NEHALEM_EP,		idle_cpu_nehalem),
+	INTEL_CPU_FAM6(NEHALEM,			idle_cpu_nehalem),
+	INTEL_CPU_FAM6(NEHALEM_G,		idle_cpu_nehalem),
+	INTEL_CPU_FAM6(WESTMERE,		idle_cpu_nehalem),
+	INTEL_CPU_FAM6(WESTMERE_EP,		idle_cpu_nehalem),
+	INTEL_CPU_FAM6(NEHALEM_EX,		idle_cpu_nehalem),
+	INTEL_CPU_FAM6(ATOM_PINEVIEW,		idle_cpu_atom),
+	INTEL_CPU_FAM6(ATOM_LINCROFT,		idle_cpu_lincroft),
+	INTEL_CPU_FAM6(WESTMERE_EX,		idle_cpu_nehalem),
+	INTEL_CPU_FAM6(SANDYBRIDGE,		idle_cpu_snb),
+	INTEL_CPU_FAM6(SANDYBRIDGE_X,		idle_cpu_snb),
+	INTEL_CPU_FAM6(ATOM_CEDARVIEW,		idle_cpu_atom),
+	INTEL_CPU_FAM6(ATOM_SILVERMONT1,	idle_cpu_byt),
+	INTEL_CPU_FAM6(ATOM_MERRIFIELD,		idle_cpu_tangier),
+	INTEL_CPU_FAM6(ATOM_AIRMONT,		idle_cpu_cht),
+	INTEL_CPU_FAM6(IVYBRIDGE,		idle_cpu_ivb),
+	INTEL_CPU_FAM6(IVYBRIDGE_X,		idle_cpu_ivt),
+	INTEL_CPU_FAM6(HASWELL_CORE,		idle_cpu_hsw),
+	INTEL_CPU_FAM6(HASWELL_X,		idle_cpu_hsw),
+	INTEL_CPU_FAM6(HASWELL_ULT,		idle_cpu_hsw),
+	INTEL_CPU_FAM6(HASWELL_GT3E,		idle_cpu_hsw),
+	INTEL_CPU_FAM6(ATOM_SILVERMONT2,	idle_cpu_avn),
+	INTEL_CPU_FAM6(BROADWELL_CORE,		idle_cpu_bdw),
+	INTEL_CPU_FAM6(BROADWELL_GT3E,		idle_cpu_bdw),
+	INTEL_CPU_FAM6(BROADWELL_X,		idle_cpu_bdw),
+	INTEL_CPU_FAM6(BROADWELL_XEON_D,	idle_cpu_bdw),
+	INTEL_CPU_FAM6(SKYLAKE_MOBILE,		idle_cpu_skl),
+	INTEL_CPU_FAM6(SKYLAKE_DESKTOP,		idle_cpu_skl),
+	INTEL_CPU_FAM6(KABYLAKE_MOBILE,		idle_cpu_skl),
+	INTEL_CPU_FAM6(KABYLAKE_DESKTOP,	idle_cpu_skl),
+	INTEL_CPU_FAM6(SKYLAKE_X,		idle_cpu_skx),
+	INTEL_CPU_FAM6(XEON_PHI_KNL,		idle_cpu_knl),
+	INTEL_CPU_FAM6(XEON_PHI_KNM,		idle_cpu_knl),
+	INTEL_CPU_FAM6(ATOM_GOLDMONT,		idle_cpu_bxt),
+	INTEL_CPU_FAM6(ATOM_GEMINI_LAKE,	idle_cpu_bxt),
+	INTEL_CPU_FAM6(ATOM_DENVERTON,		idle_cpu_dnv),
 	{}
 };