aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/kernel/time.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-04-16 15:25:05 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:25:05 -0700
commitc29601e9c1e7893d1755364e350c9188bd56d69f (patch)
tree14813ddce4d8897b40cc8b3a2f76ace3ac58b36f /arch/x86_64/kernel/time.c
parentdc37db4d8cb376bb67c6357c50d707ced3d71c39 (diff)
[PATCH] x86_64: Support constantly ticking TSCs
On Intel Noconas the TSC ticks with a constant frequency. Don't scale the factor used by udelay when cpufreq changes the frequency. This generalizes an earlier patch by Intel for this. Cc: <venkatesh.pallipadi@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/time.c')
-rw-r--r--arch/x86_64/kernel/time.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index 3bafe438fa7..c7a1b50b4af 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -614,6 +614,9 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
struct cpufreq_freqs *freq = data;
unsigned long *lpj, dummy;
+ if (cpu_has(&cpu_data[freq->cpu], X86_FEATURE_CONSTANT_TSC))
+ return 0;
+
lpj = &dummy;
if (!(freq->flags & CPUFREQ_CONST_LOOPS))
#ifdef CONFIG_SMP
@@ -622,8 +625,6 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
lpj = &boot_cpu_data.loops_per_jiffy;
#endif
-
-
if (!ref_freq) {
ref_freq = freq->old;
loops_per_jiffy_ref = *lpj;