Skip to contentSkip to conversation

Add Knights Mill CPU ID

PATCH RESEND Applied Piotr Luc 7 participants 34 messages Oct 13, 2016 – Dec 1, 2016

Subsystems (10)
lore
Share & tools
lore

Piotr Luc

author
#0 lore raw

cover Add Knights Mill CPU ID

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

author
#1 lore raw

PATCH RESEND 1/11 EDAC, sb_edac: Use Intel family processor macros

Use macros of Intel processor families instead of raw numbers.

Cc Mauro Carvalho Chehab <[email protected]>
Cc Doug Thompson <[email protected]>
Cc Borislav Petkov <[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(-)
drivers/edac/sb_edac.c +7 -6
index ce0067b..90564bc 100644
@@ -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);
Signature · 1 line
2.10.1
maintainer
#2 lore raw

Re: [RESEND PATCH 01/11] EDAC, sb_edac: Use Intel family processor macros

Quoted 37 lines · Piotr Luc

Use macros of Intel processor families instead of raw numbers.

Cc Mauro Carvalho Chehab <[email protected]>
Cc Doug Thompson <[email protected]>
Cc Borislav Petkov <[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(-)
drivers/edac/sb_edac.c +1 -6
index ce0067b..90564bc 100644
@@ -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 */

drivers/edac/sb_edac.c fail0:

Quoted 10 lines
drivers/edac/sb_edac.c +6 -1
+	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]

Signature · 4 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
author
#3 lore raw

PATCH RESEND 3/11 x86/cpu/intel: Add Knights Mill to Intel family

In reply to Piotr Luc

Add CPUID of Knights Mill (KNM) processor to Intel family list.

---
 arch/x86/include/asm/intel-family.h | 1 +
 1 file changed, 1 insertion(+)
arch/x86/include/asm/intel-family.h +1 -0
index 6277194..ba7d8d8 100644
@@ -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 */
Signature · 1 line
2.10.1
author
#4 lore raw

PATCH RESEND 4/11 x86/intel_idle: Add Knights Mill CPUID

In reply to Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by intel_idle.

---
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(+)
drivers/idle/intel_idle.c +1 -0
index 67ec58f..69047a0 100644
@@ -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),
 	{}
Signature · 1 line
2.10.1
author
#5 lore raw

Re: [RESEND,04/11] x86/intel_idle: Add Knights Mill CPUID

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

Quoted 28 lines · Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by intel_idle.

---
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(+)
drivers/idle/intel_idle.c +1 -0
index 67ec58f..69047a0 100644
@@ -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)

,
  {}

maintainer Applied
#6 lore raw

Re: [RESEND PATCH 04/11] x86/intel_idle: Add Knights Mill CPUID

In reply to Piotr Luc

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

author
#7 lore raw

Re: [RESEND PATCH 04/11] x86/intel_idle: Add Knights Mill CPUID

Quoted 5 lines · Len Brown

Applied

Sorry, for some reason this patch was not present on linux-pm patchwork, just on lkml patchwork, which I do not review.

Hi Len,
Thanks for merging.

Piotr

author
#8 lore raw

PATCH RESEND 5/11 EDAC, sb_edac: Add Knights Mill CPUID

In reply to Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by sb_edac.

Cc Mauro Carvalho Chehab <[email protected]>
Cc Doug Thompson <[email protected]>
Cc Borislav Petkov <[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(+)
drivers/edac/sb_edac.c +1 -0
index 90564bc..3ffc737 100644
@@ -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);
Signature · 1 line
2.10.1
maintainer Acked-by on v1 5/11
#9 lore raw

Re: [RESEND PATCH 05/11] EDAC, sb_edac: Add Knights Mill CPUID

Quoted 24 lines · Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by sb_edac.

Cc Mauro Carvalho Chehab <[email protected]>
Cc Doug Thompson <[email protected]>
Cc Borislav Petkov <[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(+)
drivers/edac/sb_edac.c +0 -0
index 90564bc..3ffc737 100644

drivers/edac/sb_edac.c static const struct x86_cpu_id sbridge_cpuids[] = { · line 3379

Quoted 7 lines
drivers/edac/sb_edac.c +1 -0
@@ -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);

for whichever tree it goes through.

Signature · 4 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
maintainer
#10 lore raw

Re: [RESEND PATCH 05/11] EDAC, sb_edac: Add Knights Mill CPUID

Quoted 35 lines · Borislav Petkov
Quoted 24 lines · Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by sb_edac.

Cc Mauro Carvalho Chehab <[email protected]>
Cc Doug Thompson <[email protected]>
Cc Borislav Petkov <[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(+)
drivers/edac/sb_edac.c +0 -0
index 90564bc..3ffc737 100644

drivers/edac/sb_edac.c static const struct x86_cpu_id sbridge_cpuids[] = { · line 3379

Quoted 7 lines
drivers/edac/sb_edac.c +1 -0
@@ -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);
Quoted 1 line

for whichever tree it goes through.

As discussed yesterday, it goes through my tree.

Thus, applied, thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
author
#11 lore raw

PATCH RESEND 6/11 cpufreq: intel_pstate: Add Knights Mill CPUID

In reply to Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by intel_pstate.

Cc Srinivas Pandruvada <[email protected]>
Cc Len Brown <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Viresh Kumar <[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(+)
drivers/cpufreq/intel_pstate.c +1 -0
index be9eade..4240aff 100644
@@ -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),
 	{}
 };
Signature · 1 line
2.10.1
maintainer Acked-by on v1 6/11
#12 lore raw

Re: [RESEND PATCH 06/11] cpufreq: intel_pstate: Add Knights Mill CPUID

Quoted 11 lines · Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by intel_pstate.

Cc Srinivas Pandruvada <[email protected]>
Cc Len Brown <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Viresh Kumar <[email protected]>
Quoted 21 lines

---
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(+)
drivers/cpufreq/intel_pstate.c +1 -0
index be9eade..4240aff 100644
@@ -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),
  	{}

 };

author
#13 lore raw

Re: [RESEND PATCH 06/11] cpufreq: intel_pstate: Add Knights Mill CPUID

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

Quoted 26 lines · Srinivas Pandruvada
Quoted 4 lines · Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by intel_pstate.

Quoted 8 lines
Cc Srinivas Pandruvada <[email protected]>
Cc Len Brown <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Viresh Kumar <[email protected]>
Quoted 10 lines

---
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(+)
(quoted diff) +0 -0
#14 lore raw

Re: [RESEND PATCH 06/11] cpufreq: intel_pstate: Add Knights Mill CPUID

Hi,

Quoted 6 lines · Piotr

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

author
#15 lore raw

Re: [RESEND PATCH 06/11] cpufreq: intel_pstate: Add Knights Mill CPUID

Quoted 7 lines · Rafael J. Wysocki

Hi,

Quoted 3 lines · Piotr

Hi

Quoted 9 lines
Quoted 4 lines

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,

Quoted 1 line

Rafael

Here is the commit http://git.kernel.org/cgit/linux/kernel/git/torvalds
/linux.git/commit/?id=0047f59834e5947d45f34f5f12eb330d158f700b

Thanks,
Piotr

author
#16 lore raw

Re: [RESEND PATCH 06/11] cpufreq: intel_pstate: Add Knights Mill CPUID

Hi Rafael,

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

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.

Quoted 8 lines
Quoted 3 lines

Thanks,

Quoted 2 lines

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

#17 lore raw

Re: [RESEND PATCH 06/11] cpufreq: intel_pstate: Add Knights Mill CPUID

Quoted 9 lines · Piotr

Hi Rafael,

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

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,

Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line

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

author
#18 lore raw

RE: [RESEND PATCH 06/11] cpufreq: intel_pstate: Add Knights Mill CPUID

Thanks!
Piotr

Quoted 35 lines

-----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

Quoted 9 lines · Piotr

Hi Rafael,

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines

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,

Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line

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

author
#19 lore raw

PATCH RESEND 7/11 perf/x86/intel: Add Knights Mill CPUID

In reply to Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by PMU.

---
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(-)
arch/x86/events/intel/core.c +2 -1
index 4c9a79b..327dc2d 100644
@@ -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:
Signature · 1 line
2.10.1
author
#20 lore raw

PATCH v2 2/11 tools/power turbostat: Use Intel family processor macros

In reply to Piotr Luc

Use macros of Intel processor families instead of raw numbers.

---
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(-)
tools/power/x86/turbostat/Makefile +2 -1
index 8561e7d..20631f6 100644
@@ -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)
tools/power/x86/turbostat/turbostat.c +122 -121

372 lines not on this page · raw message

Signature · 1 line
2.10.1
#21 lore raw

Re: [PATCH v2 02/11] tools/power turbostat: Use Intel family processor macros

tools/power/x86/turbostat/turbostat.c int probe_nhm_msrs(unsigned int family, unsigned int model) · line 2178

Quoted 1 line · Piotr Luc
tools/power/x86/turbostat/turbostat.c +1 -0
+	case INTEL_FAM6_NEHALEM_EP:		/* Core i7, Xeon 5500 series - Bloomfield, Gainstown NHM-EP */

What's the point of keeping all those comments around?

tools/power/x86/turbostat/turbostat.c int probe_nhm_msrs(unsigned int family, unsigned int model) · line 2187

Quoted 1 line
tools/power/x86/turbostat/turbostat.c +1 -0
+	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

author
#22 lore raw

Re: [PATCH v2 02/11] tools/power turbostat: Use Intel family processor macros

Quoted 11 lines · Thomas Gleixner

tools/power/x86/turbostat/turbostat.c int probe_nhm_msrs(unsigned int family, unsigned int model) · line 2187

Quoted 2 lines · Piotr Luc
tools/power/x86/turbostat/turbostat.c +1 -0
+	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

author
#23 lore raw

PATCH RESEND 8/11 perf/x86/intel/rapl: Add Knights Mill CPUID

In reply to Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by rapl.

---
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(+)
arch/x86/events/intel/rapl.c +1 -0
index 2886593..779e7c8 100644
@@ -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),
Signature · 1 line
2.10.1
author
#24 lore raw

PATCH RESEND 9/11 perf/x86/intel/uncore: Add Knights Mill CPUID

In reply to Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by PMU.

---
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(+)
arch/x86/events/intel/uncore.c +1 -0
index 463dc7a..25acb30 100644
@@ -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),
 	{},
Signature · 1 line
2.10.1
author
#25 lore raw

PATCH RESEND 10/11 powercap / RAPL: Add Knights Mill CPUID

In reply to Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by intel_rapl

---
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(+)
drivers/powercap/intel_rapl.c +1 -0
index fbab29d..6a58ff7 100644
@@ -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);
Signature · 1 line
2.10.1
author
#26 lore raw

Re: [RESEND,10/11] powercap / RAPL: Add Knights Mill CPUID

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

Quoted 31 lines · Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by intel_rapl

---
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(+)
drivers/powercap/intel_rapl.c +0 -0
index fbab29d..6a58ff7 100644
@@ -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),

drivers/powercap/intel_rapl.c +1 -0
+	RAPL_CPU(INTEL_FAM6_XEON_PHI_KNM,	rapl_defaults_hsw_s

erver),
  {}
 };
 MODULE_DEVICE_TABLE(x86cpu, rapl_ids);

author
#27 lore raw

Re: [RESEND,10/11] powercap / RAPL: Add Knights Mill CPUID

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

Quoted 49 lines · Piotr

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

Quoted 37 lines · Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by intel_rapl

---
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(+)
drivers/powercap/intel_rapl.c +0 -0
index fbab29d..6a58ff7 100644
@@ -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),

drivers/powercap/intel_rapl.c +1 -0
+	RAPL_CPU(INTEL_FAM6_XEON_PHI_KNM,	rapl_defaults_hsw

_s
erver),
  {}
 };
 MODULE_DEVICE_TABLE(x86cpu, rapl_ids);

#28 lore raw

Re: [RESEND,10/11] powercap / RAPL: Add Knights Mill CPUID

Quoted 6 lines · Piotr

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

author
#29 lore raw

PATCH RESEND 11/11 tools/power turbostat: enable turbostat to support Knights Mill (KNM)

In reply to Piotr Luc

Add Knights Mill (KNM) to the list of CPUIDs supported by turbostat.

---
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(+)
tools/power/x86/turbostat/turbostat.c +7 -0
index 09a542cc..5773509 100644
@@ -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;
Signature · 1 line
2.10.1
maintainer
#30 lore raw

Re: [RESEND PATCH 11/11] tools/power turbostat: enable turbostat to support Knights Mill (KNM)

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

author
#31 lore raw

Re: [RESEND PATCH 11/11] tools/power turbostat: enable turbostat to support Knights Mill (KNM)

Quoted 7 lines · Len Brown

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.

Quoted 7 lines

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.

Quoted 8 lines

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

#32 lore raw
In reply to Piotr Luc
Quoted 33 lines · Piotr Luc

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)

Quoted 11 lines
 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

author
#33 lore raw
Quoted 29 lines · Rafael J. Wysocki
Quoted 26 lines · Piotr Luc

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 ++++++++++++++++++--
--------------

Quoted 1 line
 10 files changed, 147 insertions(+), 129 deletions(-)
Quoted 4 lines

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