* [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* Re: [PATCH] clocksource: hyper-v: Drop the non-x86 compatibility code
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
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-04 7:30 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: linux-hyperv
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] clocksource/hyper-v: commit message overstates removal of
non-x86 code
--
commit 55a664b1fba1bbf3eea2b93ebb263aa00de4e3e6
Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> clocksource: hyper-v: Drop the non-x86 compatibility code
>
> 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>
[Severity: Low]
Does the commit message overstate what is being removed?
This patch only drops the HAVE_VDSO_CLOCKMODE_HVCLOCK vDSO guards in
drivers/clocksource/hyperv_timer.c and the macro in
arch/x86/include/asm/vdso/clocksource.h. Other non-x86 compatibility code
remains in drivers/clocksource/hyperv_timer.c, including the
CONFIG_GENERIC_SCHED_CLOCK handling in hv_setup_sched_clock() and the
per-CPU IRQ helpers in hv_setup_stimer0_irq().
Narrowing the subject and description to mention vDSO or
HAVE_VDSO_CLOCKMODE_HVCLOCK would match the actual diff.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-hyperv-clocksource-cleanup-v1-1-a4f1fd3c6bdc@linutronix.de?part=1
^ permalink raw reply [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