This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC v3 23/23] RISC-V: Use 64-bit vdso syscalls
On Wed, Jul 17, 2019 at 7:33 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Alistair Francis:
>
> > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> > ---
> > sysdeps/unix/sysv/linux/riscv/init-first.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/sysdeps/unix/sysv/linux/riscv/init-first.c b/sysdeps/unix/sysv/linux/riscv/init-first.c
> > index 155a4a2c0c..fa9c690cdd 100644
> > --- a/sysdeps/unix/sysv/linux/riscv/init-first.c
> > +++ b/sysdeps/unix/sysv/linux/riscv/init-first.c
> > @@ -43,11 +43,11 @@ _libc_vdso_platform_setup (void)
> > PTR_MANGLE (p);
> > VDSO_SYMBOL (gettimeofday) = p;
> >
> > - p = _dl_vdso_vsym ("__vdso_clock_gettime", &linux_version);
> > + p = _dl_vdso_vsym ("__vdso_clock_gettime64", &linux_version);
> > PTR_MANGLE (p);
> > VDSO_SYMBOL (clock_gettime) = p;
> >
> > - p = _dl_vdso_vsym ("__vdso_clock_getres", &linux_version);
> > + p = _dl_vdso_vsym ("__vdso_clock_getres_time64", &linux_version);
> > PTR_MANGLE (p);
> > VDSO_SYMBOL (clock_getres) = p;
> > }
>
> I believe this will lose vDSO acceleration for RV64 on older kernels
> which do not define __vdso_clock_getres_time64.
Also newer kernels, as 64-bit kernels only have __vdso_clock_getres,
not __vdso_clock_getres_time64.
Arnd