* [PATCH v2 01/15] arm64: vDSO: gettimeofday: Explicitly include vdso/clocksource.h
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 02/15] arm64: vDSO: compat_gettimeofday: Add explicit includes Thomas Weißschuh
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
The reference to VDSO_CLOCKMODE_NONE requires vdso/clocksource.h. Currently
this header is included transitively, but that transitive inclusion is
about to go away.
Explicitly include the header.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
---
| 2 ++
1 file changed, 2 insertions(+)
--git a/arch/arm64/include/asm/vdso/gettimeofday.h b/arch/arm64/include/asm/vdso/gettimeofday.h
index 3658a757e255..96d2eccd4995 100644
--- a/arch/arm64/include/asm/vdso/gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/gettimeofday.h
@@ -9,6 +9,8 @@
#ifndef __ASSEMBLER__
+#include <vdso/clocksource.h>
+
#include <asm/alternative.h>
#include <asm/arch_timer.h>
#include <asm/barrier.h>
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 02/15] arm64: vDSO: compat_gettimeofday: Add explicit includes
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 01/15] arm64: vDSO: gettimeofday: Explicitly include vdso/clocksource.h Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 03/15] ARM: vdso: gettimeofday: " Thomas Weißschuh
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
The reference to VDSO_CLOCKMODE_ARCHTIMER requires vdso/clocksource.h and
'struct old_timespec32' requires vdso/time32.h. Currently these headers
are included transitively, but those transitive inclusions are about to go
away.
Explicitly include the headers.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
---
| 3 +++
1 file changed, 3 insertions(+)
--git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
index 0d513f924321..a03e34b572f1 100644
--- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
@@ -7,6 +7,9 @@
#ifndef __ASSEMBLER__
+#include <vdso/clocksource.h>
+#include <vdso/time32.h>
+
#include <asm/barrier.h>
#include <asm/unistd_compat_32.h>
#include <asm/errno.h>
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 03/15] ARM: vdso: gettimeofday: Add explicit includes
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 01/15] arm64: vDSO: gettimeofday: Explicitly include vdso/clocksource.h Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 02/15] arm64: vDSO: compat_gettimeofday: Add explicit includes Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 04/15] powerpc/vdso/gettimeofday: Explicitly include vdso/time32.h Thomas Weißschuh
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
The reference to VDSO_CLOCKMODE_NONE requires vdso/clocksource.h and
'struct old_timespec32' requires vdso/time32.h. Currently these headers
are included transitively, but those transitive inclusions are about to go
away.
Explicitly include the headers.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
| 2 ++
1 file changed, 2 insertions(+)
--git a/arch/arm/include/asm/vdso/gettimeofday.h b/arch/arm/include/asm/vdso/gettimeofday.h
index 1e9f81639c88..26da5d8621cc 100644
--- a/arch/arm/include/asm/vdso/gettimeofday.h
+++ b/arch/arm/include/asm/vdso/gettimeofday.h
@@ -11,6 +11,8 @@
#include <asm/errno.h>
#include <asm/unistd.h>
#include <asm/vdso/cp15.h>
+#include <vdso/clocksource.h>
+#include <vdso/time32.h>
#include <uapi/linux/time.h>
#define VDSO_HAS_CLOCK_GETRES 1
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 04/15] powerpc/vdso/gettimeofday: Explicitly include vdso/time32.h
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
` (2 preceding siblings ...)
2026-02-27 6:44 ` [PATCH v2 03/15] ARM: vdso: gettimeofday: " Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 05/15] powerpc/vdso: Explicitly include asm/cputable.h and asm/feature-fixups.h Thomas Weißschuh
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh, Christophe Leroy
The usage of 'struct old_timespec32' requires vdso/time32.h. Currently
this header is included transitively, but that transitive inclusion is
about to go away.
Explicitly include the header.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
| 1 +
1 file changed, 1 insertion(+)
--git a/arch/powerpc/include/asm/vdso/gettimeofday.h b/arch/powerpc/include/asm/vdso/gettimeofday.h
index 8ea397e26ad0..a853f853da6c 100644
--- a/arch/powerpc/include/asm/vdso/gettimeofday.h
+++ b/arch/powerpc/include/asm/vdso/gettimeofday.h
@@ -8,6 +8,7 @@
#include <asm/barrier.h>
#include <asm/unistd.h>
#include <uapi/linux/time.h>
+#include <vdso/time32.h>
#define VDSO_HAS_CLOCK_GETRES 1
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 05/15] powerpc/vdso: Explicitly include asm/cputable.h and asm/feature-fixups.h
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
` (3 preceding siblings ...)
2026-02-27 6:44 ` [PATCH v2 04/15] powerpc/vdso/gettimeofday: Explicitly include vdso/time32.h Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 06/15] LoongArch: vDSO: Explicitly include asm/vdso/vdso.h Thomas Weißschuh
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh, Christophe Leroy
The usage of ASM_FTR_IFCLR(CPU_TR_ARCH_31) requires asm/cputable.h and
asm/feature-fixups.h. Currently these headers are included transitively,
but that transitive inclusion is about to go away.
Explicitly include the headers.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
| 3 +++
1 file changed, 3 insertions(+)
--git a/arch/powerpc/include/asm/vdso/processor.h b/arch/powerpc/include/asm/vdso/processor.h
index c1f3d7aaf3ee..4c6802c3a580 100644
--- a/arch/powerpc/include/asm/vdso/processor.h
+++ b/arch/powerpc/include/asm/vdso/processor.h
@@ -4,6 +4,9 @@
#ifndef __ASSEMBLER__
+#include <asm/cputable.h>
+#include <asm/feature-fixups.h>
+
/* Macros for adjusting thread priority (hardware multi-threading) */
#ifdef CONFIG_PPC64
#define HMT_very_low() asm volatile("or 31, 31, 31 # very low priority")
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 06/15] LoongArch: vDSO: Explicitly include asm/vdso/vdso.h
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
` (4 preceding siblings ...)
2026-02-27 6:44 ` [PATCH v2 05/15] powerpc/vdso: Explicitly include asm/cputable.h and asm/feature-fixups.h Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 07/15] MIPS: vdso: Add include guard to asm/vdso/vdso.h Thomas Weißschuh
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
The usage of 'struct old_timespec32' requires asm/vdso/vdso.h. Currently
this header is included transitively, but that transitive inclusion is
about to go away.
Explicitly include the header.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
| 1 +
| 1 +
2 files changed, 2 insertions(+)
--git a/arch/loongarch/kernel/process.c b/arch/loongarch/kernel/process.c
index 4ac1c3086152..ac3a0baa5d00 100644
--- a/arch/loongarch/kernel/process.c
+++ b/arch/loongarch/kernel/process.c
@@ -52,6 +52,7 @@
#include <asm/switch_to.h>
#include <asm/unwind.h>
#include <asm/vdso.h>
+#include <asm/vdso/vdso.h>
#ifdef CONFIG_STACKPROTECTOR
#include <linux/stackprotector.h>
--git a/arch/loongarch/kernel/vdso.c b/arch/loongarch/kernel/vdso.c
index 0aa10cadb959..8ce8159c10b9 100644
--- a/arch/loongarch/kernel/vdso.c
+++ b/arch/loongarch/kernel/vdso.c
@@ -18,6 +18,7 @@
#include <asm/page.h>
#include <asm/vdso.h>
+#include <asm/vdso/vdso.h>
#include <vdso/helpers.h>
#include <vdso/vsyscall.h>
#include <vdso/datapage.h>
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 07/15] MIPS: vdso: Add include guard to asm/vdso/vdso.h
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
` (5 preceding siblings ...)
2026-02-27 6:44 ` [PATCH v2 06/15] LoongArch: vDSO: Explicitly include asm/vdso/vdso.h Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 08/15] MIPS: vdso: Explicitly include asm/vdso/vdso.h Thomas Weißschuh
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
An upcomming patch will lead to the header file being included multiple
times from the same source file.
Add an include guard so this is possible.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
| 5 +++++
1 file changed, 5 insertions(+)
--git a/arch/mips/include/asm/vdso/vdso.h b/arch/mips/include/asm/vdso/vdso.h
index 6889e0f2e5db..ef50d33f3439 100644
--- a/arch/mips/include/asm/vdso/vdso.h
+++ b/arch/mips/include/asm/vdso/vdso.h
@@ -4,6 +4,9 @@
* Author: Alex Smith <alex.smith@imgtec.com>
*/
+#ifndef __ASM_VDSO_VDSO_H
+#define __ASM_VDSO_VDSO_H
+
#include <asm/sgidefs.h>
#include <vdso/page.h>
@@ -70,3 +73,5 @@ static inline void __iomem *get_gic(const struct vdso_time_data *data)
#endif /* CONFIG_CLKSRC_MIPS_GIC */
#endif /* __ASSEMBLER__ */
+
+#endif /* __ASM_VDSO_VDSO_H */
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 08/15] MIPS: vdso: Explicitly include asm/vdso/vdso.h
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
` (6 preceding siblings ...)
2026-02-27 6:44 ` [PATCH v2 07/15] MIPS: vdso: Add include guard to asm/vdso/vdso.h Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 09/15] random: vDSO: add explicit includes Thomas Weißschuh
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
The usage of __VDSO_PAGES requires asm/vdso/vdso.h. Currently this header
is included transitively, but that transitive inclusion is about to go
away.
Explicitly include the header.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
| 1 +
1 file changed, 1 insertion(+)
--git a/arch/mips/kernel/vdso.c b/arch/mips/kernel/vdso.c
index de096777172f..2fa4df3e46e4 100644
--- a/arch/mips/kernel/vdso.c
+++ b/arch/mips/kernel/vdso.c
@@ -21,6 +21,7 @@
#include <asm/mips-cps.h>
#include <asm/page.h>
#include <asm/vdso.h>
+#include <asm/vdso/vdso.h>
#include <vdso/helpers.h>
#include <vdso/vsyscall.h>
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 09/15] random: vDSO: add explicit includes
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
` (7 preceding siblings ...)
2026-02-27 6:44 ` [PATCH v2 08/15] MIPS: vdso: Explicitly include asm/vdso/vdso.h Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 10/15] vdso/gettimeofday: Add " Thomas Weißschuh
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
Various used symbols are only visible through transitive includes.
These transitive includes are about to go away.
Explicitly include the necessary headers.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
lib/vdso/getrandom.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/vdso/getrandom.c b/lib/vdso/getrandom.c
index 440f8a6203a6..7e29005aa208 100644
--- a/lib/vdso/getrandom.c
+++ b/lib/vdso/getrandom.c
@@ -7,8 +7,11 @@
#include <linux/minmax.h>
#include <vdso/datapage.h>
#include <vdso/getrandom.h>
+#include <vdso/limits.h>
#include <vdso/unaligned.h>
+#include <asm/barrier.h>
#include <asm/vdso/getrandom.h>
+#include <uapi/linux/errno.h>
#include <uapi/linux/mman.h>
#include <uapi/linux/random.h>
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 10/15] vdso/gettimeofday: Add explicit includes
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
` (8 preceding siblings ...)
2026-02-27 6:44 ` [PATCH v2 09/15] random: vDSO: add explicit includes Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 11/15] vdso/helpers: Explicitly include vdso/processor.h Thomas Weißschuh
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
Various used symbols are only visible through transitive includes.
These transitive includes are about to go away.
Explicitly include the necessary headers.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
| 6 ++++++
1 file changed, 6 insertions(+)
--git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index 4399e143d43a..73b079eb4511 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -3,8 +3,14 @@
* Generic userspace implementations of gettimeofday() and similar.
*/
#include <vdso/auxclock.h>
+#include <vdso/clocksource.h>
#include <vdso/datapage.h>
#include <vdso/helpers.h>
+#include <vdso/ktime.h>
+#include <vdso/limits.h>
+#include <vdso/math64.h>
+#include <vdso/time32.h>
+#include <vdso/time64.h>
/* Bring in default accessors */
#include <vdso/vsyscall.h>
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 11/15] vdso/helpers: Explicitly include vdso/processor.h
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
` (9 preceding siblings ...)
2026-02-27 6:44 ` [PATCH v2 10/15] vdso/gettimeofday: Add " Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 12/15] vdso/datapage: Remove inclusion of gettimeofday.h Thomas Weißschuh
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
The usage of cpu_relax() requires vdso/processor.h. Currently
this header is included transitively, but that transitive inclusion is
about to go away.
Explicitly include the header.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
| 1 +
1 file changed, 1 insertion(+)
--git a/include/vdso/helpers.h b/include/vdso/helpers.h
index 1a5ee9d9052c..a1c995af4696 100644
--- a/include/vdso/helpers.h
+++ b/include/vdso/helpers.h
@@ -6,6 +6,7 @@
#include <asm/barrier.h>
#include <vdso/datapage.h>
+#include <vdso/processor.h>
static __always_inline u32 vdso_read_begin(const struct vdso_clock *vc)
{
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 12/15] vdso/datapage: Remove inclusion of gettimeofday.h
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
` (10 preceding siblings ...)
2026-02-27 6:44 ` [PATCH v2 11/15] vdso/helpers: Explicitly include vdso/processor.h Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 13/15] vdso/datapage: Trim down unnecessary includes Thomas Weißschuh
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
vdso/datapage.h is useful without pulling in the architecture-specific
gettimeofday() helpers.
Move the include to the only users which needs it.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
| 11 -----------
| 11 +++++++++++
2 files changed, 11 insertions(+), 11 deletions(-)
--git a/include/vdso/datapage.h b/include/vdso/datapage.h
index 23c39b96190f..752856b36a3a 100644
--- a/include/vdso/datapage.h
+++ b/include/vdso/datapage.h
@@ -184,17 +184,6 @@ enum vdso_pages {
VDSO_NR_PAGES
};
-/*
- * The generic vDSO implementation requires that gettimeofday.h
- * provides:
- * - __arch_get_hw_counter(): to get the hw counter based on the
- * clock_mode.
- * - gettimeofday_fallback(): fallback for gettimeofday.
- * - clock_gettime_fallback(): fallback for clock_gettime.
- * - clock_getres_fallback(): fallback for clock_getres.
- */
-#include <asm/vdso/gettimeofday.h>
-
#else /* !__ASSEMBLY__ */
#ifdef CONFIG_VDSO_GETRANDOM
--git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index 73b079eb4511..a4b0f06cf970 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -12,6 +12,17 @@
#include <vdso/time32.h>
#include <vdso/time64.h>
+/*
+ * The generic vDSO implementation requires that gettimeofday.h
+ * provides:
+ * - __arch_get_hw_counter(): to get the hw counter based on the
+ * clock_mode.
+ * - gettimeofday_fallback(): fallback for gettimeofday.
+ * - clock_gettime_fallback(): fallback for clock_gettime.
+ * - clock_getres_fallback(): fallback for clock_getres.
+ */
+#include <asm/vdso/gettimeofday.h>
+
/* Bring in default accessors */
#include <vdso/vsyscall.h>
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 13/15] vdso/datapage: Trim down unnecessary includes
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
` (11 preceding siblings ...)
2026-02-27 6:44 ` [PATCH v2 12/15] vdso/datapage: Remove inclusion of gettimeofday.h Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 14/15] random: vDSO: trim vDSO includes Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 15/15] random: vDSO: remove ifdeffery Thomas Weißschuh
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
vdso/datapage.h includes a lot of headers which are not strictly necessary.
Some of those headers include architecture-specific vDSO headers which
prevent the usage of vdso/datapage.h in kernel code on architectures
without an vDSO. This would be useful however to write generic code using
IS_ENABLED(), for example in drivers/char/random.c.
Remove the unnecessary includes.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
| 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
--git a/include/vdso/datapage.h b/include/vdso/datapage.h
index 752856b36a3a..9021b9580be2 100644
--- a/include/vdso/datapage.h
+++ b/include/vdso/datapage.h
@@ -4,24 +4,16 @@
#ifndef __ASSEMBLY__
-#include <linux/compiler.h>
+#include <linux/types.h>
+
#include <uapi/linux/bits.h>
#include <uapi/linux/time.h>
-#include <uapi/linux/types.h>
-#include <uapi/asm-generic/errno-base.h>
#include <vdso/align.h>
#include <vdso/bits.h>
#include <vdso/cache.h>
-#include <vdso/clocksource.h>
-#include <vdso/ktime.h>
-#include <vdso/limits.h>
-#include <vdso/math64.h>
#include <vdso/page.h>
-#include <vdso/processor.h>
#include <vdso/time.h>
-#include <vdso/time32.h>
-#include <vdso/time64.h>
#ifdef CONFIG_ARCH_HAS_VDSO_TIME_DATA
#include <asm/vdso/time_data.h>
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 14/15] random: vDSO: trim vDSO includes
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
` (12 preceding siblings ...)
2026-02-27 6:44 ` [PATCH v2 13/15] vdso/datapage: Trim down unnecessary includes Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
2026-02-27 6:44 ` [PATCH v2 15/15] random: vDSO: remove ifdeffery Thomas Weißschuh
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
These includes are not used, remove them.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
drivers/char/random.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index dcd002e1b890..9738673018f3 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -57,9 +57,7 @@
#include <crypto/chacha.h>
#include <crypto/blake2s.h>
#ifdef CONFIG_VDSO_GETRANDOM
-#include <vdso/getrandom.h>
#include <vdso/datapage.h>
-#include <vdso/vsyscall.h>
#endif
#include <asm/archrandom.h>
#include <asm/processor.h>
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread* [PATCH v2 15/15] random: vDSO: remove ifdeffery
2026-02-27 6:44 [PATCH v2 00/15] vDSO: header file cleanups Thomas Weißschuh
` (13 preceding siblings ...)
2026-02-27 6:44 ` [PATCH v2 14/15] random: vDSO: trim vDSO includes Thomas Weißschuh
@ 2026-02-27 6:44 ` Thomas Weißschuh
14 siblings, 0 replies; 16+ messages in thread
From: Thomas Weißschuh @ 2026-02-27 6:44 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Russell King, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy (CS GROUP),
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Andy Lutomirski,
Thomas Gleixner, Vincenzo Frascino, Theodore Ts'o,
Jason A. Donenfeld
Cc: linux-arm-kernel, linux-kernel, linuxppc-dev, loongarch,
linux-mips, Thomas Weißschuh
Recent cleanups of the vDSO headers allow the unconditional inclusion of
vdso/datapage.h and the declarations it provides. This also means that
the declaration of vdso_k_rng_data is always visible and its usage does
not need to be guarded by ifdefs anymore. Instead use IS_ENABLED().
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
drivers/char/random.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 9738673018f3..9392a45852ec 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -56,9 +56,7 @@
#include <linux/sched/isolation.h>
#include <crypto/chacha.h>
#include <crypto/blake2s.h>
-#ifdef CONFIG_VDSO_GETRANDOM
#include <vdso/datapage.h>
-#endif
#include <asm/archrandom.h>
#include <asm/processor.h>
#include <asm/irq.h>
@@ -274,7 +272,7 @@ static void crng_reseed(struct work_struct *work)
if (next_gen == ULONG_MAX)
++next_gen;
WRITE_ONCE(base_crng.generation, next_gen);
-#ifdef CONFIG_VDSO_GETRANDOM
+
/* base_crng.generation's invalid value is ULONG_MAX, while
* vdso_k_rng_data->generation's invalid value is 0, so add one to the
* former to arrive at the latter. Use smp_store_release so that this
@@ -288,8 +286,9 @@ static void crng_reseed(struct work_struct *work)
* because the vDSO side only checks whether the value changed, without
* actually using or interpreting the value.
*/
- smp_store_release((unsigned long *)&vdso_k_rng_data->generation, next_gen + 1);
-#endif
+ if (IS_ENABLED(CONFIG_VDSO_GETRANDOM))
+ smp_store_release((unsigned long *)&vdso_k_rng_data->generation, next_gen + 1);
+
if (!static_branch_likely(&crng_is_ready))
crng_init = CRNG_READY;
spin_unlock_irqrestore(&base_crng.lock, flags);
@@ -742,9 +741,8 @@ static void __cold _credit_init_bits(size_t bits)
if (system_dfl_wq)
queue_work(system_dfl_wq, &set_ready);
atomic_notifier_call_chain(&random_ready_notifier, 0, NULL);
-#ifdef CONFIG_VDSO_GETRANDOM
- WRITE_ONCE(vdso_k_rng_data->is_ready, true);
-#endif
+ if (IS_ENABLED(CONFIG_VDSO_GETRANDOM))
+ WRITE_ONCE(vdso_k_rng_data->is_ready, true);
wake_up_interruptible(&crng_init_wait);
kill_fasync(&fasync, SIGIO, POLL_IN);
pr_notice("crng init done\n");
--
2.53.0
^ permalink raw reply related [flat|nested] 16+ messages in thread