x86: kvm: Use ktime_get_boot_ns()
authorThomas Gleixner <tglx@linutronix.de>
Wed, 16 Jul 2014 21:04:52 +0000 (21:04 +0000)
committerJohn Stultz <john.stultz@linaro.org>
Wed, 23 Jul 2014 22:01:45 +0000 (15:01 -0700)
Use the new nanoseconds based interface and get rid of the timespec
conversion dance.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
arch/x86/kvm/x86.c

index f6449334ec4514741f7f79481e419d30442d1ac2..65c430512132de6f77d36910bec86f00f1712481 100644 (file)
@@ -1109,11 +1109,7 @@ static void kvm_get_time_scale(uint32_t scaled_khz, uint32_t base_khz,
 
 static inline u64 get_kernel_ns(void)
 {
-       struct timespec ts;
-
-       ktime_get_ts(&ts);
-       monotonic_to_bootbased(&ts);
-       return timespec_to_ns(&ts);
+       return ktime_get_boot_ns();
 }
 
 #ifdef CONFIG_X86_64