[PATCH] clocksource: hyper-v: Drop the non-x86 compatibility code
From: Thomas Weißschuh
Date: Fri Dec 04 2026 - 02:21:12 EST
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@xxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxx>