diff mbox

mwait-idle: support for Intel Xeon Phi Processor x200 Product Family

Message ID 56FBABF502000078000E12D4@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich March 30, 2016, 8:35 a.m. UTC
Enables "Intel(R) Xeon Phi(TM) Processor x200 Product Family" support,
formerly code-named KNL. It is based on modified Intel Atom Silvermont
microarchitecture.

Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
[micah.barany@intel.com: adjusted values of residency and latency]
Signed-off-by: Micah Barany <micah.barany@intel.com>
[Linux commit: 281baf7a702693deaa45c98ef0c5161006b48257]
Signed-off-by: Jan Beulich <jbeulich@suse.com>
mwait-idle: support for Intel Xeon Phi Processor x200 Product Family

Enables "Intel(R) Xeon Phi(TM) Processor x200 Product Family" support,
formerly code-named KNL. It is based on modified Intel Atom Silvermont
microarchitecture.

Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
[micah.barany@intel.com: adjusted values of residency and latency]
Signed-off-by: Micah Barany <micah.barany@intel.com>
[Linux commit: 281baf7a702693deaa45c98ef0c5161006b48257]
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/cpu/mwait-idle.c
+++ b/xen/arch/x86/cpu/mwait-idle.c
@@ -574,6 +574,22 @@ static const struct cpuidle_state avn_cs
 	{}
 };
 
+static const struct cpuidle_state knl_cstates[] = {
+	{
+		.name = "C1-KNL",
+		.flags = MWAIT2flg(0x00),
+		.exit_latency = 1,
+		.target_residency = 2,
+	},
+	{
+		.name = "C6-KNL",
+		.flags = MWAIT2flg(0x10) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 120,
+		.target_residency = 500,
+	},
+	{}
+};
+
 static void mwait_idle(void)
 {
 	unsigned int cpu = smp_processor_id();
@@ -748,6 +764,10 @@ static const struct idle_cpu idle_cpu_av
 	.disable_promotion_to_c1e = 1,
 };
 
+static const struct idle_cpu idle_cpu_knl = {
+	.state_table = knl_cstates,
+};
+
 #define ICPU(model, cpu) \
     { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MONITOR, \
         &idle_cpu_##cpu}
@@ -780,6 +800,7 @@ static const struct x86_cpu_id intel_idl
 	ICPU(0x56, bdw),
 	ICPU(0x4e, skl),
 	ICPU(0x5e, skl),
+	ICPU(0x57, knl),
 	{}
 };
diff mbox

Patch

--- a/xen/arch/x86/cpu/mwait-idle.c
+++ b/xen/arch/x86/cpu/mwait-idle.c
@@ -574,6 +574,22 @@  static const struct cpuidle_state avn_cs
 	{}
 };
 
+static const struct cpuidle_state knl_cstates[] = {
+	{
+		.name = "C1-KNL",
+		.flags = MWAIT2flg(0x00),
+		.exit_latency = 1,
+		.target_residency = 2,
+	},
+	{
+		.name = "C6-KNL",
+		.flags = MWAIT2flg(0x10) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 120,
+		.target_residency = 500,
+	},
+	{}
+};
+
 static void mwait_idle(void)
 {
 	unsigned int cpu = smp_processor_id();
@@ -748,6 +764,10 @@  static const struct idle_cpu idle_cpu_av
 	.disable_promotion_to_c1e = 1,
 };
 
+static const struct idle_cpu idle_cpu_knl = {
+	.state_table = knl_cstates,
+};
+
 #define ICPU(model, cpu) \
     { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MONITOR, \
         &idle_cpu_##cpu}
@@ -780,6 +800,7 @@  static const struct x86_cpu_id intel_idl
 	ICPU(0x56, bdw),
 	ICPU(0x4e, skl),
 	ICPU(0x5e, skl),
+	ICPU(0x57, knl),
 	{}
 };