summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/pvclock.c
diff options
context:
space:
mode:
authorZachary Amsden <zamsden@redhat.com>2010-08-19 22:07:29 -1000
committerAvi Kivity <avi@redhat.com>2010-10-24 10:51:24 +0200
commit347bb4448c2155eb2310923ccaa4be5677649003 (patch)
tree93f5592975413c00c6c647001d715324e27cf985 /arch/x86/kernel/pvclock.c
parentca84d1a24c376e0841f35db08dab7b829c8c0b1e (diff)
x86: pvclock: Move scale_delta into common header
The scale_delta function for shift / multiply with 31-bit precision moves to a common header so it can be used by both kernel and kvm module. Signed-off-by: Zachary Amsden <zamsden@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kernel/pvclock.c')
-rw-r--r--arch/x86/kernel/pvclock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c
index 239427ca02a..bab3b9e6f66 100644
--- a/arch/x86/kernel/pvclock.c
+++ b/arch/x86/kernel/pvclock.c
@@ -82,7 +82,8 @@ static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift)
static u64 pvclock_get_nsec_offset(struct pvclock_shadow_time *shadow)
{
u64 delta = native_read_tsc() - shadow->tsc_timestamp;
- return scale_delta(delta, shadow->tsc_to_nsec_mul, shadow->tsc_shift);
+ return pvclock_scale_delta(delta, shadow->tsc_to_nsec_mul,
+ shadow->tsc_shift);
}
/*