diff options
author | Michael Kelley <mikelley@microsoft.com> | 2021-07-13 17:01:46 -0700 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2021-07-19 09:24:28 +0000 |
commit | 31e5e64694cf9879e63b2802007fa934f4131126 (patch) | |
tree | d2efd0afb5e7073fd3c47f1d663126a9c57705a3 /drivers/hv/hv_util.c | |
parent | 5f92b45c3b67e3d222caf10e2eb898af31756b67 (diff) | |
download | linux-31e5e64694cf9879e63b2802007fa934f4131126.tar.gz linux-31e5e64694cf9879e63b2802007fa934f4131126.tar.bz2 linux-31e5e64694cf9879e63b2802007fa934f4131126.zip |
drivers: hv: Decouple Hyper-V clock/timer code from VMbus drivers
Hyper-V clock/timer code in hyperv_timer.c is mostly independent from
other VMbus drivers, but building for ARM64 without hyperv_timer.c
shows some remaining entanglements. A default implementation of
hv_read_reference_counter can just read a Hyper-V synthetic register
and be independent of hyperv_timer.c, so move this code out and into
hv_common.c. Then it can be used by the timesync driver even if
hyperv_timer.c isn't built on a particular architecture. If
hyperv_timer.c *is* built, it can override with a faster implementation.
Also provide stubs for stimer functions called by the VMbus driver when
hyperv_timer.c isn't built.
No functional changes.
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1626220906-22629-1-git-send-email-mikelley@microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/hv/hv_util.c')
-rw-r--r-- | drivers/hv/hv_util.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c index 136576cba26f..835e6039c186 100644 --- a/drivers/hv/hv_util.c +++ b/drivers/hv/hv_util.c @@ -17,7 +17,6 @@ #include <linux/hyperv.h> #include <linux/clockchips.h> #include <linux/ptp_clock_kernel.h> -#include <clocksource/hyperv_timer.h> #include <asm/mshyperv.h> #include "hyperv_vmbus.h" @@ -735,10 +734,6 @@ static struct ptp_clock *hv_ptp_clock; static int hv_timesync_init(struct hv_util_service *srv) { - /* TimeSync requires Hyper-V clocksource. */ - if (!hv_read_reference_counter) - return -ENODEV; - spin_lock_init(&host_ts.lock); INIT_WORK(&adj_time_work, hv_set_host_time); |