Skip to content

Commit

Permalink
[CPUFREQ][7/8] acpi-cpufreq: Fix get of current frequency breakage
Browse files Browse the repository at this point in the history
Recent speedstep-centrino unification onto acpi-cpufreq patchset broke
cpuinfo_cur_freq interface in /sys/../cpuinfo/, when MSR was used for
transitions. Attached patch fixes that breakage.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
  • Loading branch information
Venkatesh Pallipadi authored and Dave Jones committed Oct 15, 2006
1 parent 7650b28 commit a6f6e6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ static unsigned extract_io(u32 value, struct acpi_cpufreq_data *data)
static unsigned extract_msr(u32 msr, struct acpi_cpufreq_data *data)
{
int i;
struct acpi_processor_performance *perf;

msr &= INTEL_MSR_RANGE;
perf = data->acpi_data;

for (i = 0; data->freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
if (msr == data->freq_table[i].index)
if (msr == perf->states[data->freq_table[i].index].status)
return data->freq_table[i].frequency;
}
return data->freq_table[0].frequency;
Expand Down

0 comments on commit a6f6e6e

Please sign in to comment.