[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b6592afe-a0b2-4af7-9c64-ddd2e1b08a0e@kernel.org>
Date: Wed, 14 Jan 2026 09:27:33 +0100
From: "Christophe Leroy (CS GROUP)" <chleroy@...nel.org>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>,
Andy Lutomirski <luto@...nel.org>, Thomas Gleixner <tglx@...nel.org>,
Vincenzo Frascino <vincenzo.frascino@....com>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] powerpc/vdso: Provide clock_getres_time64()
Le 14/01/2026 à 08:26, Thomas Weißschuh a écrit :
> 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@...utronix.de>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@...nel.org>
> ---
> Based on tip/timers/vdso.
>
> This was missed in the original vdso_getres_time64() series as powerpc
> does not use include/vdso/gettime.h.
> ---
> arch/powerpc/include/asm/vdso/gettimeofday.h | 2 ++
> arch/powerpc/kernel/vdso/gettimeofday.S | 12 ++++++++++++
> arch/powerpc/kernel/vdso/vdso32.lds.S | 1 +
> arch/powerpc/kernel/vdso/vgettimeofday.c | 6 ++++++
> 4 files changed, 21 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/vdso/gettimeofday.h b/arch/powerpc/include/asm/vdso/gettimeofday.h
> index ab3df12c8d94..8ea397e26ad0 100644
> --- a/arch/powerpc/include/asm/vdso/gettimeofday.h
> +++ b/arch/powerpc/include/asm/vdso/gettimeofday.h
> @@ -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);
> diff --git a/arch/powerpc/kernel/vdso/gettimeofday.S b/arch/powerpc/kernel/vdso/gettimeofday.S
> index 79c967212444..1c8e51691bf8 100644
> --- a/arch/powerpc/kernel/vdso/gettimeofday.S
> +++ b/arch/powerpc/kernel/vdso/gettimeofday.S
> @@ -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()
> diff --git a/arch/powerpc/kernel/vdso/vdso32.lds.S b/arch/powerpc/kernel/vdso/vdso32.lds.S
> index 72a1012b8a20..3f384a2526ae 100644
> --- a/arch/powerpc/kernel/vdso/vdso32.lds.S
> +++ b/arch/powerpc/kernel/vdso/vdso32.lds.S
> @@ -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;
> diff --git a/arch/powerpc/kernel/vdso/vgettimeofday.c b/arch/powerpc/kernel/vdso/vgettimeofday.c
> index 6f5167d81af5..3c194e1ab562 100644
> --- a/arch/powerpc/kernel/vdso/vgettimeofday.c
> +++ b/arch/powerpc/kernel/vdso/vgettimeofday.c
> @@ -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,
>
> ---
> base-commit: 0e55e7636697077abceb2301d7d2718d75c34389
> change-id: 20260113-vdso-powerpc-align-e8e93664da2b
>
> Best regards,
Powered by blists - more mailing lists