MAINTAINERS | 1 + arch/s390/kernel/time.c | 5 +++-- include/linux/vdso_time.h | 8 ++++++++ include/vdso/vsyscall.h | 3 --- kernel/time/vsyscall.c | 15 ++++++++------- 5 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 include/linux/vdso_time.h
The following commit has been merged into the timers/vdso branch of tip:
Commit-ID: 35f0a96848a730495ff310645387578ca68934cd
Gitweb: https://git.kernel.org/tip/35f0a96848a730495ff310645387578ca68934cd
Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate: Wed, 09 Sep 2026 10:51:14 +02:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Thu, 15 Oct 2026 17:33:18 +02:00
vdso: Move the kernel-side time update helpers to a new header
The vdso/ header namespace is meant for symbols which are usable from
vDSO userspace code. However vdso_update_begin() and vdso_update_end()
are only usable from the kernel.
Move them into a new header in the linux/ namespace. Also rename them to
make clear that they are only for time-related data.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260909-vdso-asm-generic-vsyscall-h-v1-1-63ae856cc659@linutronix.de
---
MAINTAINERS | 1 +
arch/s390/kernel/time.c | 5 +++--
include/linux/vdso_time.h | 8 ++++++++
include/vdso/vsyscall.h | 3 ---
kernel/time/vsyscall.c | 15 ++++++++-------
5 files changed, 20 insertions(+), 12 deletions(-)
create mode 100644 include/linux/vdso_time.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 72294dd..879089f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11064,6 +11064,7 @@ S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/vdso
F: include/asm-generic/vdso/vsyscall.h
F: include/linux/vdso_datastore.h
+F: include/linux/vdso_time.h
F: include/vdso/
F: kernel/time/namespace_vdso.c
F: kernel/time/vsyscall.c
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 2b989be..161628f 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -39,6 +39,7 @@
#include <linux/gfp.h>
#include <linux/kprobes.h>
#include <linux/uaccess.h>
+#include <linux/vdso_time.h>
#include <vdso/vsyscall.h>
#include <vdso/clocksource.h>
#include <vdso/helpers.h>
@@ -527,7 +528,7 @@ static int stp_sync_clock(void *data)
cpu_relax();
rc = 0;
if (stp_info.todoff || stp_info.tmd != 2) {
- flags = vdso_update_begin();
+ flags = vdso_time_update_begin();
rc = chsc_sstpc(stp_page, STP_OP_SYNC, 0,
&clock_delta);
if (rc == 0) {
@@ -537,7 +538,7 @@ static int stp_sync_clock(void *data)
if (rc == 0 && stp_info.tmd != 2)
rc = -EAGAIN;
}
- vdso_update_end(flags);
+ vdso_time_update_end(flags);
}
sync->in_sync = rc ? -EAGAIN : 1;
xchg(&first, 0);
diff --git a/include/linux/vdso_time.h b/include/linux/vdso_time.h
new file mode 100644
index 0000000..6d81ee3
--- /dev/null
+++ b/include/linux/vdso_time.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_VDSO_TIME_H
+#define _LINUX_VDSO_TIME_H
+
+unsigned long vdso_time_update_begin(void);
+void vdso_time_update_end(unsigned long flags);
+
+#endif /* _LINUX_VDSO_TIME_H */
diff --git a/include/vdso/vsyscall.h b/include/vdso/vsyscall.h
index c5c2a2c..29dd4e0 100644
--- a/include/vdso/vsyscall.h
+++ b/include/vdso/vsyscall.h
@@ -6,9 +6,6 @@
#include <asm/vdso/vsyscall.h>
-unsigned long vdso_update_begin(void);
-void vdso_update_end(unsigned long flags);
-
#endif /* !__ASSEMBLER__ */
#endif /* __VDSO_VSYSCALL_H */
diff --git a/kernel/time/vsyscall.c b/kernel/time/vsyscall.c
index aa59919..4b96a8b 100644
--- a/kernel/time/vsyscall.c
+++ b/kernel/time/vsyscall.c
@@ -9,6 +9,7 @@
#include <linux/hrtimer.h>
#include <linux/timekeeper_internal.h>
+#include <linux/vdso_time.h>
#include <vdso/datapage.h>
#include <vdso/helpers.h>
#include <vdso/vsyscall.h>
@@ -177,7 +178,7 @@ void vdso_time_update_aux(struct timekeeper *tk)
#endif
/**
- * vdso_update_begin - Start of a VDSO update section
+ * vdso_time_update_begin - Start of a VDSO update section
*
* Allows architecture code to safely update the architecture specific VDSO
* data. Disables interrupts, acquires timekeeper lock to serialize against
@@ -186,9 +187,9 @@ void vdso_time_update_aux(struct timekeeper *tk)
* inconsistent data.
*
* Returns: Saved interrupt flags which need to be handed in to
- * vdso_update_end().
+ * vdso_time_update_end().
*/
-unsigned long vdso_update_begin(void)
+unsigned long vdso_time_update_begin(void)
{
struct vdso_time_data *vdata = vdso_k_time_data;
unsigned long flags = timekeeper_lock_irqsave();
@@ -198,14 +199,14 @@ unsigned long vdso_update_begin(void)
}
/**
- * vdso_update_end - End of a VDSO update section
- * @flags: Interrupt flags as returned from vdso_update_begin()
+ * vdso_time_update_end - End of a VDSO update section
+ * @flags: Interrupt flags as returned from vdso_time_update_begin()
*
- * Pairs with vdso_update_begin(). Marks vdso data consistent, invokes data
+ * Pairs with vdso_time_update_begin(). Marks vdso data consistent, invokes data
* synchronization if the architecture requires it, drops timekeeper lock
* and restores interrupt flags.
*/
-void vdso_update_end(unsigned long flags)
+void vdso_time_update_end(unsigned long flags)
{
struct vdso_time_data *vdata = vdso_k_time_data;
© 2016 - 2026 Red Hat, Inc.