Drivers: hv: util: Use hv_get_current_tick() to get current tick
authorK. Y. Srinivasan <kys@microsoft.com>
Thu, 19 Jan 2017 18:51:52 +0000 (11:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jan 2017 13:48:03 +0000 (14:48 +0100)
As part of the effort to interact with Hyper-V in an instruction set
architecture independent way, use the new API to get the current
tick.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/hv_util.c

index e770774..7c90e33 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/sysctl.h>
 #include <linux/reboot.h>
 #include <linux/hyperv.h>
+#include <asm/mshyperv.h>
 
 #include "hyperv_vmbus.h"
 
@@ -199,7 +200,7 @@ static void hv_set_host_time(struct work_struct *work)
                 */
                u64 current_tick;
 
-               rdmsrl(HV_X64_MSR_TIME_REF_COUNT, current_tick);
+               hv_get_current_tick(current_tick);
                newtime += (current_tick - wrk->ref_time);
        }
        host_tns = (newtime - WLTIMEDELTA) * 100;