From: Thomas Gleixner Subject: [patch V2 43/64] x86: kvm: Use ktime_get_boot_ns() Date: Wed, 16 Jul 2014 21:04:52 -0000 Message-ID: <20140716205055.838565297@linutronix.de> References: <20140716205018.175419210@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Cc: John Stultz , Peter Zijlstra , Gleb Natapov , kvm@vger.kernel.org To: LKML Return-path: Content-Disposition: inline; filename=x86-kvm-use-ktime.patch Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Use the new nanoseconds based interface and get rid of the timespec conversion dance. Signed-off-by: Thomas Gleixner Cc: Gleb Natapov Cc: kvm@vger.kernel.org --- arch/x86/kvm/x86.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) Index: tip/arch/x86/kvm/x86.c =================================================================== --- tip.orig/arch/x86/kvm/x86.c +++ tip/arch/x86/kvm/x86.c @@ -1109,11 +1109,7 @@ static void kvm_get_time_scale(uint32_t 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