diff options
Diffstat (limited to 'arch/x86/kernel/tsc.c')
-rw-r--r-- | arch/x86/kernel/tsc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 3e1c057e98fe..b0597ad02c93 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/clocksource.h> | 10 | #include <linux/clocksource.h> |
11 | #include <linux/percpu.h> | 11 | #include <linux/percpu.h> |
12 | #include <linux/timex.h> | ||
12 | 13 | ||
13 | #include <asm/hpet.h> | 14 | #include <asm/hpet.h> |
14 | #include <asm/timer.h> | 15 | #include <asm/timer.h> |
@@ -631,17 +632,15 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | |||
631 | void *data) | 632 | void *data) |
632 | { | 633 | { |
633 | struct cpufreq_freqs *freq = data; | 634 | struct cpufreq_freqs *freq = data; |
634 | unsigned long *lpj, dummy; | 635 | unsigned long *lpj; |
635 | 636 | ||
636 | if (cpu_has(&cpu_data(freq->cpu), X86_FEATURE_CONSTANT_TSC)) | 637 | if (cpu_has(&cpu_data(freq->cpu), X86_FEATURE_CONSTANT_TSC)) |
637 | return 0; | 638 | return 0; |
638 | 639 | ||
639 | lpj = &dummy; | 640 | lpj = &boot_cpu_data.loops_per_jiffy; |
640 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) | ||
641 | #ifdef CONFIG_SMP | 641 | #ifdef CONFIG_SMP |
642 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) | ||
642 | lpj = &cpu_data(freq->cpu).loops_per_jiffy; | 643 | lpj = &cpu_data(freq->cpu).loops_per_jiffy; |
643 | #else | ||
644 | lpj = &boot_cpu_data.loops_per_jiffy; | ||
645 | #endif | 644 | #endif |
646 | 645 | ||
647 | if (!ref_freq) { | 646 | if (!ref_freq) { |