diff --git a/MAINTAINERS b/MAINTAINERS index 72294ddfa5b7..879089f1ac1d 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 2b989bebd220..161628f6906f 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -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 000000000000..6d81ee3a3c9c --- /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 c5c2a2c07857..29dd4e097220 100644 --- a/include/vdso/vsyscall.h +++ b/include/vdso/vsyscall.h @@ -6,9 +6,6 @@ #include -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 aa59919b8f2c..4b96a8b23294 100644 --- a/kernel/time/vsyscall.c +++ b/kernel/time/vsyscall.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -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;