linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers
@ 2016-06-03  0:19 Dave Hansen
  2016-06-03  0:19 ` [PATCH 02/20] x86, perf: use Intel family macros for core perf events Dave Hansen
                   ` (22 more replies)
  0 siblings, 23 replies; 54+ messages in thread
From: Dave Hansen @ 2016-06-03  0:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: x86, jacob.jun.pan, Dave Hansen, dave.hansen, adrian.hunter, ak,
	luto, bp, dvhart, dougthompson, edubezval, hpa, mingo,
	jacob.jun.pan, kan.liang, lenb, linux-acpi, linux-edac,
	linux-mmc, linux-pm, mchehab, peterz, platform-driver-x86,
	rafael.j.wysocki, rajneesh.bhardwaj, souvik.k.chakravarty,
	srinivas.pandruvada, eranian, tglx, tony.luck, ulf.hansson,
	viresh.kumar, vishwanath.somayaji, rui.zhang


Changes from v1:
 * added acks from a few folks
 * Took the redundant "MODEL_" out of the macro names (Suggested
   by Borislav Petkov and acked by others)

From: Dave Hansen <dave.hansen@linux.intel.com>

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.

Also, rather than trickling these in via all the various
maintainers, should these just get pulled in to the x86 tree in
one go?

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.

These have all been compile-tested.  I also made a stab at
dumping .o files and looking for unexpected deltas when I was
just replacing magic numbers with equivalent macros.

World-record-attempt at cc list length follows.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Doug Thompson <dougthompson@xmission.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Cc: linux-edac@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: platform-driver-x86@vger.kernel.org
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Cc: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Vishwanath Somayaji <vishwanath.somayaji@intel.com>
Cc: Zhang Rui <rui.zhang@intel.com>
---

 b/arch/x86/include/asm/intel-family.h |   62 ++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff -puN /dev/null arch/x86/include/asm/intel-family.h
--- /dev/null	2016-04-04 09:40:43.435149254 -0700
+++ b/arch/x86/include/asm/intel-family.h	2016-06-02 17:17:24.254885108 -0700
@@ -0,0 +1,62 @@
+#ifndef _ASM_X86_INTEL_FAMILY_H
+#define _ASM_X86_INTEL_FAMILY_H
+
+/*
+ * "Big Core" Processors (Branded as Core, Xeon, etc...)
+ *
+ * The "_X" parts are generally the EP and EX Xeons, or the
+ * "Extreme" ones, like Broadwell-E.
+ */
+
+#define INTEL_FAM6_CORE_YONAH		0x0E
+#define INTEL_FAM6_CORE2_MEROM		0x0F
+#define INTEL_FAM6_CORE2_MEROM_L	0x16
+#define INTEL_FAM6_CORE2_PENRYN		0x17
+#define INTEL_FAM6_CORE2_DUNNINGTON	0x1D
+
+#define INTEL_FAM6_NEHALEM		0x1E
+#define INTEL_FAM6_NEHALEM_EP		0x1A
+#define INTEL_FAM6_NEHALEM_EX		0x2E
+#define INTEL_FAM6_WESTMERE		0x25
+#define INTEL_FAM6_WESTMERE_EP		0x2C
+#define INTEL_FAM6_WESTMERE_EX		0x2F
+
+#define INTEL_FAM6_SANDYBRIDGE		0x2A
+#define INTEL_FAM6_SANDYBRIDGE_X	0x2D
+#define INTEL_FAM6_IVYBRIDGE		0x3A
+#define INTEL_FAM6_IVYBRIDGE_X		0x3E
+
+#define INTEL_FAM6_HASWELL_CORE		0x3C
+#define INTEL_FAM6_HASWELL_X		0x3F
+#define INTEL_FAM6_HASWELL_ULT		0x45
+#define INTEL_FAM6_HASWELL_GT3E		0x46
+
+#define INTEL_FAM6_BROADWELL_CORE	0x3D
+#define INTEL_FAM6_BROADWELL_XEON_D	0x56
+#define INTEL_FAM6_BROADWELL_GT3E	0x47
+#define INTEL_FAM6_BROADWELL_X		0x4F
+
+#define INTEL_FAM6_SKYLAKE_MOBILE	0x4E
+#define INTEL_FAM6_SKYLAKE_DESKTOP	0x5E
+#define INTEL_FAM6_SKYLAKE_X		0x55
+#define INTEL_FAM6_KABYLAKE_MOBILE	0x8E
+#define INTEL_FAM6_KABYLAKE_DESKTOP	0x9E
+
+/* "Small Core" Processors (Atom) */
+
+#define INTEL_FAM6_ATOM_PINEVIEW	0x1C
+#define INTEL_FAM6_ATOM_LINCROFT	0x26
+#define INTEL_FAM6_ATOM_PENWELL		0x27
+#define INTEL_FAM6_ATOM_CLOVERVIEW	0x35
+#define INTEL_FAM6_ATOM_CEDARVIEW	0x36
+#define INTEL_FAM6_ATOM_SILVERMONT1	0x37
+#define INTEL_FAM6_ATOM_SILVERMONT2	0x4D /* Avaton/Rangely */
+#define INTEL_FAM6_ATOM_AIRMONT		0x4C
+#define INTEL_FAM6_ATOM_GOLDMONT	0x5C
+#define INTEL_FAM6_ATOM_DENVERTON	0x5F /* Goldmont Microserver */
+
+/* Xeon Phi */
+
+#define INTEL_FAM6_XEON_PHI_KNL		0x57 /* Knights Landing */
+
+#endif /* _ASM_X86_INTEL_FAMILY_H */
_

^ permalink raw reply	[flat|nested] 54+ messages in thread
* [PATCH 01/20] x86, intel: Introduce macros for Intel family numbers
@ 2016-06-02  0:11 Dave Hansen
  2016-06-02  0:12 ` [PATCH 06/20] x86, msr: add missing Intel models Dave Hansen
  0 siblings, 1 reply; 54+ messages in thread
From: Dave Hansen @ 2016-06-02  0:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: x86, Dave Hansen, dave.hansen, adrian.hunter, ak, luto, bp,
	dvhart, dougthompson, edubezval, hpa, mingo, jacob.jun.pan,
	kan.liang, lenb, linux-acpi, linux-edac, linux-mmc, linux-pm,
	mchehab, peterz, platform-driver-x86, rafael.j.wysocki,
	rajneesh.bhardwaj, souvik.k.chakravarty, srinivas.pandruvada,
	eranian, tglx, tony.luck, ulf.hansson, viresh.kumar,
	vishwanath.somayaji, zheng.z.yan, rui.zhang


From: Dave Hansen <dave.hansen@linux.intel.com>

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@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Doug Thompson <dougthompson@xmission.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Cc: linux-edac@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: platform-driver-x86@vger.kernel.org
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Cc: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Vishwanath Somayaji <vishwanath.somayaji@intel.com>
Cc: Yan, Zheng <zheng.z.yan@intel.com>
Cc: Zhang Rui <rui.zhang@intel.com>

---

 b/arch/x86/include/asm/intel-family.h |   57 ++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff -puN /dev/null arch/x86/include/asm/intel-family.h
--- /dev/null	2016-04-04 09:40:43.435149254 -0700
+++ b/arch/x86/include/asm/intel-family.h	2016-06-01 15:45:02.877884645 -0700
@@ -0,0 +1,57 @@
+#ifndef _ASM_X86_INTEL_FAMILY_H
+#define _ASM_X86_INTEL_FAMILY_H
+
+/*
+ * "Big Core" Processors (Branded as Core, Xeon, etc...)
+ *
+ * The "_X" parts are generally the EP and EX Xeons, or the
+ * "Extreme" ones, like Broadwell-E.
+ */
+
+#define INTEL_FAM6_MODEL_CORE_YONAH		0x0E
+#define INTEL_FAM6_MODEL_CORE2_MEROM		0x0F
+#define INTEL_FAM6_MODEL_CORE2_MEROM_L		0x16
+#define INTEL_FAM6_MODEL_CORE2_PENRYN		0x17
+#define INTEL_FAM6_MODEL_CORE2_DUNNINGTON	0x1D
+#define INTEL_FAM6_MODEL_NEHALEM		0x1E
+#define INTEL_FAM6_MODEL_NEHALEM_EP		0x1A
+#define INTEL_FAM6_MODEL_NEHALEM_EX		0x2E
+#define INTEL_FAM6_MODEL_WESTMERE		0x25
+#define INTEL_FAM6_MODEL_WESTMERE_EP		0x2C
+#define INTEL_FAM6_MODEL_WESTMERE_EX		0x2F
+#define INTEL_FAM6_MODEL_SANDYBRIDGE		0x2A
+#define INTEL_FAM6_MODEL_SANDYBRIDGE_X		0x2D
+#define INTEL_FAM6_MODEL_IVYBRIDGE		0x3A
+#define INTEL_FAM6_MODEL_IVYBRIDGE_X		0x3E
+#define INTEL_FAM6_MODEL_HASWELL_CORE		0x3C
+#define INTEL_FAM6_MODEL_HASWELL_X		0x3F
+#define INTEL_FAM6_MODEL_HASWELL_ULT		0x45
+#define INTEL_FAM6_MODEL_HASWELL_GT3E		0x46
+#define INTEL_FAM6_MODEL_BROADWELL_CORE_M	0x3D
+#define INTEL_FAM6_MODEL_BROADWELL_XEON_D	0x56
+#define INTEL_FAM6_MODEL_BROADWELL_GT3E		0x47
+#define INTEL_FAM6_MODEL_BROADWELL_X		0x4F
+#define INTEL_FAM6_MODEL_SKYLAKE_MOBILE		0x4E
+#define INTEL_FAM6_MODEL_SKYLAKE_DESKTOP	0x5E
+#define INTEL_FAM6_MODEL_SKYLAKE_X		0x55
+#define INTEL_FAM6_MODEL_KABYLAKE_MOBILE	0x8E
+#define INTEL_FAM6_MODEL_KABYLAKE_DESKTOP	0x9E
+
+/* "Small Core" Processors (Atom) */
+
+#define INTEL_FAM6_MODEL_ATOM_PINEVIEW		0x1C
+#define INTEL_FAM6_MODEL_ATOM_LINCROFT		0x26
+#define INTEL_FAM6_MODEL_ATOM_PENWELL		0x27
+#define INTEL_FAM6_MODEL_ATOM_CLOVERVIEW	0x35
+#define INTEL_FAM6_MODEL_ATOM_CEDARVIEW		0x36
+#define INTEL_FAM6_MODEL_ATOM_SILVERMONT1	0x37
+#define INTEL_FAM6_MODEL_ATOM_SILVERMONT2	0x4D /* Avaton/Rangely */
+#define INTEL_FAM6_MODEL_ATOM_AIRMONT		0x4C
+#define INTEL_FAM6_MODEL_ATOM_GOLDMONT		0x5C
+#define INTEL_FAM6_MODEL_ATOM_DENVERTON		0x5F /* Goldmont Microserver */
+
+/* Xeon Phi */
+
+#define INTEL_FAM6_MODEL_XEON_PHI_KNL		0x57 /* Knights Landing */
+
+#endif /* _ASM_X86_INTEL_FAMILY_H */
_

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2016-06-17  2:39 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-03  0:19 [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers Dave Hansen
2016-06-03  0:19 ` [PATCH 02/20] x86, perf: use Intel family macros for core perf events Dave Hansen
2016-06-08 11:00   ` [tip:perf/core] perf/x86/intel: Use " tip-bot for Dave Hansen
2016-06-08 14:09     ` Vince Weaver
2016-06-08 14:16       ` Borislav Petkov
2016-06-08 16:25       ` Ingo Molnar
2016-06-08 16:34         ` Borislav Petkov
2016-06-08 19:51           ` Stephane Eranian
2016-06-08 20:15           ` Vince Weaver
2016-06-08 20:48             ` Borislav Petkov
2016-06-03  0:19 ` [PATCH 03/20] x86, rapl: use Intel family macros for rapl Dave Hansen
2016-06-08 11:01   ` [tip:perf/core] perf/x86/rapl: Use Intel family macros for RAPL tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 04/20] x86, intel_idle: use Intel family macros for intel_idle Dave Hansen
2016-06-08 14:14   ` [tip:x86/cpu] x86/intel_idle: Use " tip-bot for Dave Hansen
2016-06-17  2:39   ` [PATCH 04/20] x86, intel_idle: use " Len Brown
2016-06-03  0:19 ` [PATCH 05/20] x86, msr: use Intel family macros for msr events code Dave Hansen
2016-06-08 11:01   ` [tip:perf/core] perf/x86/msr: Use Intel family macros for MSR " tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 06/20] x86, msr: add missing Intel models Dave Hansen
2016-06-08 11:02   ` [tip:perf/core] perf/x86/msr: Add " tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 07/20] x86, intel: use Intel model macros intead of open-coding Dave Hansen
2016-06-08 14:13   ` [tip:x86/cpu] x86, powercap, rapl: Use " tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 08/20] x86, rapl: reorder cpu detection table Dave Hansen
2016-06-08 14:13   ` [tip:x86/cpu] x86, powercap, rapl: Reorder CPU " tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 09/20] x86, platform: use new Intel model number macros Dave Hansen
2016-06-08 14:15   ` [tip:x86/cpu] x86/platform: Use " tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 10/20] x86, cstate: use Intel Model name macros Dave Hansen
2016-06-08 11:02   ` [tip:perf/core] perf/x86/cstate: Use " tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 11/20] x86, uncore: use Intel family name macros for uncore Dave Hansen
2016-06-08 11:03   ` [tip:perf/core] perf/x86/uncore: Use " tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 12/20] x86, edac: use Intel family name macros for edac driver Dave Hansen
2016-06-03  0:19 ` [PATCH 13/20] x86, cpufreq: use Intel family name macros for intel_pstate cpufreq driver Dave Hansen
2016-06-08 14:15   ` [tip:x86/cpu] x86/cpufreq: Use Intel family name macros for the " tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 14/20] x86, acpi, lss: use Intel family name macros for lpss driver Dave Hansen
2016-06-08 14:16   ` [tip:x86/cpu] x86/acpi/lss: Use Intel family name macros for the acpi_lpss driver tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 15/20] x86, intel_telemetry: use Intel family name macros for telemetry driver Dave Hansen
2016-06-08 14:16   ` [tip:x86/cpu] x86/intel_telemetry: Use " tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 16/20] x86, pmc_core: use Intel family name macros for pmc_core driver Dave Hansen
2016-06-08 14:12   ` [tip:perf/core] x86/pmc_core: Use " tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 17/20] x86, mmc: use Intel family name macros for mmc driver Dave Hansen
2016-06-08 14:16   ` [tip:x86/cpu] x86, mmc: Use " tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 18/20] x86, thermal: clean up and fix cpu model detection for intel_soc_dts_thermal Dave Hansen
2016-06-08 14:17   ` [tip:x86/cpu] x86, thermal: Clean up and fix CPU " tip-bot for Dave Hansen
2016-06-03  0:19 ` [PATCH 19/20] x86, rapl: add Skylake server model detection Dave Hansen
2016-06-08 11:03   ` [tip:perf/core] perf/x86/rapl: Add " tip-bot for Jacob Pan
2016-06-08 14:12     ` Vince Weaver
2016-06-10 12:35       ` Jacob Pan
2016-06-10 15:46         ` Dave Hansen
2016-06-03  0:19 ` [PATCH 20/20] x86, powercap, rapl: add Skylake Server model number Dave Hansen
2016-06-08 14:14   ` [tip:x86/cpu] x86, powercap, rapl: Add " tip-bot for Dave Hansen
2016-06-03  0:38 ` [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers Rafael J. Wysocki
2016-06-08  9:56 ` [tip:x86/urgent] x86/cpu/intel: " tip-bot for Dave Hansen
2016-06-08 10:03 ` tip-bot for Dave Hansen
2016-06-08 11:01 ` [PATCH 01/20] [v2] x86, intel: " Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2016-06-02  0:11 [PATCH 01/20] " Dave Hansen
2016-06-02  0:12 ` [PATCH 06/20] x86, msr: add missing Intel models Dave Hansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).