From 58389a86df48ff927846df9537ea34d9961b5c44 Mon Sep 17 00:00:00 2001 From: Joachim Deguara Date: Tue, 30 Jan 2007 16:53:54 +0100 Subject: [PATCH] [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 --- arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 2d6491672559..fe3b67005ebb 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); -- 2.39.5