[RFC v3 23/23] RISC-V: Use 64-bit vdso syscalls
Alistair Francis
alistair23@gmail.com
Wed Jul 17 22:27:00 GMT 2019
On Wed, Jul 17, 2019 at 1:02 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> 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.
Ok, I can #ifdef this based on word size.
Alistair
>
> Arnd
More information about the Libc-alpha
mailing list