Skip to contentSkip to conversation

xen/powernow: allow using lowest-power P-state

PATCH New Jan Beulich 1 participant 1 message Sep 8, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

xen/arch/x86/acpi/cpufreq/powernow.c +2 -2
Index: 2008-09-01/xen/arch/x86/acpi/cpufreq/powernow.c
===================================================================
@@ -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;