[tip: timers/vdso] vDSO: Make clockmode constants available without CONFIG_GENERIC_GETTIMEOFDAY
From: tip-bot2 for Thomas Weißschuh
Date: Mon Aug 10 2026 - 10:39:41 EST
The following commit has been merged into the timers/vdso branch of tip:
Commit-ID: 1bafc1f65972fb1ca9b87bb4ead593436162c4be
Gitweb: https://git.kernel.org/tip/1bafc1f65972fb1ca9b87bb4ead593436162c4be
Author: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
AuthorDate: Fri, 24 Jul 2026 15:36:19 +02:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Mon, 10 Aug 2026 16:25:21 +02:00
vDSO: Make clockmode constants available without CONFIG_GENERIC_GETTIMEOFDAY
Some code, for example clocksource drivers, may want to use the vDSO
clockmode constants even when CONFIG_GENERIC_GETTIMEOFDAY=n.
But the symbols are completely hidden in that case, making ugly
ifdeffery necessary.
Always provide the enum definitions.
As not all architectures provide asm/vdso/clocksource.h,
provide an empty stub in asm-generic for it.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
Link: https://patch.msgid.link/20260724-vdso-arch-clockmodes-v4-2-ddbe447be860@xxxxxxxxxxxxx
---
include/asm-generic/Kbuild | 1 +
include/asm-generic/vdso/clocksource.h | 0
include/vdso/clocksource.h | 4 +---
3 files changed, 2 insertions(+), 3 deletions(-)
create mode 100644 include/asm-generic/vdso/clocksource.h
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild
index 15df9dc..2bc00c6 100644
--- a/include/asm-generic/Kbuild
+++ b/include/asm-generic/Kbuild
@@ -62,6 +62,7 @@ mandatory-y += topology.h
mandatory-y += trace_clock.h
mandatory-y += uaccess.h
mandatory-y += unwind_user.h
+mandatory-y += vdso/clocksource.h
mandatory-y += vermagic.h
mandatory-y += vga.h
mandatory-y += video.h
diff --git a/include/asm-generic/vdso/clocksource.h b/include/asm-generic/vdso/clocksource.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/include/asm-generic/vdso/clocksource.h
diff --git a/include/vdso/clocksource.h b/include/vdso/clocksource.h
index c682e7c..bce81c0 100644
--- a/include/vdso/clocksource.h
+++ b/include/vdso/clocksource.h
@@ -4,13 +4,11 @@
#include <vdso/limits.h>
-#ifdef CONFIG_GENERIC_GETTIMEOFDAY
#include <asm/vdso/clocksource.h>
-#endif /* CONFIG_GENERIC_GETTIMEOFDAY */
enum vdso_clock_mode {
VDSO_CLOCKMODE_NONE,
-#ifdef CONFIG_GENERIC_GETTIMEOFDAY
+#ifdef VDSO_ARCH_CLOCKMODES
VDSO_ARCH_CLOCKMODES,
#endif
VDSO_CLOCKMODE_MAX,