From nobody Thu Apr 9 04:04:36 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 292E9C4332F for ; Thu, 3 Nov 2022 17:58:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231732AbiKCR6x (ORCPT ); Thu, 3 Nov 2022 13:58:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231565AbiKCR6u (ORCPT ); Thu, 3 Nov 2022 13:58:50 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4CB9EE34; Thu, 3 Nov 2022 10:58:49 -0700 (PDT) Received: from skinsburskii-cloud-desktop.internal.cloudapp.net (unknown [20.120.152.163]) by linux.microsoft.com (Postfix) with ESMTPSA id 1AE5E20C28B1; Thu, 3 Nov 2022 10:58:49 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1AE5E20C28B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1667498329; bh=d2r8ZXf09V8uzug4END6ry4gGh3rPYlU3pv6NwpfdRE=; h=Subject:From:Cc:Date:In-Reply-To:References:From; b=BuTRr6tnaRl5ZUlXSNO6XGsV/dMn2Ht5Ei4eV3Ct2G3/TEDHXdYfDZzHZk4N9MVL8 fLU9cJOgE5JPuOl2n0VwK0sQhvsk/iVV+lFU8jwsUrTz0+SE+aVZLbc02Vbo9kIex9 VGcrWx8VBPiU1TyTzZajJR5S/gWSoRh+cu7+OhIg= Subject: [PATCH v3 1/4] drivers/clocksource/hyper-v: Introduce a pointer to TSC page From: Stanislav Kinsburskii Cc: Stanislav Kinsburskiy , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Daniel Lezcano , Thomas Gleixner , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, mikelley@microsoft.com Date: Thu, 03 Nov 2022 17:58:48 +0000 Message-ID: <166749832893.218190.16503272948154953294.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net> In-Reply-To: <166749827889.218190.12775118554387271641.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net> References: <166749827889.218190.12775118554387271641.stgit@skinsburskii-cloud-desktop.internal.cloudapp.net> User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stanislav Kinsburskiy 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 CC: "K. Y. Srinivasan" CC: Haiyang Zhang CC: Wei Liu CC: Dexuan Cui CC: Daniel Lezcano CC: Thomas Gleixner CC: linux-hyperv@vger.kernel.org CC: linux-kernel@vger.kernel.org Reviewed-by: Michael Kelley --- drivers/clocksource/hyperv_timer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyper= v_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); =20 +static struct ms_hyperv_tsc_page *tsc_page =3D &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); =20 @@ -407,7 +409,7 @@ static void suspend_hv_clock_tsc(struct clocksource *ar= g) =20 static void resume_hv_clock_tsc(struct clocksource *arg) { - phys_addr_t phys_addr =3D virt_to_phys(&tsc_pg); + phys_addr_t phys_addr =3D virt_to_phys(tsc_page); union hv_reference_tsc_msr tsc_msr; =20 /* Re-enable the TSC page */