aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
diff options
context:
space:
mode:
authorMatthias-Christian Ott <ott@mirix.org>2009-02-20 20:52:17 -0500
committerDave Jones <davej@redhat.com>2009-02-24 22:47:32 -0500
commit199785eac892a1fa1b71cc22bec58e8b156d9311 (patch)
tree8e200f33cba62afb37a36d297b2a0224c7b8345b /arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
parent0cb8bc256093e716d2a0a4a721f36c625a3f7634 (diff)
[CPUFREQ] p4-clockmod reports wrong frequency.
http://bugzilla.kernel.org/show_bug.cgi?id=10968 [ Updated for current tree, and fixed compile failure when p4-clockmod was built modular -- davej] From: Matthias-Christian Ott <ott@mirix.org> Signed-off-by: Dominik Brodowski <linux@brodo.de> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq/p4-clockmod.c')
-rw-r--r--arch/x86/kernel/cpu/cpufreq/p4-clockmod.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
index 46a2a7a53148..1778402305e0 100644
--- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
+++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
@@ -31,6 +31,7 @@
31 31
32#include <asm/processor.h> 32#include <asm/processor.h>
33#include <asm/msr.h> 33#include <asm/msr.h>
34#include <asm/timer.h>
34 35
35#include "speedstep-lib.h" 36#include "speedstep-lib.h"
36 37
@@ -224,6 +225,12 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
224 dprintk("has errata -- disabling low frequencies\n"); 225 dprintk("has errata -- disabling low frequencies\n");
225 } 226 }
226 227
228 if (speedstep_detect_processor() == SPEEDSTEP_CPU_P4D &&
229 c->x86_model < 2) {
230 /* switch to maximum frequency and measure result */
231 cpufreq_p4_setdc(policy->cpu, DC_DISABLE);
232 recalibrate_cpu_khz();
233 }
227 /* get max frequency */ 234 /* get max frequency */
228 stock_freq = cpufreq_p4_get_frequency(c); 235 stock_freq = cpufreq_p4_get_frequency(c);
229 if (!stock_freq) 236 if (!stock_freq)