diff options
author | John Stultz <johnstul@us.ibm.com> | 2010-04-26 22:03:05 -0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2011-02-21 16:33:33 -0500 |
commit | b01cc1b0eae0dea19257b29347116505fbedf679 (patch) | |
tree | e9666f32ab07306eca45ff8647eb09338a0cb697 /arch/x86/xen/time.c | |
parent | 36d8593ec74dc04d3bd7c1c897a7b7cfbd0b0dc6 (diff) |
x86: Convert remaining x86 clocksources to clocksource_register_hz/khz
This converts the remaining x86 clocksources to use
clocksource_register_hz/khz.
CC: jacob.jun.pan@intel.com
CC: Glauber Costa <glommer@redhat.com>
CC: Dimitri Sivanich <sivanich@sgi.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Jeremy Fitzhardinge <jeremy@xensource.com>
CC: Chris McDermott <lcm@us.ibm.com>
CC: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> [xen]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Diffstat (limited to 'arch/x86/xen/time.c')
-rw-r--r-- | arch/x86/xen/time.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index 067759e3d6a5..04e11597a8c5 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c | |||
@@ -26,8 +26,6 @@ | |||
26 | 26 | ||
27 | #include "xen-ops.h" | 27 | #include "xen-ops.h" |
28 | 28 | ||
29 | #define XEN_SHIFT 22 | ||
30 | |||
31 | /* Xen may fire a timer up to this many ns early */ | 29 | /* Xen may fire a timer up to this many ns early */ |
32 | #define TIMER_SLOP 100000 | 30 | #define TIMER_SLOP 100000 |
33 | #define NS_PER_TICK (1000000000LL / HZ) | 31 | #define NS_PER_TICK (1000000000LL / HZ) |
@@ -211,8 +209,6 @@ static struct clocksource xen_clocksource __read_mostly = { | |||
211 | .rating = 400, | 209 | .rating = 400, |
212 | .read = xen_clocksource_get_cycles, | 210 | .read = xen_clocksource_get_cycles, |
213 | .mask = ~0, | 211 | .mask = ~0, |
214 | .mult = 1<<XEN_SHIFT, /* time directly in nanoseconds */ | ||
215 | .shift = XEN_SHIFT, | ||
216 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 212 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
217 | }; | 213 | }; |
218 | 214 | ||
@@ -446,7 +442,7 @@ static __init void xen_time_init(void) | |||
446 | int cpu = smp_processor_id(); | 442 | int cpu = smp_processor_id(); |
447 | struct timespec tp; | 443 | struct timespec tp; |
448 | 444 | ||
449 | clocksource_register(&xen_clocksource); | 445 | clocksource_register_hz(&xen_clocksource, NSEC_PER_SEC); |
450 | 446 | ||
451 | if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL) == 0) { | 447 | if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL) == 0) { |
452 | /* Successfully turned off 100Hz tick, so we have the | 448 | /* Successfully turned off 100Hz tick, so we have the |