diff options
author | Andi Kleen <ak@suse.de> | 2005-04-16 18:25:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:25:05 -0400 |
commit | c29601e9c1e7893d1755364e350c9188bd56d69f (patch) | |
tree | 14813ddce4d8897b40cc8b3a2f76ace3ac58b36f /arch/x86_64/kernel/time.c | |
parent | dc37db4d8cb376bb67c6357c50d707ced3d71c39 (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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 3bafe438fa75..c7a1b50b4af3 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, | |||
614 | struct cpufreq_freqs *freq = data; | 614 | struct cpufreq_freqs *freq = data; |
615 | unsigned long *lpj, dummy; | 615 | unsigned long *lpj, dummy; |
616 | 616 | ||
617 | if (cpu_has(&cpu_data[freq->cpu], X86_FEATURE_CONSTANT_TSC)) | ||
618 | return 0; | ||
619 | |||
617 | lpj = &dummy; | 620 | lpj = &dummy; |
618 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) | 621 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) |
619 | #ifdef CONFIG_SMP | 622 | #ifdef CONFIG_SMP |
@@ -622,8 +625,6 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | |||
622 | lpj = &boot_cpu_data.loops_per_jiffy; | 625 | lpj = &boot_cpu_data.loops_per_jiffy; |
623 | #endif | 626 | #endif |
624 | 627 | ||
625 | |||
626 | |||
627 | if (!ref_freq) { | 628 | if (!ref_freq) { |
628 | ref_freq = freq->old; | 629 | ref_freq = freq->old; |
629 | loops_per_jiffy_ref = *lpj; | 630 | loops_per_jiffy_ref = *lpj; |