Skip to content

Commit

Permalink
x86: kvm: Use ktime_get_boot_ns()
Browse files Browse the repository at this point in the history
Use the new nanoseconds based interface and get rid of the timespec
conversion dance.

Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Gleb Natapov <[email protected]>
Cc: [email protected]
Acked-by: Paolo Bonzini <[email protected]>
Signed-off-by: John Stultz <[email protected]>
  • Loading branch information
KAGA-KOKO authored and johnstultz-work committed Jul 23, 2014
1 parent 41fa421 commit bb0b581
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb0b581

Please sign in to comment.