Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1417480
| From | tip-bot for Dave Hansen <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:x86/cpu] x86/intel_idle: Use Intel family macros for intel_idle |
| Date | 2016-06-08 16:20 +0200 |
| Message-ID | <rHMuS-1eQ-11@gated-at.bofh.it> (permalink) |
| References | <rFL0e-4uk-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: db73c5a8c80decbb6ddf208e58f3865b4df5384d
Gitweb: http://git.kernel.org/tip/db73c5a8c80decbb6ddf208e58f3865b4df5384d
Author: Dave Hansen <dave.hansen@linux.intel.com>
AuthorDate: Thu, 2 Jun 2016 17:19:32 -0700
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 8 Jun 2016 13:03:25 +0200
x86/intel_idle: Use Intel family macros for intel_idle
Use the new INTEL_FAM6_* macros for intel_idle.c. Also fix up
some of the macros to be consistent with how some of the
intel_idle code refers to the model.
There's on oddity here: model 0x1F is uniquely referred to here
and nowhere else that I could find. 0x1E/0x1F are just spelled
out as "Intel Core i7 and i5 Processors" in the SDM or as "Intel
processors based on the Nehalem, Westmere microarchitectures" in
the RDPMC section. Comments between tables 19-19 and 19-20 in
the SDM seem to point to 0x1F being some kind of Westmere, so
let's call it "WESTMERE2".
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: jacob.jun.pan@intel.com
Cc: linux-pm@vger.kernel.org
Link: http://lkml.kernel.org/r/20160603001932.EE978EB9@viggo.jf.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
drivers/idle/intel_idle.c | 71 ++++++++++++++++++++++++-----------------------
1 file changed, 36 insertions(+), 35 deletions(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index c966492..b5dd41d 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -62,6 +62,7 @@
#include <linux/cpu.h>
#include <linux/module.h>
#include <asm/cpu_device_id.h>
+#include <asm/intel-family.h>
#include <asm/mwait.h>
#include <asm/msr.h>
@@ -1020,38 +1021,38 @@ static const struct idle_cpu idle_cpu_bxt = {
{ X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu }
static const struct x86_cpu_id intel_idle_ids[] __initconst = {
- ICPU(0x1a, idle_cpu_nehalem),
- ICPU(0x1e, idle_cpu_nehalem),
- ICPU(0x1f, idle_cpu_nehalem),
- ICPU(0x25, idle_cpu_nehalem),
- ICPU(0x2c, idle_cpu_nehalem),
- ICPU(0x2e, idle_cpu_nehalem),
- ICPU(0x1c, idle_cpu_atom),
- ICPU(0x26, idle_cpu_lincroft),
- ICPU(0x2f, idle_cpu_nehalem),
- ICPU(0x2a, idle_cpu_snb),
- ICPU(0x2d, idle_cpu_snb),
- ICPU(0x36, idle_cpu_atom),
- ICPU(0x37, idle_cpu_byt),
- ICPU(0x4c, idle_cpu_cht),
- ICPU(0x3a, idle_cpu_ivb),
- ICPU(0x3e, idle_cpu_ivt),
- ICPU(0x3c, idle_cpu_hsw),
- ICPU(0x3f, idle_cpu_hsw),
- ICPU(0x45, idle_cpu_hsw),
- ICPU(0x46, idle_cpu_hsw),
- ICPU(0x4d, idle_cpu_avn),
- ICPU(0x3d, idle_cpu_bdw),
- ICPU(0x47, idle_cpu_bdw),
- ICPU(0x4f, idle_cpu_bdw),
- ICPU(0x56, idle_cpu_bdw),
- ICPU(0x4e, idle_cpu_skl),
- ICPU(0x5e, idle_cpu_skl),
- ICPU(0x8e, idle_cpu_skl),
- ICPU(0x9e, idle_cpu_skl),
- ICPU(0x55, idle_cpu_skx),
- ICPU(0x57, idle_cpu_knl),
- ICPU(0x5c, idle_cpu_bxt),
+ ICPU(INTEL_FAM6_NEHALEM_EP, idle_cpu_nehalem),
+ ICPU(INTEL_FAM6_NEHALEM, idle_cpu_nehalem),
+ ICPU(INTEL_FAM6_WESTMERE2, 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_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_ATOM_GOLDMONT, idle_cpu_bxt),
{}
};
MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids);
@@ -1261,13 +1262,13 @@ static void intel_idle_state_table_update(void)
{
switch (boot_cpu_data.x86_model) {
- case 0x3e: /* IVT */
+ case INTEL_FAM6_IVYBRIDGE_X:
ivt_idle_state_table_update();
break;
- case 0x5c: /* BXT */
+ case INTEL_FAM6_ATOM_GOLDMONT:
bxt_idle_state_table_update();
break;
- case 0x5e: /* SKL-H */
+ case INTEL_FAM6_SKYLAKE_DESKTOP:
sklh_idle_state_table_update();
break;
}
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers Dave Hansen <dave@sr71.net> - 2016-06-03 02:20 +0200
[PATCH 03/20] x86, rapl: use Intel family macros for rapl Dave Hansen <dave@sr71.net> - 2016-06-03 02:20 +0200
[tip:perf/core] perf/x86/rapl: Use Intel family macros for RAPL tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 13:10 +0200
[PATCH 06/20] x86, msr: add missing Intel models Dave Hansen <dave@sr71.net> - 2016-06-03 02:20 +0200
[tip:perf/core] perf/x86/msr: Add missing Intel models tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 13:10 +0200
[PATCH 04/20] x86, intel_idle: use Intel family macros for intel_idle Dave Hansen <dave@sr71.net> - 2016-06-03 02:20 +0200
[tip:x86/cpu] x86/intel_idle: Use Intel family macros for intel_idle tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 16:20 +0200
[PATCH 12/20] x86, edac: use Intel family name macros for edac driver Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[PATCH 14/20] x86, acpi, lss: use Intel family name macros for lpss driver Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:x86/cpu] x86/acpi/lss: Use Intel family name macros for the acpi_lpss driver tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 16:20 +0200
[PATCH 17/20] x86, mmc: use Intel family name macros for mmc driver Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:x86/cpu] x86, mmc: Use Intel family name macros for mmc driver tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 16:20 +0200
[PATCH 07/20] x86, intel: use Intel model macros intead of open-coding Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:x86/cpu] x86, powercap, rapl: Use Intel model macros intead of open-coding tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 16:20 +0200
[PATCH 20/20] x86, powercap, rapl: add Skylake Server model number Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:x86/cpu] x86, powercap, rapl: Add Skylake Server model number tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 16:20 +0200
[PATCH 11/20] x86, uncore: use Intel family name macros for uncore Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:perf/core] perf/x86/uncore: Use Intel family name macros for uncore tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 13:10 +0200
[PATCH 02/20] x86, perf: use Intel family macros for core perf events Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:perf/core] perf/x86/intel: Use Intel family macros for core perf events tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 13:10 +0200
Re: [tip:perf/core] perf/x86/intel: Use Intel family macros for core perf events Vince Weaver <vincent.weaver@maine.edu> - 2016-06-08 16:10 +0200
Re: [tip:perf/core] perf/x86/intel: Use Intel family macros for core perf events Borislav Petkov <bp@alien8.de> - 2016-06-08 16:20 +0200
Re: [tip:perf/core] perf/x86/intel: Use Intel family macros for core perf events Ingo Molnar <mingo@kernel.org> - 2016-06-08 18:30 +0200
Re: [tip:perf/core] perf/x86/intel: Use Intel family macros for core perf events Borislav Petkov <bp@alien8.de> - 2016-06-08 18:40 +0200
Re: [tip:perf/core] perf/x86/intel: Use Intel family macros for core perf events Stephane Eranian <eranian@google.com> - 2016-06-08 22:00 +0200
Re: [tip:perf/core] perf/x86/intel: Use Intel family macros for core perf events Vince Weaver <vincent.weaver@maine.edu> - 2016-06-08 22:20 +0200
Re: [tip:perf/core] perf/x86/intel: Use Intel family macros for core perf events Borislav Petkov <bp@alien8.de> - 2016-06-08 22:50 +0200
[PATCH 08/20] x86, rapl: reorder cpu detection table Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:x86/cpu] x86, powercap, rapl: Reorder CPU detection table tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 16:20 +0200
[PATCH 05/20] x86, msr: use Intel family macros for msr events code Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:perf/core] perf/x86/msr: Use Intel family macros for MSR events code tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 13:10 +0200
[PATCH 10/20] x86, cstate: use Intel Model name macros Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:perf/core] perf/x86/cstate: Use Intel Model name macros tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 13:10 +0200
[PATCH 09/20] x86, platform: use new Intel model number macros Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:x86/cpu] x86/platform: Use new Intel model number macros tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 16:20 +0200
[PATCH 13/20] x86, cpufreq: use Intel family name macros for intel_pstate cpufreq driver Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:x86/cpu] x86/cpufreq: Use Intel family name macros for the intel_pstate cpufreq driver tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 16:20 +0200
[PATCH 16/20] x86, pmc_core: use Intel family name macros for pmc_core driver Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:perf/core] x86/pmc_core: Use Intel family name macros for pmc_core driver tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 16:20 +0200
[PATCH 19/20] x86, rapl: add Skylake server model detection Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:perf/core] perf/x86/rapl: Add Skylake server model detection tip-bot for Jacob Pan <tipbot@zytor.com> - 2016-06-08 13:10 +0200
Re: [tip:perf/core] perf/x86/rapl: Add Skylake server model detection Vince Weaver <vincent.weaver@maine.edu> - 2016-06-08 16:20 +0200
Re: [tip:perf/core] perf/x86/rapl: Add Skylake server model detection Jacob Pan <jacob.jun.pan@linux.intel.com> - 2016-06-10 14:40 +0200
Re: [tip:perf/core] perf/x86/rapl: Add Skylake server model detection Dave Hansen <dave@sr71.net> - 2016-06-10 17:50 +0200
[PATCH 18/20] x86, thermal: clean up and fix cpu model detection for intel_soc_dts_thermal Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:x86/cpu] x86, thermal: Clean up and fix CPU model detection for intel_soc_dts_thermal tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 16:20 +0200
[PATCH 15/20] x86, intel_telemetry: use Intel family name macros for telemetry driver Dave Hansen <dave@sr71.net> - 2016-06-03 02:30 +0200
[tip:x86/cpu] x86/intel_telemetry: Use Intel family name macros for telemetry driver tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 16:20 +0200
Re: [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-06-03 02:40 +0200
[tip:x86/urgent] x86/cpu/intel: Introduce macros for Intel family numbers tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 12:00 +0200
[tip:x86/urgent] x86/cpu/intel: Introduce macros for Intel family numbers tip-bot for Dave Hansen <tipbot@zytor.com> - 2016-06-08 12:10 +0200
Re: [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers Ingo Molnar <mingo@kernel.org> - 2016-06-08 13:10 +0200
csiph-web