The MSR field used here indicates the highest numbered valid P-state,
not the first invalid one.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
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;