]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Drivers: hv: util: Use hv_get_current_tick() to get current tick
authorK. Y. Srinivasan <kys@microsoft.com>
Mon, 3 Jul 2017 12:56:59 +0000 (09:56 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Mon, 3 Jul 2017 13:39:58 +0000 (10:39 -0300)
BugLink: http://bugs.launchpad.net/bugs/1676635
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>
(cherry picked from commit 305f7549c9298247723c255baddb7a54b4e63050)
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/hv/hv_util.c

index bcd06306f3e894a379603a4216cadab475be6b69..07a783b527841b48d1fcefbdfa5018d7737a0aee 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;