From: "Jan Beulich" Subject: [PATCH 3/3] mwait-idle: add support for the Airmont Core in the Cherrytrail and Braswell SOCs Date: Mon, 18 May 2015 13:55:42 +0100 Message-ID: <5559FD6E020000780007B1FD@mail.emea.novell.com> References: <5559FBFF020000780007B1DA@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartDBEFDA5E.1__=" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YuKaB-0005DT-4R for xen-devel@lists.xenproject.org; Mon, 18 May 2015 12:55:47 +0000 In-Reply-To: <5559FBFF020000780007B1DA@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: Andrew Cooper , 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. --=__PartDBEFDA5E.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Support C-states for the Airmont core in the Cherrytrail and Braswell = SOCs. The states are similar to those of Silvermont in Baytrail, except both flavors of C6 states are faster. Signed-off-by: Len Brown [Linux commit cab07a5652d1d124b505c2b7ed21c6823295c5d7] Signed-off-by: Jan Beulich --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -222,6 +222,40 @@ static const struct cpuidle_state byt_cs {} }; =20 +static const struct cpuidle_state cht_cstates[] =3D { + { + .name =3D "C1-CHT", + .flags =3D MWAIT2flg(0x00), + .exit_latency =3D 1, + .target_residency =3D 1, + }, + { + .name =3D "C6N-CHT", + .flags =3D MWAIT2flg(0x58) | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency =3D 80, + .target_residency =3D 275, + }, + { + .name =3D "C6S-CHT", + .flags =3D MWAIT2flg(0x52) | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency =3D 200, + .target_residency =3D 560, + }, + { + .name =3D "C7-CHT", + .flags =3D MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency =3D 1200, + .target_residency =3D 4000, + }, + { + .name =3D "C7S-CHT", + .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", @@ -625,6 +659,12 @@ static const struct idle_cpu idle_cpu_by .byt_auto_demotion_disable_flag =3D 1, }; =20 +static const struct idle_cpu idle_cpu_cht =3D { + .state_table =3D cht_cstates, + .disable_promotion_to_c1e =3D 1, + .byt_auto_demotion_disable_flag =3D 1, +}; + static const struct idle_cpu idle_cpu_ivb =3D { .state_table =3D ivb_cstates, .disable_promotion_to_c1e =3D 1, @@ -669,6 +709,7 @@ static struct intel_idle_id { ICPU(0x2d, snb), ICPU(0x36, atom), ICPU(0x37, byt), + ICPU(0x4c, cht), ICPU(0x3a, ivb), ICPU(0x3e, ivt), ICPU(0x3c, hsw), --=__PartDBEFDA5E.1__= Content-Type: text/plain; name="mwait-idle-Cherrytrail.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="mwait-idle-Cherrytrail.patch" mwait-idle: add support for the Airmont Core in the Cherrytrail and = Braswell SOCs=0A=0ASupport C-states for the Airmont core in the Cherrytrail= and Braswell SOCs.=0AThe states are similar to those of Silvermont in = Baytrail,=0Aexcept both flavors of C6 states are faster.=0A=0ASigned-off-by= : Len Brown =0A[Linux commit cab07a5652d1d124b505c2b7e= d21c6823295c5d7]=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@@ = -222,6 +222,40 @@ static const struct cpuidle_state byt_cs=0A {}=0A = };=0A =0A+static const struct cpuidle_state cht_cstates[] =3D {=0A+ = {=0A+ .name =3D "C1-CHT",=0A+ .flags =3D MWAIT2flg(0x00),= =0A+ .exit_latency =3D 1,=0A+ .target_residency = =3D 1,=0A+ },=0A+ {=0A+ .name =3D "C6N-CHT",=0A+ = .flags =3D MWAIT2flg(0x58) | CPUIDLE_FLAG_TLB_FLUSHED,=0A+ = .exit_latency =3D 80,=0A+ .target_residency =3D 275,=0A+ = },=0A+ {=0A+ .name =3D "C6S-CHT",=0A+ .flags =3D = MWAIT2flg(0x52) | CPUIDLE_FLAG_TLB_FLUSHED,=0A+ .exit_latency =3D = 200,=0A+ .target_residency =3D 560,=0A+ },=0A+ {=0A+ = .name =3D "C7-CHT",=0A+ .flags =3D MWAIT2flg(0x60) | CPUIDLE_FLAG_T= LB_FLUSHED,=0A+ .exit_latency =3D 1200,=0A+ .target_res= idency =3D 4000,=0A+ },=0A+ {=0A+ .name =3D "C7S-CHT",=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@@ -625,6 +659,12 @@ = static const struct idle_cpu idle_cpu_by=0A .byt_auto_demotion_disable_= flag =3D 1,=0A };=0A =0A+static const struct idle_cpu idle_cpu_cht =3D = {=0A+ .state_table =3D cht_cstates,=0A+ .disable_promotion_to_c1e = =3D 1,=0A+ .byt_auto_demotion_disable_flag =3D 1,=0A+};=0A+=0A static = const struct idle_cpu idle_cpu_ivb =3D {=0A .state_table =3D ivb_cstate= s,=0A .disable_promotion_to_c1e =3D 1,=0A@@ -669,6 +709,7 @@ static = struct intel_idle_id {=0A ICPU(0x2d, snb),=0A ICPU(0x36, = atom),=0A ICPU(0x37, byt),=0A+ ICPU(0x4c, cht),=0A ICPU(0x3a, = ivb),=0A ICPU(0x3e, ivt),=0A ICPU(0x3c, hsw),=0A --=__PartDBEFDA5E.1__= 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 --=__PartDBEFDA5E.1__=--