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

[Xen-devel] [PATCH] xen/powernow: allow using lowest-power P-state



The MSR field used here indicates the highest numbered valid P-state,
not the first invalid one.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2008-09-01/xen/arch/x86/acpi/cpufreq/powernow.c
===================================================================
--- 2008-09-01.orig/xen/arch/x86/acpi/cpufreq/powernow.c        2008-07-18 
16:19:34.000000000 +0200
+++ 2008-09-01/xen/arch/x86/acpi/cpufreq/powernow.c     2008-09-08 
14:46:12.000000000 +0200
@@ -197,8 +197,8 @@ static int powernow_cpufreq_cpu_init(str
 
     data->max_freq = perf->states[0].core_frequency * 1000;
     /* table init */
-    for (i=0; i<perf->state_count && i<max_hw_pstate; i++) {
-        if (i>0 && perf->states[i].core_frequency >=
+    for (i = 0; i < perf->state_count && i <= max_hw_pstate; i++) {
+        if (i > 0 && perf->states[i].core_frequency >=
             data->freq_table[valid_states-1].frequency / 1000)
             continue;
 




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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