]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource/drivers/hyper-v: Untangle stimers and timesync from clocksources
authorYubo Xie <yuboxie@microsoft.com>
Fri, 27 Mar 2020 02:11:59 +0000 (19:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Apr 2020 09:02:12 +0000 (11:02 +0200)
commit3a2389c71ab228da8934eb50f8d775685dbd87b1
tree4ef9c6b12fddcbcf752f8b63a2f9349b1a2406cf
parent7f6df5fa5ca166d762aca753ab931114e013d3fc
clocksource/drivers/hyper-v: Untangle stimers and timesync from clocksources

[ Upstream commit af5ffe1f2c871a009217cf54c15bf107ba8c5987 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clocksource/hyperv_timer.c