[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86/mwait_idle: support Haswell



commit 96ef6e88359910738905ac2e1969dc05d7d7e7dc
Author:     Len Brown <len.brown@xxxxxxxxx>
AuthorDate: Mon Apr 22 14:04:07 2013 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Apr 22 14:04:07 2013 +0200

    x86/mwait_idle: support Haswell
    
    This patch enables intel_idle to run on the next-generation Intel(R)
    Microarchitecture code named "Haswell".
    
    Signed-off-by: Len Brown <len.brown@xxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 xen/arch/x86/cpu/mwait-idle.c |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/cpu/mwait-idle.c b/xen/arch/x86/cpu/mwait-idle.c
index 111c149..e0c9707 100644
--- a/xen/arch/x86/cpu/mwait-idle.c
+++ b/xen/arch/x86/cpu/mwait-idle.c
@@ -200,6 +200,34 @@ static const struct cpuidle_state 
ivb_cstates[MWAIT_MAX_NUM_CSTATES] = {
        }
 };
 
+static const struct cpuidle_state hsw_cstates[MWAIT_MAX_NUM_CSTATES] = {
+       { /* MWAIT C0 */ },
+       { /* MWAIT C1 */
+               .name = "C1-HSW",
+               .flags = MWAIT2flg(0x00),
+               .exit_latency = 2,
+               .target_residency = 2,
+       },
+       { /* MWAIT C2 */
+               .name = "C3-HSW",
+               .flags = MWAIT2flg(0x10) | CPUIDLE_FLAG_TLB_FLUSHED,
+               .exit_latency = 33,
+               .target_residency = 100,
+       },
+       { /* MWAIT C3 */
+               .name = "C6-HSW",
+               .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED,
+               .exit_latency = 133,
+               .target_residency = 400,
+       },
+       { /* MWAIT C4 */
+               .name = "C7s-HSW",
+               .flags = MWAIT2flg(0x32) | CPUIDLE_FLAG_TLB_FLUSHED,
+               .exit_latency = 166,
+               .target_residency = 500,
+       },
+};
+
 static const struct cpuidle_state atom_cstates[MWAIT_MAX_NUM_CSTATES] = {
        { /* MWAIT C0 */ },
        { /* MWAIT C1 */
@@ -348,6 +376,10 @@ static const struct idle_cpu idle_cpu_ivb = {
        .state_table = ivb_cstates,
 };
 
+static const struct idle_cpu idle_cpu_hsw = {
+       .state_table = hsw_cstates,
+};
+
 #define ICPU(model, cpu) { 6, model, &idle_cpu_##cpu }
 
 static struct intel_idle_id {
@@ -367,6 +399,10 @@ static struct intel_idle_id {
        ICPU(0x2d, snb),
        ICPU(0x3a, ivb),
        ICPU(0x3e, ivb),
+       ICPU(0x3c, hsw),
+       ICPU(0x3f, hsw),
+       ICPU(0x45, hsw),
+       ICPU(0x46, hsw),
        {}
 };
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.