summaryrefslogtreecommitdiff
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorZachary Amsden <zamsden@redhat.com>2010-08-20 08:07:29 (GMT)
committerAvi Kivity <avi@redhat.com>2010-10-24 08:51:24 (GMT)
commit347bb4448c2155eb2310923ccaa4be5677649003 (patch)
tree93f5592975413c00c6c647001d715324e27cf985 /arch/x86/kernel
parentca84d1a24c376e0841f35db08dab7b829c8c0b1e (diff)
downloadlinux-347bb4448c2155eb2310923ccaa4be5677649003.tar.xz
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')
-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 239427c..bab3b9e 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);
}
/*