Resending patches related to KNM CPU ID in one patchset for
more convenient pick up.
This series of patches enables support for Knights Mill (KNM).
First two patches improve code style by replacing raw numbers
of CPUID with descriptive macros of processor names.
The third one introduces KNM CPU ID to Intel family.
The other patches add KNM CPU ID to several modules and depend on
the third one. Because KNM is closely related to Knights Landing (KNL)
it reuses KNL code.
The turbostat patch (tools/power turbostat: Use Intel family processor
macros) comes in v2 with fixed compilation (missed including of
intel-family.h).
Regards,
Piotr
Piotr Luc (11):
EDAC, sb_edac: Use Intel family processor macros
tools/power turbostat: Use Intel family processor macros
x86/cpu/intel: Add Knights Mill to Intel family
x86/intel_idle: Add Knights Mill CPUID
EDAC, sb_edac: Add Knights Mill CPUID
cpufreq: intel_pstate: Add Knights Mill CPUID
perf/x86/intel: Add Knights Mill CPUID
perf/x86/intel/rapl: Add Knights Mill CPUID
perf/x86/intel/uncore: Add Knights Mill CPUID
powercap / RAPL: Add Knights Mill CPUID
tools/power turbostat: enable turbostat to support Knights Mill (KNM)
arch/x86/events/intel/core.c | 3 +-
arch/x86/events/intel/rapl.c | 1 +
arch/x86/events/intel/uncore.c | 1 +
arch/x86/include/asm/intel-family.h | 1 +
drivers/cpufreq/intel_pstate.c | 1 +
drivers/edac/sb_edac.c | 14 +-
drivers/idle/intel_idle.c | 1 +
drivers/powercap/intel_rapl.c | 1 +
tools/power/x86/turbostat/Makefile | 3 +-
tools/power/x86/turbostat/turbostat.c | 250 ++++++++++++++++++----------------
10 files changed, 147 insertions(+), 129 deletions(-)
--
2.10.1
Use macros of Intel processor families instead of raw numbers.
Signed-off-by: Piotr Luc <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Doug Thompson <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: "Luck, Tony" <[email protected]>
Cc: "Shevchenko, Andriy" <[email protected]>
---
drivers/edac/sb_edac.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index ce0067b..90564bc 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -23,6 +23,7 @@
#include <linux/math64.h>
#include <linux/mod_devicetable.h>
#include <asm/cpu_device_id.h>
+#include <asm/intel-family.h>
#include <asm/processor.h>
#include <asm/mce.h>
@@ -3366,12 +3367,12 @@ fail0:
{ X86_VENDOR_INTEL, 6, model, 0, (unsigned long)&table }
static const struct x86_cpu_id sbridge_cpuids[] = {
- ICPU(0x2d, pci_dev_descr_sbridge_table), /* SANDY_BRIDGE */
- ICPU(0x3e, pci_dev_descr_ibridge_table), /* IVY_BRIDGE */
- ICPU(0x3f, pci_dev_descr_haswell_table), /* HASWELL */
- ICPU(0x4f, pci_dev_descr_broadwell_table), /* BROADWELL */
- ICPU(0x56, pci_dev_descr_broadwell_table), /* BROADWELL-DE */
- ICPU(0x57, pci_dev_descr_knl_table), /* KNIGHTS_LANDING */
+ ICPU(INTEL_FAM6_SANDYBRIDGE_X, pci_dev_descr_sbridge_table),
+ ICPU(INTEL_FAM6_IVYBRIDGE_X, pci_dev_descr_ibridge_table),
+ ICPU(INTEL_FAM6_HASWELL_X, pci_dev_descr_haswell_table),
+ ICPU(INTEL_FAM6_BROADWELL_X, pci_dev_descr_broadwell_table),
+ ICPU(INTEL_FAM6_BROADWELL_XEON_D, pci_dev_descr_broadwell_table),
+ ICPU(INTEL_FAM6_XEON_PHI_KNL, pci_dev_descr_knl_table),
{ }
};
MODULE_DEVICE_TABLE(x86cpu, sbridge_cpuids);
--
2.10.1
Add CPUID of Knights Mill (KNM) processor to Intel family list.
Signed-off-by: Piotr Luc <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
arch/x86/include/asm/intel-family.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/include/asm/intel-family.h b/arch/x86/include/asm/intel-family.h
index 6277194..ba7d8d8 100644
--- a/arch/x86/include/asm/intel-family.h
+++ b/arch/x86/include/asm/intel-family.h
@@ -64,5 +64,6 @@
/* Xeon Phi */
#define INTEL_FAM6_XEON_PHI_KNL 0x57 /* Knights Landing */
+#define INTEL_FAM6_XEON_PHI_KNM 0x85 /* Knights Mill */
#endif /* _ASM_X86_INTEL_FAMILY_H */
--
2.10.1
Use macros of Intel processor families instead of raw numbers.
Signed-off-by: Piotr Luc <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Cc: [email protected]
---
v2: Include Intel family header.
tools/power/x86/turbostat/Makefile | 3 +-
tools/power/x86/turbostat/turbostat.c | 243 +++++++++++++++++-----------------
2 files changed, 124 insertions(+), 122 deletions(-)
diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile
index 8561e7d..20631f6 100644
--- a/tools/power/x86/turbostat/Makefile
+++ b/tools/power/x86/turbostat/Makefile
@@ -9,7 +9,8 @@ endif
turbostat : turbostat.c
CFLAGS += -Wall
-CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
+CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"' \
+ -DFAMILYHEADER='"../../../../arch/x86/include/asm/intel-family.h"'
%: %.c
@mkdir -p $(BUILD_OUTPUT)
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 3e199b5..09a542cc 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -21,6 +21,7 @@
#define _GNU_SOURCE
#include MSRHEADER
+#include FAMILYHEADER
#include <stdarg.h>
#include <stdio.h>
#include <err.h>
@@ -2174,47 +2175,47 @@ int probe_nhm_msrs(unsigned int family, unsigned int model)
bclk = discover_bclk(family, model);
switch (model) {
- case 0x1A: /* Core i7, Xeon 5500 series - Bloomfield, Gainstown NHM-EP */
- case 0x1E: /* Core i7 and i5 Processor - Clarksfield, Lynnfield, Jasper Forest */
- case 0x1F: /* Core i7 and i5 Processor - Nehalem */
- case 0x25: /* Westmere Client - Clarkdale, Arrandale */
- case 0x2C: /* Westmere EP - Gulftown */
- case 0x2E: /* Nehalem-EX Xeon - Beckton */
- case 0x2F: /* Westmere-EX Xeon - Eagleton */
+ case INTEL_FAM6_NEHALEM_EP: /* Core i7, Xeon 5500 series - Bloomfield, Gainstown NHM-EP */
+ case INTEL_FAM6_NEHALEM: /* Core i7 and i5 Processor - Clarksfield, Lynnfield, Jasper Forest */
+ case INTEL_FAM6_NEHALEM_G: /* Core i7 and i5 Processor - Nehalem */
+ case INTEL_FAM6_WESTMERE: /* Westmere Client - Clarkdale, Arrandale */
+ case INTEL_FAM6_WESTMERE_EP: /* Westmere EP - Gulftown */
+ case INTEL_FAM6_NEHALEM_EX: /* Nehalem-EX Xeon - Beckton */
+ case INTEL_FAM6_WESTMERE_EX: /* Westmere-EX Xeon - Eagleton */
pkg_cstate_limits = nhm_pkg_cstate_limits;
break;
- case 0x2A: /* SNB */
- case 0x2D: /* SNB Xeon */
- case 0x3A: /* IVB */
- case 0x3E: /* IVB Xeon */
+ case INTEL_FAM6_SANDYBRIDGE: /* SNB */
+ case INTEL_FAM6_SANDYBRIDGE_X: /* SNB Xeon */
+ case INTEL_FAM6_IVYBRIDGE: /* IVB */
+ case INTEL_FAM6_IVYBRIDGE_X: /* IVB Xeon */
pkg_cstate_limits = snb_pkg_cstate_limits;
break;
- case 0x3C: /* HSW */
- case 0x3F: /* HSX */
- case 0x45: /* HSW */
- case 0x46: /* HSW */
- case 0x3D: /* BDW */
- case 0x47: /* BDW */
- case 0x4F: /* BDX */
- case 0x56: /* BDX-DE */
- case 0x4E: /* SKL */
- case 0x5E: /* SKL */
- case 0x8E: /* KBL */
- case 0x9E: /* KBL */
- case 0x55: /* SKX */
+ case INTEL_FAM6_HASWELL_CORE: /* HSW */
+ case INTEL_FAM6_HASWELL_X: /* HSX */
+ case INTEL_FAM6_HASWELL_ULT: /* HSW */
+ case INTEL_FAM6_HASWELL_GT3E: /* HSW */
+ case INTEL_FAM6_BROADWELL_CORE: /* BDW */
+ case INTEL_FAM6_BROADWELL_GT3E: /* BDW */
+ case INTEL_FAM6_BROADWELL_X: /* BDX */
+ case INTEL_FAM6_BROADWELL_XEON_D: /* BDX-DE */
+ case INTEL_FAM6_SKYLAKE_MOBILE: /* SKL */
+ case INTEL_FAM6_SKYLAKE_DESKTOP: /* SKL */
+ case INTEL_FAM6_KABYLAKE_MOBILE: /* KBL */
+ case INTEL_FAM6_KABYLAKE_DESKTOP: /* KBL */
+ case INTEL_FAM6_SKYLAKE_X: /* SKX */
pkg_cstate_limits = hsw_pkg_cstate_limits;
break;
- case 0x37: /* BYT */
- case 0x4D: /* AVN */
+ case INTEL_FAM6_ATOM_SILVERMONT1: /* BYT */
+ case INTEL_FAM6_ATOM_SILVERMONT2: /* AVN */
pkg_cstate_limits = slv_pkg_cstate_limits;
break;
- case 0x4C: /* AMT */
+ case INTEL_FAM6_ATOM_AIRMONT: /* AMT */
pkg_cstate_limits = amt_pkg_cstate_limits;
break;
- case 0x57: /* PHI */
+ case INTEL_FAM6_XEON_PHI_KNL: /* PHI */
pkg_cstate_limits = phi_pkg_cstate_limits;
break;
- case 0x5C: /* BXT */
+ case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */
pkg_cstate_limits = bxt_pkg_cstate_limits;
break;
default:
@@ -2234,9 +2235,9 @@ int has_nhm_turbo_ratio_limit(unsigned int family, unsigned int model)
{
switch (model) {
/* Nehalem compatible, but do not include turbo-ratio limit support */
- case 0x2E: /* Nehalem-EX Xeon - Beckton */
- case 0x2F: /* Westmere-EX Xeon - Eagleton */
- case 0x57: /* PHI - Knights Landing (different MSR definition) */
+ case INTEL_FAM6_NEHALEM_EX: /* Nehalem-EX Xeon - Beckton */
+ case INTEL_FAM6_WESTMERE_EX: /* Westmere-EX Xeon - Eagleton */
+ case INTEL_FAM6_XEON_PHI_KNL: /* PHI - Knights Landing (different MSR definition) */
return 0;
default:
return 1;
@@ -2251,8 +2252,8 @@ int has_ivt_turbo_ratio_limit(unsigned int family, unsigned int model)
return 0;
switch (model) {
- case 0x3E: /* IVB Xeon */
- case 0x3F: /* HSW Xeon */
+ case INTEL_FAM6_IVYBRIDGE_X: /* IVB Xeon */
+ case INTEL_FAM6_HASWELL_X: /* HSW Xeon */
return 1;
default:
return 0;
@@ -2267,7 +2268,7 @@ int has_hsw_turbo_ratio_limit(unsigned int family, unsigned int model)
return 0;
switch (model) {
- case 0x3F: /* HSW Xeon */
+ case INTEL_FAM6_HASWELL_X: /* HSW Xeon */
return 1;
default:
return 0;
@@ -2283,7 +2284,7 @@ int has_knl_turbo_ratio_limit(unsigned int family, unsigned int model)
return 0;
switch (model) {
- case 0x57: /* Knights Landing */
+ case INTEL_FAM6_XEON_PHI_KNL: /* Knights Landing */
return 1;
default:
return 0;
@@ -2298,22 +2299,22 @@ int has_config_tdp(unsigned int family, unsigned int model)
return 0;
switch (model) {
- case 0x3A: /* IVB */
- case 0x3C: /* HSW */
- case 0x3F: /* HSX */
- case 0x45: /* HSW */
- case 0x46: /* HSW */
- case 0x3D: /* BDW */
- case 0x47: /* BDW */
- case 0x4F: /* BDX */
- case 0x56: /* BDX-DE */
- case 0x4E: /* SKL */
- case 0x5E: /* SKL */
- case 0x8E: /* KBL */
- case 0x9E: /* KBL */
- case 0x55: /* SKX */
-
- case 0x57: /* Knights Landing */
+ case INTEL_FAM6_IVYBRIDGE: /* IVB */
+ case INTEL_FAM6_HASWELL_CORE: /* HSW */
+ case INTEL_FAM6_HASWELL_X: /* HSX */
+ case INTEL_FAM6_HASWELL_ULT: /* HSW */
+ case INTEL_FAM6_HASWELL_GT3E: /* HSW */
+ case INTEL_FAM6_BROADWELL_CORE: /* BDW */
+ case INTEL_FAM6_BROADWELL_GT3E: /* BDW */
+ case INTEL_FAM6_BROADWELL_X: /* BDX */
+ case INTEL_FAM6_BROADWELL_XEON_D: /* BDX-DE */
+ case INTEL_FAM6_SKYLAKE_MOBILE: /* SKL */
+ case INTEL_FAM6_SKYLAKE_DESKTOP: /* SKL */
+ case INTEL_FAM6_KABYLAKE_MOBILE: /* KBL */
+ case INTEL_FAM6_KABYLAKE_DESKTOP: /* KBL */
+ case INTEL_FAM6_SKYLAKE_X: /* SKX */
+
+ case INTEL_FAM6_XEON_PHI_KNL: /* Knights Landing */
return 1;
default:
return 0;
@@ -2593,8 +2594,8 @@ double get_tdp(unsigned int model)
return ((msr >> 0) & RAPL_POWER_GRANULARITY) * rapl_power_units;
switch (model) {
- case 0x37:
- case 0x4D:
+ case INTEL_FAM6_ATOM_SILVERMONT1:
+ case INTEL_FAM6_ATOM_SILVERMONT2:
return 30.0;
default:
return 135.0;
@@ -2611,10 +2612,10 @@ rapl_dram_energy_units_probe(int model, double rapl_energy_units)
/* only called for genuine_intel, family 6 */
switch (model) {
- case 0x3F: /* HSX */
- case 0x4F: /* BDX */
- case 0x56: /* BDX-DE */
- case 0x57: /* KNL */
+ case INTEL_FAM6_HASWELL_X: /* HSX */
+ case INTEL_FAM6_BROADWELL_X: /* BDX */
+ case INTEL_FAM6_BROADWELL_XEON_D: /* BDX-DE */
+ case INTEL_FAM6_XEON_PHI_KNL: /* KNL */
return (rapl_dram_energy_units = 15.3 / 1000000);
default:
return (rapl_energy_units);
@@ -2640,37 +2641,37 @@ void rapl_probe(unsigned int family, unsigned int model)
return;
switch (model) {
- case 0x2A:
- case 0x3A:
- case 0x3C: /* HSW */
- case 0x45: /* HSW */
- case 0x46: /* HSW */
- case 0x3D: /* BDW */
- case 0x47: /* BDW */
+ case INTEL_FAM6_SANDYBRIDGE:
+ case INTEL_FAM6_IVYBRIDGE:
+ case INTEL_FAM6_HASWELL_CORE: /* HSW */
+ case INTEL_FAM6_HASWELL_ULT: /* HSW */
+ case INTEL_FAM6_HASWELL_GT3E: /* HSW */
+ case INTEL_FAM6_BROADWELL_CORE: /* BDW */
+ case INTEL_FAM6_BROADWELL_GT3E: /* BDW */
do_rapl = RAPL_PKG | RAPL_CORES | RAPL_CORE_POLICY | RAPL_GFX | RAPL_PKG_POWER_INFO;
break;
- case 0x5C: /* BXT */
+ case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */
do_rapl = RAPL_PKG | RAPL_PKG_POWER_INFO;
break;
- case 0x4E: /* SKL */
- case 0x5E: /* SKL */
- case 0x8E: /* KBL */
- case 0x9E: /* KBL */
+ case INTEL_FAM6_SKYLAKE_MOBILE: /* SKL */
+ case INTEL_FAM6_SKYLAKE_DESKTOP: /* SKL */
+ case INTEL_FAM6_KABYLAKE_MOBILE: /* KBL */
+ case INTEL_FAM6_KABYLAKE_DESKTOP: /* KBL */
do_rapl = RAPL_PKG | RAPL_DRAM | RAPL_DRAM_PERF_STATUS | RAPL_PKG_PERF_STATUS | RAPL_PKG_POWER_INFO;
break;
- case 0x3F: /* HSX */
- case 0x4F: /* BDX */
- case 0x56: /* BDX-DE */
- case 0x55: /* SKX */
- case 0x57: /* KNL */
+ case INTEL_FAM6_HASWELL_X: /* HSX */
+ case INTEL_FAM6_BROADWELL_X: /* BDX */
+ case INTEL_FAM6_BROADWELL_XEON_D: /* BDX-DE */
+ case INTEL_FAM6_SKYLAKE_X: /* SKX */
+ case INTEL_FAM6_XEON_PHI_KNL: /* KNL */
do_rapl = RAPL_PKG | RAPL_DRAM | RAPL_DRAM_POWER_INFO | RAPL_DRAM_PERF_STATUS | RAPL_PKG_PERF_STATUS | RAPL_PKG_POWER_INFO;
break;
- case 0x2D:
- case 0x3E:
+ case INTEL_FAM6_SANDYBRIDGE_X:
+ case INTEL_FAM6_IVYBRIDGE_X:
do_rapl = RAPL_PKG | RAPL_CORES | RAPL_CORE_POLICY | RAPL_DRAM | RAPL_DRAM_POWER_INFO | RAPL_PKG_PERF_STATUS | RAPL_DRAM_PERF_STATUS | RAPL_PKG_POWER_INFO;
break;
- case 0x37: /* BYT */
- case 0x4D: /* AVN */
+ case INTEL_FAM6_ATOM_SILVERMONT1: /* BYT */
+ case INTEL_FAM6_ATOM_SILVERMONT2: /* AVN */
do_rapl = RAPL_PKG | RAPL_CORES ;
break;
default:
@@ -2713,11 +2714,11 @@ void perf_limit_reasons_probe(unsigned int family, unsigned int model)
return;
switch (model) {
- case 0x3C: /* HSW */
- case 0x45: /* HSW */
- case 0x46: /* HSW */
+ case INTEL_FAM6_HASWELL_CORE: /* HSW */
+ case INTEL_FAM6_HASWELL_ULT: /* HSW */
+ case INTEL_FAM6_HASWELL_GT3E: /* HSW */
do_gfx_perf_limit_reasons = 1;
- case 0x3F: /* HSX */
+ case INTEL_FAM6_HASWELL_X: /* HSX */
do_core_perf_limit_reasons = 1;
do_ring_perf_limit_reasons = 1;
default:
@@ -2927,24 +2928,24 @@ int has_snb_msrs(unsigned int family, unsigned int model)
return 0;
switch (model) {
- case 0x2A:
- case 0x2D:
- case 0x3A: /* IVB */
- case 0x3E: /* IVB Xeon */
- case 0x3C: /* HSW */
- case 0x3F: /* HSW */
- case 0x45: /* HSW */
- case 0x46: /* HSW */
- case 0x3D: /* BDW */
- case 0x47: /* BDW */
- case 0x4F: /* BDX */
- case 0x56: /* BDX-DE */
- case 0x4E: /* SKL */
- case 0x5E: /* SKL */
- case 0x8E: /* KBL */
- case 0x9E: /* KBL */
- case 0x55: /* SKX */
- case 0x5C: /* BXT */
+ case INTEL_FAM6_SANDYBRIDGE:
+ case INTEL_FAM6_SANDYBRIDGE_X:
+ case INTEL_FAM6_IVYBRIDGE: /* IVB */
+ case INTEL_FAM6_IVYBRIDGE_X: /* IVB Xeon */
+ case INTEL_FAM6_HASWELL_CORE: /* HSW */
+ case INTEL_FAM6_HASWELL_X: /* HSW */
+ case INTEL_FAM6_HASWELL_ULT: /* HSW */
+ case INTEL_FAM6_HASWELL_GT3E: /* HSW */
+ case INTEL_FAM6_BROADWELL_CORE: /* BDW */
+ case INTEL_FAM6_BROADWELL_GT3E: /* BDW */
+ case INTEL_FAM6_BROADWELL_X: /* BDX */
+ case INTEL_FAM6_BROADWELL_XEON_D: /* BDX-DE */
+ case INTEL_FAM6_SKYLAKE_MOBILE: /* SKL */
+ case INTEL_FAM6_SKYLAKE_DESKTOP: /* SKL */
+ case INTEL_FAM6_KABYLAKE_MOBILE: /* KBL */
+ case INTEL_FAM6_KABYLAKE_DESKTOP: /* KBL */
+ case INTEL_FAM6_SKYLAKE_X: /* SKX */
+ case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */
return 1;
}
return 0;
@@ -2968,13 +2969,13 @@ int has_hsw_msrs(unsigned int family, unsigned int model)
return 0;
switch (model) {
- case 0x45: /* HSW */
- case 0x3D: /* BDW */
- case 0x4E: /* SKL */
- case 0x5E: /* SKL */
- case 0x8E: /* KBL */
- case 0x9E: /* KBL */
- case 0x5C: /* BXT */
+ case INTEL_FAM6_HASWELL_ULT: /* HSW */
+ case INTEL_FAM6_BROADWELL_CORE: /* BDW */
+ case INTEL_FAM6_SKYLAKE_MOBILE: /* SKL */
+ case INTEL_FAM6_SKYLAKE_DESKTOP: /* SKL */
+ case INTEL_FAM6_KABYLAKE_MOBILE: /* KBL */
+ case INTEL_FAM6_KABYLAKE_DESKTOP: /* KBL */
+ case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */
return 1;
}
return 0;
@@ -2994,10 +2995,10 @@ int has_skl_msrs(unsigned int family, unsigned int model)
return 0;
switch (model) {
- case 0x4E: /* SKL */
- case 0x5E: /* SKL */
- case 0x8E: /* KBL */
- case 0x9E: /* KBL */
+ case INTEL_FAM6_SKYLAKE_MOBILE: /* SKL */
+ case INTEL_FAM6_SKYLAKE_DESKTOP: /* SKL */
+ case INTEL_FAM6_KABYLAKE_MOBILE: /* KBL */
+ case INTEL_FAM6_KABYLAKE_DESKTOP: /* KBL */
return 1;
}
return 0;
@@ -3010,8 +3011,8 @@ int is_slm(unsigned int family, unsigned int model)
if (!genuine_intel)
return 0;
switch (model) {
- case 0x37: /* BYT */
- case 0x4D: /* AVN */
+ case INTEL_FAM6_ATOM_SILVERMONT1: /* BYT */
+ case INTEL_FAM6_ATOM_SILVERMONT2: /* AVN */
return 1;
}
return 0;
@@ -3022,7 +3023,7 @@ int is_knl(unsigned int family, unsigned int model)
if (!genuine_intel)
return 0;
switch (model) {
- case 0x57: /* KNL */
+ case INTEL_FAM6_XEON_PHI_KNL: /* KNL */
return 1;
}
return 0;
@@ -3303,16 +3304,16 @@ void process_cpuid()
if (crystal_hz == 0)
switch(model) {
- case 0x4E: /* SKL */
- case 0x5E: /* SKL */
- case 0x8E: /* KBL */
- case 0x9E: /* KBL */
+ case INTEL_FAM6_SKYLAKE_MOBILE: /* SKL */
+ case INTEL_FAM6_SKYLAKE_DESKTOP: /* SKL */
+ case INTEL_FAM6_KABYLAKE_MOBILE: /* KBL */
+ case INTEL_FAM6_KABYLAKE_DESKTOP: /* KBL */
crystal_hz = 24000000; /* 24.0 MHz */
break;
- case 0x55: /* SKX */
+ case INTEL_FAM6_SKYLAKE_X: /* SKX */
crystal_hz = 25000000; /* 25.0 MHz */
break;
- case 0x5C: /* BXT */
+ case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */
crystal_hz = 19200000; /* 19.2 MHz */
break;
default:
--
2.10.1
Add Knights Mill (KNM) to the list of CPUIDs supported by PMU.
Signed-off-by: Piotr Luc <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
to Intel family
arch/x86/events/intel/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 4c9a79b..327dc2d 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -3893,6 +3893,7 @@ __init int intel_pmu_init(void)
break;
case INTEL_FAM6_XEON_PHI_KNL:
+ case INTEL_FAM6_XEON_PHI_KNM:
memcpy(hw_cache_event_ids,
slm_hw_cache_event_ids, sizeof(hw_cache_event_ids));
memcpy(hw_cache_extra_regs,
@@ -3907,7 +3908,7 @@ __init int intel_pmu_init(void)
x86_pmu.flags |= PMU_FL_HAS_RSP_1;
x86_pmu.flags |= PMU_FL_NO_HT_SHARING;
- pr_cont("Knights Landing events, ");
+ pr_cont("Knights Landing/Mill events, ");
break;
case INTEL_FAM6_SKYLAKE_MOBILE:
--
2.10.1
Add Knights Mill (KNM) to the list of CPUIDs supported by rapl.
Signed-off-by: Piotr Luc <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
to Intel family
arch/x86/events/intel/rapl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/events/intel/rapl.c b/arch/x86/events/intel/rapl.c
index 2886593..779e7c8 100644
--- a/arch/x86/events/intel/rapl.c
+++ b/arch/x86/events/intel/rapl.c
@@ -761,6 +761,7 @@ static const struct x86_cpu_id rapl_cpu_match[] __initconst = {
X86_RAPL_MODEL_MATCH(INTEL_FAM6_BROADWELL_XEON_D, hsw_rapl_init),
X86_RAPL_MODEL_MATCH(INTEL_FAM6_XEON_PHI_KNL, knl_rapl_init),
+ X86_RAPL_MODEL_MATCH(INTEL_FAM6_XEON_PHI_KNM, knl_rapl_init),
X86_RAPL_MODEL_MATCH(INTEL_FAM6_SKYLAKE_MOBILE, skl_rapl_init),
X86_RAPL_MODEL_MATCH(INTEL_FAM6_SKYLAKE_DESKTOP, skl_rapl_init),
--
2.10.1
Add Knights Mill (KNM) to the list of CPUIDs supported by intel_pstate.
Signed-off-by: Piotr Luc <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Cc: Srinivas Pandruvada <[email protected]>
Cc: Len Brown <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
to Intel family
drivers/cpufreq/intel_pstate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index be9eade..4240aff 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1367,6 +1367,7 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
ICPU(INTEL_FAM6_SKYLAKE_DESKTOP, core_params),
ICPU(INTEL_FAM6_BROADWELL_XEON_D, core_params),
ICPU(INTEL_FAM6_XEON_PHI_KNL, knl_params),
+ ICPU(INTEL_FAM6_XEON_PHI_KNM, knl_params),
ICPU(INTEL_FAM6_ATOM_GOLDMONT, bxt_params),
{}
};
--
2.10.1
Add Knights Mill (KNM) to the list of CPUIDs supported by sb_edac.
Signed-off-by: Piotr Luc <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Doug Thompson <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: "Luck, Tony" <[email protected]>
Cc: "Shevchenko, Andriy" <[email protected]>
---
This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
to Intel family
drivers/edac/sb_edac.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 90564bc..3ffc737 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -3373,6 +3373,7 @@ static const struct x86_cpu_id sbridge_cpuids[] = {
ICPU(INTEL_FAM6_BROADWELL_X, pci_dev_descr_broadwell_table),
ICPU(INTEL_FAM6_BROADWELL_XEON_D, pci_dev_descr_broadwell_table),
ICPU(INTEL_FAM6_XEON_PHI_KNL, pci_dev_descr_knl_table),
+ ICPU(INTEL_FAM6_XEON_PHI_KNM, pci_dev_descr_knl_table),
{ }
};
MODULE_DEVICE_TABLE(x86cpu, sbridge_cpuids);
--
2.10.1
Add Knights Mill (KNM) to the list of CPUIDs supported by intel_idle.
Signed-off-by: Piotr Luc <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Cc: [email protected]
Cc: Len Brown <[email protected]>
Cc: [email protected]
---
This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
to Intel family
drivers/idle/intel_idle.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 67ec58f..69047a0 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -1084,6 +1084,7 @@ static const struct x86_cpu_id intel_idle_ids[] __initconst = {
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_DENVERTON, idle_cpu_dnv),
{}
--
2.10.1
Add Knights Mill (KNM) to the list of CPUIDs supported by intel_rapl
Signed-off-by: Piotr Luc <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
to Intel family
drivers/powercap/intel_rapl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
index fbab29d..6a58ff7 100644
--- a/drivers/powercap/intel_rapl.c
+++ b/drivers/powercap/intel_rapl.c
@@ -1160,6 +1160,7 @@ static const struct x86_cpu_id rapl_ids[] __initconst = {
RAPL_CPU(INTEL_FAM6_ATOM_DENVERTON, rapl_defaults_core),
RAPL_CPU(INTEL_FAM6_XEON_PHI_KNL, rapl_defaults_hsw_server),
+ RAPL_CPU(INTEL_FAM6_XEON_PHI_KNM, rapl_defaults_hsw_server),
{}
};
MODULE_DEVICE_TABLE(x86cpu, rapl_ids);
--
2.10.1
Add Knights Mill (KNM) to the list of CPUIDs supported by turbostat.
Signed-off-by: Piotr Luc <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Cc: [email protected]
---
This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
to Intel family
tools/power/x86/turbostat/turbostat.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 09a542cc..5773509 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -2213,6 +2213,7 @@ int probe_nhm_msrs(unsigned int family, unsigned int model)
pkg_cstate_limits = amt_pkg_cstate_limits;
break;
case INTEL_FAM6_XEON_PHI_KNL: /* PHI */
+ case INTEL_FAM6_XEON_PHI_KNM: /* PHI */
pkg_cstate_limits = phi_pkg_cstate_limits;
break;
case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */
@@ -2238,6 +2239,7 @@ int has_nhm_turbo_ratio_limit(unsigned int family, unsigned int model)
case INTEL_FAM6_NEHALEM_EX: /* Nehalem-EX Xeon - Beckton */
case INTEL_FAM6_WESTMERE_EX: /* Westmere-EX Xeon - Eagleton */
case INTEL_FAM6_XEON_PHI_KNL: /* PHI - Knights Landing (different MSR definition) */
+ case INTEL_FAM6_XEON_PHI_KNM: /* PHI - Knights Mill (similar to KNL) */
return 0;
default:
return 1;
@@ -2285,6 +2287,7 @@ int has_knl_turbo_ratio_limit(unsigned int family, unsigned int model)
switch (model) {
case INTEL_FAM6_XEON_PHI_KNL: /* Knights Landing */
+ case INTEL_FAM6_XEON_PHI_KNM: /* Knights Mill */
return 1;
default:
return 0;
@@ -2315,6 +2318,7 @@ int has_config_tdp(unsigned int family, unsigned int model)
case INTEL_FAM6_SKYLAKE_X: /* SKX */
case INTEL_FAM6_XEON_PHI_KNL: /* Knights Landing */
+ case INTEL_FAM6_XEON_PHI_KNM: /* Knights Mill */
return 1;
default:
return 0;
@@ -2616,6 +2620,7 @@ rapl_dram_energy_units_probe(int model, double rapl_energy_units)
case INTEL_FAM6_BROADWELL_X: /* BDX */
case INTEL_FAM6_BROADWELL_XEON_D: /* BDX-DE */
case INTEL_FAM6_XEON_PHI_KNL: /* KNL */
+ case INTEL_FAM6_XEON_PHI_KNM: /* KNM */
return (rapl_dram_energy_units = 15.3 / 1000000);
default:
return (rapl_energy_units);
@@ -2664,6 +2669,7 @@ void rapl_probe(unsigned int family, unsigned int model)
case INTEL_FAM6_BROADWELL_XEON_D: /* BDX-DE */
case INTEL_FAM6_SKYLAKE_X: /* SKX */
case INTEL_FAM6_XEON_PHI_KNL: /* KNL */
+ case INTEL_FAM6_XEON_PHI_KNM: /* KNM */
do_rapl = RAPL_PKG | RAPL_DRAM | RAPL_DRAM_POWER_INFO | RAPL_DRAM_PERF_STATUS | RAPL_PKG_PERF_STATUS | RAPL_PKG_POWER_INFO;
break;
case INTEL_FAM6_SANDYBRIDGE_X:
@@ -3024,6 +3030,7 @@ int is_knl(unsigned int family, unsigned int model)
return 0;
switch (model) {
case INTEL_FAM6_XEON_PHI_KNL: /* KNL */
+ case INTEL_FAM6_XEON_PHI_KNM: /* KNM */
return 1;
}
return 0;
--
2.10.1
Add Knights Mill (KNM) to the list of CPUIDs supported by PMU.
Signed-off-by: Piotr Luc <[email protected]>
Reviewed-by: Dave Hansen <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
to Intel family
arch/x86/events/intel/uncore.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index 463dc7a..25acb30 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -1341,6 +1341,7 @@ static const struct x86_cpu_id intel_uncore_match[] __initconst = {
X86_UNCORE_MODEL_MATCH(INTEL_FAM6_BROADWELL_X, bdx_uncore_init),
X86_UNCORE_MODEL_MATCH(INTEL_FAM6_BROADWELL_XEON_D, bdx_uncore_init),
X86_UNCORE_MODEL_MATCH(INTEL_FAM6_XEON_PHI_KNL, knl_uncore_init),
+ X86_UNCORE_MODEL_MATCH(INTEL_FAM6_XEON_PHI_KNM, knl_uncore_init),
X86_UNCORE_MODEL_MATCH(INTEL_FAM6_SKYLAKE_DESKTOP,skl_uncore_init),
X86_UNCORE_MODEL_MATCH(INTEL_FAM6_SKYLAKE_MOBILE, skl_uncore_init),
{},
--
2.10.1
On Thu, 2016-10-13 at 17:31 +0200, Piotr Luc wrote:
> Add Knights Mill (KNM) to the list of CPUIDs supported by
> intel_pstate.
>
> Signed-off-by: Piotr Luc <[email protected]>
> Reviewed-by: Dave Hansen <[email protected]>
> Cc: Srinivas Pandruvada <[email protected]>
> Cc: Len Brown <[email protected]>
> Cc: "Rafael J. Wysocki" <[email protected]>
> Cc: Viresh Kumar <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
Acked-by: Srinivas Pandruvada <[email protected]>
> ---
> This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
> to Intel family
>
> drivers/cpufreq/intel_pstate.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/intel_pstate.c
> b/drivers/cpufreq/intel_pstate.c
> index be9eade..4240aff 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -1367,6 +1367,7 @@ static const struct x86_cpu_id
> intel_pstate_cpu_ids[] = {
> ICPU(INTEL_FAM6_SKYLAKE_DESKTOP, core_params),
> ICPU(INTEL_FAM6_BROADWELL_XEON_D, core_params),
> ICPU(INTEL_FAM6_XEON_PHI_KNL, knl_params),
> + ICPU(INTEL_FAM6_XEON_PHI_KNM, knl_params),
> ICPU(INTEL_FAM6_ATOM_GOLDMONT, bxt_params),
> {}
> };
On Thursday, October 13, 2016 05:30:54 PM Piotr Luc wrote:
> Resending patches related to KNM CPU ID in one patchset for
> more convenient pick up.
>
> This series of patches enables support for Knights Mill (KNM).
>
> First two patches improve code style by replacing raw numbers
> of CPUID with descriptive macros of processor names.
>
> The third one introduces KNM CPU ID to Intel family.
>
> The other patches add KNM CPU ID to several modules and depend on
> the third one. Because KNM is closely related to Knights Landing (KNL)
> it reuses KNL code.
> The turbostat patch (tools/power turbostat: Use Intel family processor
> macros) comes in v2 with fixed compilation (missed including of
> intel-family.h).
>
> Regards,
> Piotr
>
> Piotr Luc (11):
> EDAC, sb_edac: Use Intel family processor macros
> tools/power turbostat: Use Intel family processor macros
> x86/cpu/intel: Add Knights Mill to Intel family
> x86/intel_idle: Add Knights Mill CPUID
> EDAC, sb_edac: Add Knights Mill CPUID
> cpufreq: intel_pstate: Add Knights Mill CPUID
> perf/x86/intel: Add Knights Mill CPUID
> perf/x86/intel/rapl: Add Knights Mill CPUID
> perf/x86/intel/uncore: Add Knights Mill CPUID
> powercap / RAPL: Add Knights Mill CPUID
> tools/power turbostat: enable turbostat to support Knights Mill (KNM)
>
> arch/x86/events/intel/core.c | 3 +-
> arch/x86/events/intel/rapl.c | 1 +
> arch/x86/events/intel/uncore.c | 1 +
> arch/x86/include/asm/intel-family.h | 1 +
> drivers/cpufreq/intel_pstate.c | 1 +
> drivers/edac/sb_edac.c | 14 +-
> drivers/idle/intel_idle.c | 1 +
> drivers/powercap/intel_rapl.c | 1 +
> tools/power/x86/turbostat/Makefile | 3 +-
> tools/power/x86/turbostat/turbostat.c | 250 ++++++++++++++++++----------------
> 10 files changed, 147 insertions(+), 129 deletions(-)
Len, Jacob, any problems with any of the patches in this series?
Thanks,
Rafael
On Thu, Oct 13, 2016 at 05:30:55PM +0200, Piotr Luc wrote:
> Use macros of Intel processor families instead of raw numbers.
>
> Signed-off-by: Piotr Luc <[email protected]>
> Reviewed-by: Dave Hansen <[email protected]>
> Cc: Mauro Carvalho Chehab <[email protected]>
> Cc: Doug Thompson <[email protected]>
> Cc: Borislav Petkov <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: "Luck, Tony" <[email protected]>
> Cc: "Shevchenko, Andriy" <[email protected]>
> ---
> drivers/edac/sb_edac.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> index ce0067b..90564bc 100644
> --- a/drivers/edac/sb_edac.c
> +++ b/drivers/edac/sb_edac.c
> @@ -23,6 +23,7 @@
> #include <linux/math64.h>
> #include <linux/mod_devicetable.h>
> #include <asm/cpu_device_id.h>
> +#include <asm/intel-family.h>
> #include <asm/processor.h>
> #include <asm/mce.h>
>
> @@ -3366,12 +3367,12 @@ fail0:
> { X86_VENDOR_INTEL, 6, model, 0, (unsigned long)&table }
>
> static const struct x86_cpu_id sbridge_cpuids[] = {
> - ICPU(0x2d, pci_dev_descr_sbridge_table), /* SANDY_BRIDGE */
> - ICPU(0x3e, pci_dev_descr_ibridge_table), /* IVY_BRIDGE */
> - ICPU(0x3f, pci_dev_descr_haswell_table), /* HASWELL */
> - ICPU(0x4f, pci_dev_descr_broadwell_table), /* BROADWELL */
> - ICPU(0x56, pci_dev_descr_broadwell_table), /* BROADWELL-DE */
> - ICPU(0x57, pci_dev_descr_knl_table), /* KNIGHTS_LANDING */
> + ICPU(INTEL_FAM6_SANDYBRIDGE_X, pci_dev_descr_sbridge_table),
> + ICPU(INTEL_FAM6_IVYBRIDGE_X, pci_dev_descr_ibridge_table),
> + ICPU(INTEL_FAM6_HASWELL_X, pci_dev_descr_haswell_table),
> + ICPU(INTEL_FAM6_BROADWELL_X, pci_dev_descr_broadwell_table),
> + ICPU(INTEL_FAM6_BROADWELL_XEON_D, pci_dev_descr_broadwell_table),
> + ICPU(INTEL_FAM6_XEON_PHI_KNL, pci_dev_descr_knl_table),
> { }
> };
> MODULE_DEVICE_TABLE(x86cpu, sbridge_cpuids);
> --
I took Dave's patch here, instead:
https://lkml.kernel.org/r/[email protected]
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
On Thu, Oct 13, 2016 at 05:30:59PM +0200, Piotr Luc wrote:
> Add Knights Mill (KNM) to the list of CPUIDs supported by sb_edac.
>
> Signed-off-by: Piotr Luc <[email protected]>
> Reviewed-by: Dave Hansen <[email protected]>
> Cc: Mauro Carvalho Chehab <[email protected]>
> Cc: Doug Thompson <[email protected]>
> Cc: Borislav Petkov <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: "Luck, Tony" <[email protected]>
> Cc: "Shevchenko, Andriy" <[email protected]>
> ---
> This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
> to Intel family
>
> drivers/edac/sb_edac.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> index 90564bc..3ffc737 100644
> --- a/drivers/edac/sb_edac.c
> +++ b/drivers/edac/sb_edac.c
> @@ -3373,6 +3373,7 @@ static const struct x86_cpu_id sbridge_cpuids[] = {
> ICPU(INTEL_FAM6_BROADWELL_X, pci_dev_descr_broadwell_table),
> ICPU(INTEL_FAM6_BROADWELL_XEON_D, pci_dev_descr_broadwell_table),
> ICPU(INTEL_FAM6_XEON_PHI_KNL, pci_dev_descr_knl_table),
> + ICPU(INTEL_FAM6_XEON_PHI_KNM, pci_dev_descr_knl_table),
> { }
> };
> MODULE_DEVICE_TABLE(x86cpu, sbridge_cpuids);
> --
Acked-by: Borislav Petkov <[email protected]>
for whichever tree it goes through.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
On Thu, 13 Oct 2016, Piotr Luc wrote:
> + case INTEL_FAM6_NEHALEM_EP: /* Core i7, Xeon 5500 series - Bloomfield, Gainstown NHM-EP */
What's the point of keeping all those comments around?
> + case INTEL_FAM6_SANDYBRIDGE: /* SNB */
Especialy those, which are completely useless?
The defines are there to be self explaining and the extra verbose
information should be in the header file defining the macros and not in the
source code.
Thanks,
tglx
On Fri, Oct 14, 2016 at 12:04:25AM +0200, Borislav Petkov wrote:
> On Thu, Oct 13, 2016 at 05:30:59PM +0200, Piotr Luc wrote:
> > Add Knights Mill (KNM) to the list of CPUIDs supported by sb_edac.
> >
> > Signed-off-by: Piotr Luc <[email protected]>
> > Reviewed-by: Dave Hansen <[email protected]>
> > Cc: Mauro Carvalho Chehab <[email protected]>
> > Cc: Doug Thompson <[email protected]>
> > Cc: Borislav Petkov <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: "Luck, Tony" <[email protected]>
> > Cc: "Shevchenko, Andriy" <[email protected]>
> > ---
> > This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
> > to Intel family
> >
> > drivers/edac/sb_edac.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> > index 90564bc..3ffc737 100644
> > --- a/drivers/edac/sb_edac.c
> > +++ b/drivers/edac/sb_edac.c
> > @@ -3373,6 +3373,7 @@ static const struct x86_cpu_id sbridge_cpuids[] = {
> > ICPU(INTEL_FAM6_BROADWELL_X, pci_dev_descr_broadwell_table),
> > ICPU(INTEL_FAM6_BROADWELL_XEON_D, pci_dev_descr_broadwell_table),
> > ICPU(INTEL_FAM6_XEON_PHI_KNL, pci_dev_descr_knl_table),
> > + ICPU(INTEL_FAM6_XEON_PHI_KNM, pci_dev_descr_knl_table),
> > { }
> > };
> > MODULE_DEVICE_TABLE(x86cpu, sbridge_cpuids);
> > --
>
> Acked-by: Borislav Petkov <[email protected]>
>
> for whichever tree it goes through.
As discussed yesterday, it goes through my tree.
Thus, applied, thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
On Fri, 2016-10-14 at 13:56 +0200, Thomas Gleixner wrote:
> On Thu, 13 Oct 2016, Piotr Luc wrote:
> >
> > + case INTEL_FAM6_SANDYBRIDGE: /* SNB */
>
> Especialy those, which are completely useless?
>
> The defines are there to be self explaining and the extra verbose
> information should be in the header file defining the macros and not
> in the
> source code.
Hi
I submitted the turbostat patchset
https://lkml.kernel.org/r/[email protected] to
address the issues.
Regards
Piotr
On Thu, 2016-10-13 at 23:56 +0200, Rafael J. Wysocki wrote:
> On Thursday, October 13, 2016 05:30:54 PM Piotr Luc wrote:
> >
> > Piotr Luc (11):
> > EDAC, sb_edac: Use Intel family processor macros
> > tools/power turbostat: Use Intel family processor macros
> > x86/cpu/intel: Add Knights Mill to Intel family
> > x86/intel_idle: Add Knights Mill CPUID
> > EDAC, sb_edac: Add Knights Mill CPUID
> > cpufreq: intel_pstate: Add Knights Mill CPUID
> > perf/x86/intel: Add Knights Mill CPUID
> > perf/x86/intel/rapl: Add Knights Mill CPUID
> > perf/x86/intel/uncore: Add Knights Mill CPUID
> > powercap / RAPL: Add Knights Mill CPUID
> > tools/power turbostat: enable turbostat to support Knights Mill
> > (KNM)
> >
> > arch/x86/events/intel/core.c | 3 +-
> > arch/x86/events/intel/rapl.c | 1 +
> > arch/x86/events/intel/uncore.c | 1 +
> > arch/x86/include/asm/intel-family.h | 1 +
> > drivers/cpufreq/intel_pstate.c | 1 +
> > drivers/edac/sb_edac.c | 14 +-
> > drivers/idle/intel_idle.c | 1 +
> > drivers/powercap/intel_rapl.c | 1 +
> > tools/power/x86/turbostat/Makefile | 3 +-
> > tools/power/x86/turbostat/turbostat.c | 250 ++++++++++++++++++--
> > --------------
> > 10 files changed, 147 insertions(+), 129 deletions(-)
>
> Len, Jacob, any problems with any of the patches in this series?
>
> Thanks,
> Rafael
Hi
I wonder if you could share with me what I need to do more to make the
patches be accepted?
Do I need to resend the ones that aren't accepted yet?
Regards,
Piotr
Hi Len,
Could you tell me what more do I need to do to get the patchset
accepted?
The mentioned path 03/11 is already merged in 4.9.rc2.
Thanks,
Piotr
On Thu, 2016-10-13 at 17:30 +0200, Piotr Luc wrote:
> Add Knights Mill (KNM) to the list of CPUIDs supported by intel_idle.
>
> Signed-off-by: Piotr Luc <[email protected]>
> Reviewed-by: Dave Hansen <[email protected]>
> Cc: [email protected]
> Cc: Len Brown <[email protected]>
> Cc: [email protected]
> ---
> This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
> to Intel family
>
> drivers/idle/intel_idle.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index 67ec58f..69047a0 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -1084,6 +1084,7 @@ static const struct x86_cpu_id intel_idle_ids[]
> __initconst = {
> 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_DENVERTON, idle_cpu_dnv)
> ,
> {}
Hi Rafael,
Could you tell me what more do I need to do to get the patch
accepted?
The mentioned path 03/11 is already merged in 4.9.rc2.
Thanks,
Piotr
On Thu, 2016-10-13 at 17:31 +0200, Piotr Luc wrote:
> Add Knights Mill (KNM) to the list of CPUIDs supported by intel_rapl
>
> Signed-off-by: Piotr Luc <[email protected]>
> Reviewed-by: Dave Hansen <[email protected]>
> Cc: "Rafael J. Wysocki" <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights Mill
> to Intel family
>
> drivers/powercap/intel_rapl.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/powercap/intel_rapl.c
> b/drivers/powercap/intel_rapl.c
> index fbab29d..6a58ff7 100644
> --- a/drivers/powercap/intel_rapl.c
> +++ b/drivers/powercap/intel_rapl.c
> @@ -1160,6 +1160,7 @@ static const struct x86_cpu_id rapl_ids[]
> __initconst = {
> RAPL_CPU(INTEL_FAM6_ATOM_DENVERTON, rapl_defaults_cor
> e),
>
> RAPL_CPU(INTEL_FAM6_XEON_PHI_KNL, rapl_defaults_hsw_s
> erver),
> + RAPL_CPU(INTEL_FAM6_XEON_PHI_KNM, rapl_defaults_hsw_s
> erver),
> {}
> };
> MODULE_DEVICE_TABLE(x86cpu, rapl_ids);
Hi
Could you tell me what more do I need to do to get the patch
accepted?
The mentioned path 03/11 is already merged in 4.9.rc2.
Thanks
Piotr
On Thu, 2016-10-13 at 10:51 -0700, Srinivas Pandruvada wrote:
> On Thu, 2016-10-13 at 17:31 +0200, Piotr Luc wrote:
> >
> > Add Knights Mill (KNM) to the list of CPUIDs supported by
> > intel_pstate.
> >
> > Signed-off-by: Piotr Luc <[email protected]>
> > Reviewed-by: Dave Hansen <[email protected]>
> > Cc: Srinivas Pandruvada <[email protected]>
> > Cc: Len Brown <[email protected]>
> > Cc: "Rafael J. Wysocki" <[email protected]>
> > Cc: Viresh Kumar <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
>
> Acked-by: Srinivas Pandruvada <[email protected]>
>
> >
> > ---
> > This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights
> > Mill
> > to Intel family
> >
> > drivers/cpufreq/intel_pstate.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/cpufreq/intel_pstate.c
Hi,
On Tue, Oct 25, 2016 at 12:48 PM, Luc, Piotr <[email protected]> wrote:
> Hi
>
> Could you tell me what more do I need to do to get the patch
> accepted?
>
> The mentioned path 03/11 is already merged in 4.9.rc2.
If it's already there, I can pick up the intel_pstate one.
Thanks,
Rafael
On Tue, 2016-10-25 at 13:16 +0200, Rafael J. Wysocki wrote:
> Hi,
>
> On Tue, Oct 25, 2016 at 12:48 PM, Luc, Piotr <[email protected]>
> wrote:
> >
> > Hi
> >
> > Could you tell me what more do I need to do to get the patch
> > accepted?
> >
> > The mentioned path 03/11 is already merged in 4.9.rc2.
>
> If it's already there, I can pick up the intel_pstate one.
>
> Thanks,
> > Rafael
Here is the commit http://git.kernel.org/cgit/linux/kernel/git/torvalds
/linux.git/commit/?id=0047f59834e5947d45f34f5f12eb330d158f700b
Thanks,
Piotr
Hi Rafael,
> > >
> > > The mentioned path 03/11 is already merged in 4.9.rc2.
> >
> > If it's already there, I can pick up the intel_pstate one.
> >
> > Thanks,
> > >
> > > Rafael
>
> Here is the commit http://git.kernel.org/cgit/linux/kernel/git/torval
> ds
> /linux.git/commit/?id=0047f59834e5947d45f34f5f12eb330d158f700b
>
Could you confirm that it is in your queue or tree for v4.10?
Thanks,
Piotr
On Wed, Nov 30, 2016 at 5:19 PM, Luc, Piotr <[email protected]> wrote:
> Hi Rafael,
>
>> > >
>> > > The mentioned path 03/11 is already merged in 4.9.rc2.
>> >
>> > If it's already there, I can pick up the intel_pstate one.
>> >
>> > Thanks,
>> > >
>> > > Rafael
>>
>> Here is the commit http://git.kernel.org/cgit/linux/kernel/git/torval
>> ds
>> /linux.git/commit/?id=0047f59834e5947d45f34f5f12eb330d158f700b
>>
>
> Could you confirm that it is in your queue or tree for v4.10?
In fact it wasn't, so queuing it up now.
Thanks for the reminder!
Rafael
Thanks!
Piotr
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of
> Rafael J. Wysocki
> Sent: Wednesday, November 30, 2016 11:02 PM
> To: Luc, Piotr <[email protected]>
> Cc: [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]
> Subject: Re: [RESEND PATCH 06/11] cpufreq: intel_pstate: Add Knights Mill
> CPUID
>
> On Wed, Nov 30, 2016 at 5:19 PM, Luc, Piotr <[email protected]> wrote:
> > Hi Rafael,
> >
> >> > >
> >> > > The mentioned path 03/11 is already merged in 4.9.rc2.
> >> >
> >> > If it's already there, I can pick up the intel_pstate one.
> >> >
> >> > Thanks,
> >> > >
> >> > > Rafael
> >>
> >> Here is the commit http://git.kernel.org/cgit/linux/kernel/git/torval
> >> ds
> >> /linux.git/commit/?id=0047f59834e5947d45f34f5f12eb330d158f700b
> >>
> >
> > Could you confirm that it is in your queue or tree for v4.10?
>
> In fact it wasn't, so queuing it up now.
>
> Thanks for the reminder!
>
> Rafael
Hi Rafael,
Kindly reminder.
Could you pick this patch up for kernel 4.10?
The RedHat acceptance window is closing soon, I need to pass them the
commit id.
Thanks,
Piotr
On Tue, 2016-10-25 at 12:35 +0200, Luc, Piotr wrote:
> Hi Rafael,
>
> Could you tell me what more do I need to do to get the patch
> accepted?
>
> The mentioned path 03/11 is already merged in 4.9.rc2.
>
> Thanks,
> Piotr
>
>
> On Thu, 2016-10-13 at 17:31 +0200, Piotr Luc wrote:
> >
> > Add Knights Mill (KNM) to the list of CPUIDs supported by
> > intel_rapl
> >
> > Signed-off-by: Piotr Luc <[email protected]>
> > Reviewed-by: Dave Hansen <[email protected]>
> > Cc: "Rafael J. Wysocki" <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > ---
> > This patch depends on [PATCH 03/11] x86/cpu/intel: Add Knights
> > Mill
> > to Intel family
> >
> > drivers/powercap/intel_rapl.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/powercap/intel_rapl.c
> > b/drivers/powercap/intel_rapl.c
> > index fbab29d..6a58ff7 100644
> > --- a/drivers/powercap/intel_rapl.c
> > +++ b/drivers/powercap/intel_rapl.c
> > @@ -1160,6 +1160,7 @@ static const struct x86_cpu_id rapl_ids[]
> > __initconst = {
> > RAPL_CPU(INTEL_FAM6_ATOM_DENVERTON, rapl_defaults_c
> > or
> > e),
> >
> > RAPL_CPU(INTEL_FAM6_XEON_PHI_KNL, rapl_defaults_hsw
> > _s
> > erver),
> > + RAPL_CPU(INTEL_FAM6_XEON_PHI_KNM, rapl_defaults_hsw
> > _s
> > erver),
> > {}
> > };
> > MODULE_DEVICE_TABLE(x86cpu, rapl_ids);
On Wed, Nov 30, 2016 at 11:33 PM, Luc, Piotr <[email protected]> wrote:
> Hi Rafael,
>
> Kindly reminder.
> Could you pick this patch up for kernel 4.10?
> The RedHat acceptance window is closing soon, I need to pass them the
> commit id.
Done now, thanks!
Rafael
Applied
Sorry, for some reason this patch was not present on linux-pm
patchwork, just on lkml patchwork, which I do not review.
thanks,
Len Brown, Intel Open Source Technology Center
Piotr,
Thanks for sending the patch, I've made this change to my turbostat
branch for 4.10.
I did not apply your patch directly because for some reason it didn't
appear in patchwork for linux-pm,
only for lkml, which I do not review.
Also, your patch depended on your style update patch to use the model # macros.
Unfortunately what you did not know was that I'd already applied a
slightly different style update patch.
(and it was my fault that I did not push it upstream before my summer
sabbatical, sorry)
In general, though, a good strategy when mixing style and functionality patches
is to do the functionality first. The reason is both that style
patches tend to conflict more,
and you don't want them to hold up the functionality.
Also, if your functionality patch does not depend on style,
it is easier to backport to distros who avoid style updates.
Fortunately, this one was trivial.
thanks,
Len Brown, Intel Open Source Technology Center
On Thu, 2016-12-01 at 01:47 -0500, Len Brown wrote:
> Piotr,
> Thanks for sending the patch, I've made this change to my turbostat
> branch for 4.10.
>
> I did not apply your patch directly because for some reason it didn't
> appear in patchwork for linux-pm,
> only for lkml, which I do not review.
The missing from linux-pm was my mistake due to lack of experience and
perspicacity; I did not add the linux-pm list to cc because I could not
find an entry for turbostat on MAINTAINERS file. Probably, it is
mentioned implicitly but I did not come across it.
>
> Also, your patch depended on your style update patch to use the model
> # macros.
> Unfortunately what you did not know was that I'd already applied a
> slightly different style update patch.
> (and it was my fault that I did not push it upstream before my summer
> sabbatical, sorry)
NP, this was an easy change made automatically by my script.
>
> In general, though, a good strategy when mixing style and
> functionality patches
> is to do the functionality first. The reason is both that style
> patches tend to conflict more,
> and you don't want them to hold up the functionality.
> Also, if your functionality patch does not depend on style,
> it is easier to backport to distros who avoid style updates.
Thanks for the tip.
However, in this case, I got comments to use the macros instead raw
numbers in my patch and remove unnecessary comments. It caused that the
style patch came first.
Thanks
Piotr