Re: [PATCH v2 12/13] sparc64: vdso: Implement clock_getres()
From: Thomas Weißschuh
Date: Fri Aug 15 2025 - 08:36:19 EST
On Fri, Aug 15, 2025 at 02:13:46PM +0200, Arnd Bergmann wrote:
> 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.
arch/sparc/vdso/vdso32/vclock_gettime.c translates BUILD_VDSO32 into more
"standard" defines, CONFIG_SPARC64 in this case. I have a follow-up series
to get rid of this pattern in all architectures.
> 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.
Why?
Thomas