clocksource/drivers/hyper-v: Untangle stimers and timesync from clocksources
authorAndrea Parri <parri.andrea@gmail.com>
Thu, 9 Jan 2020 16:06:49 +0000 (17:06 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 16 Jan 2020 18:09:02 +0000 (19:09 +0100)
commit0af3e137c144377fbaf5025ba784ff5ba7ad40c9
treee7061dcf97329e37ca4a45d5882a6582765da744
parentb9c60a741f06eda56d12c7216accb317b74266b4
clocksource/drivers/hyper-v: Untangle stimers and timesync from clocksources

hyperv_timer.c exports hyperv_cs, which is used by stimers and the
timesync mechanism.  However, the clocksource dependency is not
needed: these mechanisms only depend on the partition reference
counter (which can be read via a MSR or via the TSC Reference Page).

Introduce the (function) pointer hv_read_reference_counter, as an
embodiment of the partition reference counter read, and export it
in place of the hyperv_cs pointer.  The latter can be removed.

This should clarify that there's no relationship between Hyper-V
stimers & timesync and the Linux clocksource abstractions.  No
functional or semantic change.

Suggested-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Andrea Parri <parri.andrea@gmail.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200109160650.16150-2-parri.andrea@gmail.com
drivers/clocksource/hyperv_timer.c
drivers/hv/hv_util.c
include/clocksource/hyperv_timer.h