Re: [PATCH v2 12/13] sparc64: vdso: Implement clock_getres()

From: Arnd Bergmann
Date: Fri Aug 15 2025 - 08:14:30 EST


On Fri, Aug 15, 2025, at 12:41, Thomas Weißschuh wrote:
>
> +#define VDSO_HAS_CLOCK_GETRES 1
> +
> #ifdef CONFIG_SPARC64

> +static __always_inline
> +long clock_getres_fallback(clockid_t clock, struct __kernel_timespec
> *ts)

> +
> +static __always_inline
> +long clock_getres32_fallback(clockid_t clock, struct old_timespec32
> *ts)
> +{

> +}
> +#else /* !CONFIG_SPARC64 */
> +
> +static __always_inline
> +long clock_getres_fallback(clockid_t clock, struct __kernel_timespec
> *ts)

> +
> +#endif /* CONFIG_SPARC64 */
>

Something doesn't quite line up here: I think the check for
CONFIG_SPARC64 needs to be for "#ifndef BUILD_VDSO32", since
sparc32 kernels don't have a vdso at all yet.

On sparc64 kernels, I think you only need the
clock_getres_fallback() for 64-bit userspace, while
the compat path probably doesn't care about getres, neither
the time32 nor time64 variant.

Arnd