From: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
To: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
Daniel Lezcano <daniel.lezcano@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: [PATCH] clocksource: hyper-v: Drop the non-x86 compatibility code
Date: Fri, 04 Dec 2026 08:20:50 +0100 [thread overview]
Message-ID: <20261204-hyperv-clocksource-cleanup-v1-1-a4f1fd3c6bdc@linutronix.de> (raw)
The clocksource can only be built on x86.
Drop the unnecessary compatibility infrastructure.
Also drop the now unused driver-specific define from
the architecture headers.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
arch/x86/include/asm/vdso/clocksource.h | 2 --
drivers/clocksource/hyperv_timer.c | 6 ------
2 files changed, 8 deletions(-)
diff --git a/arch/x86/include/asm/vdso/clocksource.h b/arch/x86/include/asm/vdso/clocksource.h
index 136e5e57cfe1..119ac8612d89 100644
--- a/arch/x86/include/asm/vdso/clocksource.h
+++ b/arch/x86/include/asm/vdso/clocksource.h
@@ -7,6 +7,4 @@
VDSO_CLOCKMODE_PVCLOCK, \
VDSO_CLOCKMODE_HVCLOCK
-#define HAVE_VDSO_CLOCKMODE_HVCLOCK
-
#endif /* __ASM_VDSO_CLOCKSOURCE_H */
diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyperv_timer.c
index dddfff458ebf..132be7eff0bf 100644
--- a/drivers/clocksource/hyperv_timer.c
+++ b/drivers/clocksource/hyperv_timer.c
@@ -389,13 +389,11 @@ void hv_adj_sched_clock_offset(u64 offset)
hv_sched_clock_offset -= offset;
}
-#ifdef HAVE_VDSO_CLOCKMODE_HVCLOCK
static int hv_cs_enable(struct clocksource *cs)
{
vclocks_set_used(VDSO_CLOCKMODE_HVCLOCK);
return 0;
}
-#endif
static struct clocksource hyperv_cs_tsc = {
.name = "hyperv_clocksource_tsc_page",
@@ -406,12 +404,8 @@ static struct clocksource hyperv_cs_tsc = {
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
.suspend = suspend_hv_clock_tsc,
.resume = resume_hv_clock_tsc,
-#ifdef HAVE_VDSO_CLOCKMODE_HVCLOCK
.enable = hv_cs_enable,
.vdso_clock_mode = VDSO_CLOCKMODE_HVCLOCK,
-#else
- .vdso_clock_mode = VDSO_CLOCKMODE_NONE,
-#endif
};
static u64 notrace read_hv_clock_msr_cs(struct clocksource *arg)
---
base-commit: 693c2e04e3f1d4c59af236e1211b7b8cb165a790
change-id: 20261203-hyperv-clocksource-cleanup-6fb7078f19a8
Best regards,
--
Thomas Weißschuh <thomas.weissschuh@linutronix.de>
reply other threads:[~2026-12-04 7:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204-hyperv-clocksource-cleanup-v1-1-a4f1fd3c6bdc@linutronix.de \
--to=thomas.weissschuh@linutronix.de \
--cc=bp@alien8.de \
--cc=daniel.lezcano@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@kernel.org \
--cc=wei.liu@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®