[tip: timers/vdso] vdso/datapage: Remove inclusion of gettimeofday.h
From: tip-bot2 for Thomas Weißschuh
Date: Wed Mar 11 2026 - 06:11:14 EST
The following commit has been merged into the timers/vdso branch of tip:
Commit-ID: 25141bcd25a8c1059fa43242eb291309d78e5578
Gitweb: https://git.kernel.org/tip/25141bcd25a8c1059fa43242eb291309d78e5578
Author: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
AuthorDate: Fri, 27 Feb 2026 07:44:38 +01:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Wed, 11 Mar 2026 10:27:38 +01:00
vdso/datapage: Remove inclusion of gettimeofday.h
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@xxxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Link: https://patch.msgid.link/20260227-vdso-header-cleanups-v2-12-35d60acf7410@xxxxxxxxxxxxx
---
include/vdso/datapage.h | 11 -----------
lib/vdso/gettimeofday.c | 11 +++++++++++
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h
index 07c2e08..339a34e 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
diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index ad79642..a5798bd 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>