public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
From: "Sverdlin, Alexander" <alexander.sverdlin@siemens.com>
To: "thomas.weissschuh@linutronix.de"
	<thomas.weissschuh@linutronix.de>,
	"npiggin@gmail.com" <npiggin@gmail.com>,
	"luto@kernel.org" <luto@kernel.org>,
	"chleroy@kernel.org" <chleroy@kernel.org>,
	"maddy@linux.ibm.com" <maddy@linux.ibm.com>,
	"tglx@kernel.org" <tglx@kernel.org>,
	"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
	"vincenzo.frascino@arm.com" <vincenzo.frascino@arm.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] powerpc/vdso: Provide clock_getres_time64()
Date: Thu, 22 Jan 2026 09:39:09 +0000	[thread overview]
Message-ID: <f45316f65a46da638b3c6aa69effd8980e6677b9.camel@siemens.com> (raw)
In-Reply-To: <20260114-vdso-powerpc-align-v1-1-acf09373d568@linutronix.de>

Hi Thomas, Christophe,

On Wed, 2026-01-14 at 08:26 +0100, Thomas Weißschuh wrote:
> 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>

I've bisected this patch to cause the following build failure on my side:

  LDS     arch/powerpc/kernel/vdso/vdso32.lds
  VDSO32A arch/powerpc/kernel/vdso/sigtramp32-32.o
  VDSO32A arch/powerpc/kernel/vdso/gettimeofday-32.o
  VDSO32A arch/powerpc/kernel/vdso/datapage-32.o
  VDSO32A arch/powerpc/kernel/vdso/cacheflush-32.o
  VDSO32A arch/powerpc/kernel/vdso/note-32.o
  VDSO32A arch/powerpc/kernel/vdso/getcpu-32.o
  VDSO32A arch/powerpc/kernel/vdso/getrandom-32.o
  VDSO32A arch/powerpc/kernel/vdso/vgetrandom-chacha-32.o
  VDSO32C arch/powerpc/kernel/vdso/vgettimeofday-32.o
  VDSO32C arch/powerpc/kernel/vdso/vgetrandom-32.o
  VDSO32A arch/powerpc/kernel/vdso/crtsavres-32.o
  VDSO32L arch/powerpc/kernel/vdso/vdso32.so.dbg
arch/powerpc/kernel/vdso/vdso32.so.dbg: dynamic relocations are not supported
make[2]: *** [arch/powerpc/kernel/vdso/Makefile:79: arch/powerpc/kernel/vdso/vdso32.so.dbg] Error 1
make[1]: *** [arch/powerpc/Makefile:388: vdso_prepare] Error 2

Does it ring any bells? What could I try/test?

I'm using gcc-15.2.0 and binutils 2.45.1.

> ---
> 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,

-- 
Alexander Sverdlin
Siemens AG
www.siemens.com

  parent reply	other threads:[~2026-01-22  9:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14  7:26 [PATCH] powerpc/vdso: Provide clock_getres_time64() Thomas Weißschuh
2026-01-14  8:27 ` Christophe Leroy (CS GROUP)
2026-01-22  9:39 ` Sverdlin, Alexander [this message]
2026-01-22  9:50   ` Thomas Weißschuh
2026-01-22 10:00     ` Sverdlin, Alexander
2026-01-22 10:27     ` Christophe Leroy (CS GROUP)
2026-01-22 10:49       ` Thomas Weißschuh
2026-01-22 10:58         ` Christophe Leroy (CS GROUP)
2026-01-22 11:07           ` Thomas Weißschuh
2026-01-22 11:31             ` Christophe Leroy (CS GROUP)
2026-01-22 11:41               ` Thomas Weißschuh
2026-01-22 13:30                 ` Christophe Leroy (CS GROUP)
2026-01-22 10:49       ` Christophe Leroy (CS GROUP)
2026-01-22  9:53   ` Christophe Leroy (CS GROUP)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f45316f65a46da638b3c6aa69effd8980e6677b9.camel@siemens.com \
    --to=alexander.sverdlin@siemens.com \
    --cc=chleroy@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=luto@kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=tglx@kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=vincenzo.frascino@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox