powerpc/vdso: Provide clock_getres_time64()

For consistency with __vdso_clock_gettime64() there should also be a
64-bit variant of clock_getres(). This will allow the extension of
CONFIG_COMPAT_32BIT_TIME to the vDSO and finally the removal of 32-bit
time types from the kernel and UAPI.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Link: https://patch.msgid.link/20260114-vdso-powerpc-align-v1-1-acf09373d568@linutronix.de
This commit is contained in:
Thomas Weißschuh
2026-01-14 08:26:05 +01:00
committed by Thomas Gleixner
parent 10a62a0611
commit 759a1f9737
4 changed files with 21 additions and 0 deletions

View File

@@ -135,6 +135,8 @@ int __c_kernel_clock_gettime64(clockid_t clock, struct __kernel_timespec *ts,
const struct vdso_time_data *vd);
int __c_kernel_clock_getres(clockid_t clock_id, struct old_timespec32 *res,
const struct vdso_time_data *vd);
int __c_kernel_clock_getres_time64(clockid_t clock_id, struct __kernel_timespec *res,
const struct vdso_time_data *vd);
#endif
int __c_kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz,
const struct vdso_time_data *vd);

View File

@@ -103,6 +103,18 @@ V_FUNCTION_BEGIN(__kernel_clock_getres)
cvdso_call __c_kernel_clock_getres
V_FUNCTION_END(__kernel_clock_getres)
/*
* Exact prototype of clock_getres_time64()
*
* int __kernel_clock_getres(clockid_t clock_id, struct __timespec64 *res);
*
*/
#ifndef __powerpc64__
V_FUNCTION_BEGIN(__kernel_clock_getres_time64)
cvdso_call __c_kernel_clock_getres_time64
V_FUNCTION_END(__kernel_clock_getres_time64)
#endif
/*
* Exact prototype of time()

View File

@@ -124,6 +124,7 @@ VERSION
__kernel_clock_gettime;
__kernel_clock_gettime64;
__kernel_clock_getres;
__kernel_clock_getres_time64;
__kernel_time;
__kernel_get_tbfreq;
__kernel_sync_dicache;

View File

@@ -35,6 +35,12 @@ int __c_kernel_clock_getres(clockid_t clock_id, struct old_timespec32 *res,
{
return __cvdso_clock_getres_time32_data(vd, clock_id, res);
}
int __c_kernel_clock_getres_time64(clockid_t clock_id, struct __kernel_timespec *res,
const struct vdso_time_data *vd)
{
return __cvdso_clock_getres_data(vd, clock_id, res);
}
#endif
int __c_kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz,