From: "Jan Beulich" Subject: [PATCH 2/4] mwait-idle: support Bay Trail Date: Thu, 26 Jun 2014 11:20:31 +0100 Message-ID: <53AC100F020000780001D8AA@mail.emea.novell.com> References: <53AC0ED0020000780001D883@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part9CAE69FF.0__=" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X06n9-0007KI-Gt for xen-devel@lists.xenproject.org; Thu, 26 Jun 2014 10:20:31 +0000 In-Reply-To: <53AC0ED0020000780001D883@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part9CAE69FF.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline From: Len Brown Bay Trail (BYT) is a family of Silvermont-core Atom Processor SOCs, including the Intel Atom Processor Z36xxx and Z37xxx Series. Although it shares the Silvermont core with Avoton, BYT is optimized for mobile, and thus it supports different power saving CPU idle states. Note that not all versions of Bay Trail HW support all of the states listed in the driver. Signed-off-by: Len Brown Tested-by: Aubrey Li Signed-off-by: Jan Beulich --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -187,6 +187,46 @@ static const struct cpuidle_state snb_cs {} }; =20 +static const struct cpuidle_state byt_cstates[] =3D { + { + .name =3D "C1-BYT", + .flags =3D MWAIT2flg(0x00), + .exit_latency =3D 1, + .target_residency =3D 1, + }, + { + .name =3D "C1E-BYT", + .flags =3D MWAIT2flg(0x01), + .exit_latency =3D 15, + .target_residency =3D 30, + }, + { + .name =3D "C6N-BYT", + .flags =3D MWAIT2flg(0x58) | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency =3D 40, + .target_residency =3D 275, + }, + { + .name =3D "C6S-BYT", + .flags =3D MWAIT2flg(0x52) | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency =3D 140, + .target_residency =3D 560, + }, + { + .name =3D "C7-BYT", + .flags =3D MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency =3D 1200, + .target_residency =3D 1500, + }, + { + .name =3D "C7S-BYT", + .flags =3D MWAIT2flg(0x64) | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency =3D 10000, + .target_residency =3D 20000, + }, + {} +}; + static const struct cpuidle_state ivb_cstates[] =3D { { .name =3D "C1-IVB", @@ -444,6 +484,11 @@ static const struct idle_cpu idle_cpu_sn .disable_promotion_to_c1e =3D 1, }; =20 +static const struct idle_cpu idle_cpu_byt =3D { + .state_table =3D byt_cstates, + .disable_promotion_to_c1e =3D 1, +}; + static const struct idle_cpu idle_cpu_ivb =3D { .state_table =3D ivb_cstates, .disable_promotion_to_c1e =3D 1, @@ -476,6 +521,7 @@ static struct intel_idle_id { ICPU(0x26, lincroft), ICPU(0x2a, snb), ICPU(0x2d, snb), + ICPU(0x37, byt), ICPU(0x3a, ivb), ICPU(0x3e, ivb), ICPU(0x3c, hsw), --=__Part9CAE69FF.0__= Content-Type: text/plain; name="x86-mwait-Baytrail.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-mwait-Baytrail.patch" mwait-idle: support Bay Trail=0A=0ABay Trail (BYT) is a family of = Silvermont-core Atom Processor SOCs,=0Aincluding the Intel Atom Processor = Z36xxx and Z37xxx Series.=0A=0AAlthough it shares the Silvermont core with = Avoton,=0ABYT is optimized for mobile, and thus it supports=0Adifferent = power saving CPU idle states.=0A=0ANote that not all versions of Bay Trail = HW support all=0Aof the states listed in the driver.=0A=0ASigned-off-by: = Len Brown =0ATested-by: Aubrey Li =0ASigned-off-by: Jan Beulich =0A=0A--- = a/xen/arch/x86/cpu/mwait-idle.c=0A+++ b/xen/arch/x86/cpu/mwait-idle.c=0A@@ = -187,6 +187,46 @@ static const struct cpuidle_state snb_cs=0A {}=0A = };=0A =0A+static const struct cpuidle_state byt_cstates[] =3D {=0A+ = {=0A+ .name =3D "C1-BYT",=0A+ .flags =3D MWAIT2flg(0x00),= =0A+ .exit_latency =3D 1,=0A+ .target_residency = =3D 1,=0A+ },=0A+ {=0A+ .name =3D "C1E-BYT",=0A+ = .flags =3D MWAIT2flg(0x01),=0A+ .exit_latency =3D 15,=0A+ = .target_residency =3D 30,=0A+ },=0A+ {=0A+ .name =3D = "C6N-BYT",=0A+ .flags =3D MWAIT2flg(0x58) | CPUIDLE_FLAG_TLB_FLUSH= ED,=0A+ .exit_latency =3D 40,=0A+ .target_residency = =3D 275,=0A+ },=0A+ {=0A+ .name =3D "C6S-BYT",=0A+ = .flags =3D MWAIT2flg(0x52) | CPUIDLE_FLAG_TLB_FLUSHED,=0A+ = .exit_latency =3D 140,=0A+ .target_residency =3D 560,=0A+ = },=0A+ {=0A+ .name =3D "C7-BYT",=0A+ .flags =3D = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED,=0A+ .exit_latency =3D = 1200,=0A+ .target_residency =3D 1500,=0A+ },=0A+ {=0A+ = .name =3D "C7S-BYT",=0A+ .flags =3D MWAIT2flg(0x64) | = CPUIDLE_FLAG_TLB_FLUSHED,=0A+ .exit_latency =3D 10000,=0A+ = .target_residency =3D 20000,=0A+ },=0A+ {}=0A+};=0A+=0A static = const struct cpuidle_state ivb_cstates[] =3D {=0A {=0A = .name =3D "C1-IVB",=0A@@ -444,6 +484,11 @@ static const struct idle_cpu = idle_cpu_sn=0A .disable_promotion_to_c1e =3D 1,=0A };=0A =0A+static const = struct idle_cpu idle_cpu_byt =3D {=0A+ .state_table =3D byt_cstates,=0A+ = .disable_promotion_to_c1e =3D 1,=0A+};=0A+=0A static const struct idle_cpu = idle_cpu_ivb =3D {=0A .state_table =3D ivb_cstates,=0A .disable_pr= omotion_to_c1e =3D 1,=0A@@ -476,6 +521,7 @@ static struct intel_idle_id = {=0A ICPU(0x26, lincroft),=0A ICPU(0x2a, snb),=0A ICPU(0x2d, = snb),=0A+ ICPU(0x37, byt),=0A ICPU(0x3a, ivb),=0A ICPU(0x3e, = ivb),=0A ICPU(0x3c, hsw),=0A --=__Part9CAE69FF.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__Part9CAE69FF.0__=--