]> err.no Git - linux-2.6/commitdiff
[CPUFREQ] fix cpuinfo_cur_freq for CPU_HW_PSTATE
authorJoachim Deguara <joachim.deguara@amd.com>
Tue, 30 Jan 2007 15:53:54 +0000 (16:53 +0100)
committerDave Jones <davej@redhat.com>
Sat, 3 Feb 2007 22:25:19 +0000 (17:25 -0500)
This fixes the cpuinfo_cur_freq value by using the correct
find_khz_freq_from_fiddid() when the CPU uses hardware p-states.

Signed-off-by: Joachim Deguara <joachim.deguara@amd.com>
Acked-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Dave Jones <davej@redhat.com>
arch/i386/kernel/cpu/cpufreq/powernow-k8.c

index 2d64916725592dd98d69faf36df2d6bd14d284f3..fe3b67005ebbb1d04ea17c20e804b47cf8cede7e 100644 (file)
@@ -1289,7 +1289,11 @@ static unsigned int powernowk8_get (unsigned int cpu)
        if (query_current_values_with_pending_wait(data))
                goto out;
 
-       khz = find_khz_freq_from_fid(data->currfid);
+       if (cpu_family == CPU_HW_PSTATE)
+               khz = find_khz_freq_from_fiddid(data->currfid, data->currdid);
+       else
+               khz = find_khz_freq_from_fid(data->currfid);
+
 
 out:
        set_cpus_allowed(current, oldmask);