From: Joachim Deguara Date: Tue, 30 Jan 2007 15:53:54 +0000 (+0100) Subject: [CPUFREQ] fix cpuinfo_cur_freq for CPU_HW_PSTATE X-Git-Tag: v2.6.21-rc1~95^2~17 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58389a86df48ff927846df9537ea34d9961b5c44;p=linux-2.6 [CPUFREQ] fix cpuinfo_cur_freq for CPU_HW_PSTATE 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 Acked-by: Mark Langsdorf Signed-off-by: Dave Jones --- diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 2d64916725..fe3b67005e 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -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);