Commit 88a5ac89 authored by Harvey Harrison's avatar Harvey Harrison Committed by Thomas Gleixner

x86: fix sparse warning in xen/time.c

Use xen_khz to denote xen_specific clock speed.  Avoid shadowing
cpu_khz.

arch/x86/xen/time.c:220:6: warning: symbol 'cpu_khz' shadows an earlier one
include/asm/tsc.h:17:21: originally declared here
Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 3406c158
...@@ -217,17 +217,17 @@ unsigned long long xen_sched_clock(void) ...@@ -217,17 +217,17 @@ unsigned long long xen_sched_clock(void)
/* Get the CPU speed from Xen */ /* Get the CPU speed from Xen */
unsigned long xen_cpu_khz(void) unsigned long xen_cpu_khz(void)
{ {
u64 cpu_khz = 1000000ULL << 32; u64 xen_khz = 1000000ULL << 32;
const struct vcpu_time_info *info = const struct vcpu_time_info *info =
&HYPERVISOR_shared_info->vcpu_info[0].time; &HYPERVISOR_shared_info->vcpu_info[0].time;
do_div(cpu_khz, info->tsc_to_system_mul); do_div(xen_khz, info->tsc_to_system_mul);
if (info->tsc_shift < 0) if (info->tsc_shift < 0)
cpu_khz <<= -info->tsc_shift; xen_khz <<= -info->tsc_shift;
else else
cpu_khz >>= info->tsc_shift; xen_khz >>= info->tsc_shift;
return cpu_khz; return xen_khz;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment