Linux-HyperV List
 help / color / mirror / Atom feed
* [PATCH] clocksource: hyper-v: Drop the non-x86 compatibility code
@ 2026-12-04  7:20 Thomas Weißschuh
  2026-12-04  7:30 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Weißschuh @ 2026-12-04  7:20 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Haiyang Zhang, Wei Liu, Dexuan Cui,
	Daniel Lezcano
  Cc: linux-kernel, linux-hyperv, Thomas Weißschuh

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>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-04  7:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04  7:20 [PATCH] clocksource: hyper-v: Drop the non-x86 compatibility code Thomas Weißschuh
2026-12-04  7:30 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox