aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Kinsburskiy <[email protected]>2022-11-03 17:58:48 +0000
committerWei Liu <[email protected]>2022-11-28 16:48:20 +0000
commit76be6331a81607359cb41ca20ec5388c68c855e3 (patch)
treebd5ca8cdf6b2ea9d4a3358c920df84b773c8e1b0
parent202818e1c8519ee301e930484707d7ddace639e0 (diff)
clocksource: hyper-v: Introduce a pointer to TSC page
Will be used later keep the address of the remapped page for the root partition as it will be Microsoft Hypervisor defined (and thus won't be a static address). Signed-off-by: Stanislav Kinsburskiy <[email protected]> CC: "K. Y. Srinivasan" <[email protected]> CC: Haiyang Zhang <[email protected]> CC: Wei Liu <[email protected]> CC: Dexuan Cui <[email protected]> CC: Daniel Lezcano <[email protected]> CC: Thomas Gleixner <[email protected]> CC: [email protected] CC: [email protected] Reviewed-by: Michael Kelley <[email protected]> Reviewed-by: Anirudh Rayabharam <[email protected]> Link: https://lore.kernel.org/r/166749832893.218190.16503272948154953294.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net Signed-off-by: Wei Liu <[email protected]>
-rw-r--r--drivers/clocksource/hyperv_timer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyperv_timer.c
index 18de1f439ffd..b0b5df576e17 100644
--- a/drivers/clocksource/hyperv_timer.c
+++ b/drivers/clocksource/hyperv_timer.c
@@ -367,9 +367,11 @@ static union {
u8 reserved[PAGE_SIZE];
} tsc_pg __aligned(PAGE_SIZE);
+static struct ms_hyperv_tsc_page *tsc_page = &tsc_pg.page;
+
struct ms_hyperv_tsc_page *hv_get_tsc_page(void)
{
- return &tsc_pg.page;
+ return tsc_page;
}
EXPORT_SYMBOL_GPL(hv_get_tsc_page);
@@ -407,7 +409,7 @@ static void suspend_hv_clock_tsc(struct clocksource *arg)
static void resume_hv_clock_tsc(struct clocksource *arg)
{
- phys_addr_t phys_addr = virt_to_phys(&tsc_pg);
+ phys_addr_t phys_addr = virt_to_phys(tsc_page);
union hv_reference_tsc_msr tsc_msr;
/* Re-enable the TSC page */