Skip to contentSkip to conversation

x86/mwait_idle: support Intel Atom Processor C2000 product family

PATCH In review Jan Beulich 1 participant 2 messages Mar 5, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/mwait_idle: support Intel Atom Processor C2000 product family

From: Len Brown <[email protected]>

Support the "Intel(R) Atom(TM) Processor C2000 Product Family", formerly code-named Avoton. It is based on the next generation Intel Atom processor architecture, formerly code-named Silvermont.

xen/arch/x86/cpu/mwait-idle.c +23 -1
@@ -1,7 +1,7 @@
 /*
  * mwait_idle.c - native hardware idle loop for modern processors
  *
- * Copyright (c) 2010, Intel Corporation.
+ * Copyright (c) 2013, Intel Corporation.
  * Len Brown <[email protected]>
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -301,6 +301,22 @@ static const struct cpuidle_state atom_c
 	{}
 };
 
+static const struct cpuidle_state avn_cstates[] = {
+	{
+		.name = "C1-AVN",
+		.flags = MWAIT2flg(0x00),
+		.exit_latency = 2,
+		.target_residency = 2,
+	},
+	{
+		.name = "C6-AVN",
+		.flags = MWAIT2flg(0x51) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 15,
+		.target_residency = 45,
+	},
+	{}
+};
+
 static void mwait_idle(void)
 {
 	unsigned int cpu = smp_processor_id();
@@ -436,6 +452,11 @@ static const struct idle_cpu idle_cpu_hs
 	.disable_promotion_to_c1e = 1,
 };
 
+static const struct idle_cpu idle_cpu_avn = {
+	.state_table = avn_cstates,
+	.disable_promotion_to_c1e = 1,
+};
+
 #define ICPU(model, cpu) { 6, model, &idle_cpu_##cpu }
 
 static struct intel_idle_id {
@@ -459,6 +480,7 @@ static struct intel_idle_id {
 	ICPU(0x3f, hsw),
 	ICPU(0x45, hsw),
 	ICPU(0x46, hsw),
+	ICPU(0x4d, avn),
 	{}
 };
 

From: Len Brown <[email protected]>

x86/mwait_idle: support Intel Atom Processor C2000 product family

Support the "Intel(R) Atom(TM) Processor C2000 Product Family", formerly code-named Avoton. It is based on the next generation Intel Atom processor architecture, formerly code-named Silvermont.

xen/arch/x86/cpu/mwait-idle.c +23 -1
@@ -1,7 +1,7 @@
 /*
  * mwait_idle.c - native hardware idle loop for modern processors
  *
- * Copyright (c) 2010, Intel Corporation.
+ * Copyright (c) 2013, Intel Corporation.
  * Len Brown <[email protected]>
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -301,6 +301,22 @@ static const struct cpuidle_state atom_c
 	{}
 };
 
+static const struct cpuidle_state avn_cstates[] = {
+	{
+		.name = "C1-AVN",
+		.flags = MWAIT2flg(0x00),
+		.exit_latency = 2,
+		.target_residency = 2,
+	},
+	{
+		.name = "C6-AVN",
+		.flags = MWAIT2flg(0x51) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 15,
+		.target_residency = 45,
+	},
+	{}
+};
+
 static void mwait_idle(void)
 {
 	unsigned int cpu = smp_processor_id();
@@ -436,6 +452,11 @@ static const struct idle_cpu idle_cpu_hs
 	.disable_promotion_to_c1e = 1,
 };
 
+static const struct idle_cpu idle_cpu_avn = {
+	.state_table = avn_cstates,
+	.disable_promotion_to_c1e = 1,
+};
+
 #define ICPU(model, cpu) { 6, model, &idle_cpu_##cpu }
 
 static struct intel_idle_id {
@@ -459,6 +480,7 @@ static struct intel_idle_id {
 	ICPU(0x3f, hsw),
 	ICPU(0x45, hsw),
 	ICPU(0x46, hsw),
+	ICPU(0x4d, avn),
 	{}
 };
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw
Quoted 9 lines
Quoted 1 line
Quoted 1 line · Jan Beulich

From: Len Brown <[email protected]>

Support the "Intel(R) Atom(TM) Processor C2000 Product Family", formerly code-named Avoton. It is based on the next generation Intel Atom processor architecture, formerly code-named Silvermont.

This, for the record, was the only change actively missing from our cloned implementation, i.e. we'd then be up-to-date again with upstream Linux.

Jan