aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/tsc_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/tsc_32.c')
-rw-r--r--arch/x86/kernel/tsc_32.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c
index 68657d8526fb..3d7e6e9fa6c2 100644
--- a/arch/x86/kernel/tsc_32.c
+++ b/arch/x86/kernel/tsc_32.c
@@ -84,8 +84,8 @@ DEFINE_PER_CPU(unsigned long, cyc2ns);
84 84
85static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu) 85static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
86{ 86{
87 unsigned long flags, prev_scale, *scale;
88 unsigned long long tsc_now, ns_now; 87 unsigned long long tsc_now, ns_now;
88 unsigned long flags, *scale;
89 89
90 local_irq_save(flags); 90 local_irq_save(flags);
91 sched_clock_idle_sleep_event(); 91 sched_clock_idle_sleep_event();
@@ -95,7 +95,6 @@ static void set_cyc2ns_scale(unsigned long cpu_khz, int cpu)
95 rdtscll(tsc_now); 95 rdtscll(tsc_now);
96 ns_now = __cycles_2_ns(tsc_now); 96 ns_now = __cycles_2_ns(tsc_now);
97 97
98 prev_scale = *scale;
99 if (cpu_khz) 98 if (cpu_khz)
100 *scale = (NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR)/cpu_khz; 99 *scale = (NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR)/cpu_khz;
101 100