[PATCH v2 03/18] RISC-V: Add support for 32-bit vDSO calls

Alistair Francis alistair23@gmail.com
Wed Jul 8 18:17:24 GMT 2020


On Tue, Jul 7, 2020 at 6:02 PM Maciej W. Rozycki via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> On Wed, 3 Jun 2020, Alistair Francis via Libc-alpha wrote:
>
> > diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h
> > index aa61e8b04d..9f6ed2001b 100644
> > --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h
> > +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h
> > @@ -182,14 +182,21 @@
> >
> >  #ifndef __ASSEMBLER__
> >
> > -# define VDSO_NAME  "LINUX_4.15"
> > -# define VDSO_HASH  182943605
> > +# if __riscv_xlen == 32
>
>  Same note on __riscv_xlen vs __WORDSIZE as with 02/18.

Fixed

>
>  Also given it is a two-way conditional we can choose which leg is first
> and I'd make that the RV64 variant, as the first to be there and more
> developed, as evident here.

Fixed.

>
> >  /* List of system calls which are supported as vsyscalls.  */
> > -# define HAVE_CLOCK_GETRES64_VSYSCALL        "__vdso_clock_getres"
> > -# define HAVE_CLOCK_GETTIME64_VSYSCALL       "__vdso_clock_gettime"
> > -# define HAVE_GETTIMEOFDAY_VSYSCALL  "__vdso_gettimeofday"
> > -# define HAVE_GETCPU_VSYSCALL                "__vdso_getcpu"
> > +# else
> > +#  define VDSO_NAME  "LINUX_4.15"
> > +#  define VDSO_HASH  182943605
> > +
> > +/* List of system calls which are supported as vsyscalls.  */
> > +#  define HAVE_CLOCK_GETRES64_VSYSCALL   "__vdso_clock_getres"
> > +#  define HAVE_CLOCK_GETTIME64_VSYSCALL  "__vdso_clock_gettime"
> > +#  define HAVE_GETTIMEOFDAY_VSYSCALL     "__vdso_gettimeofday"
> > +#  define HAVE_GETCPU_VSYSCALL           "__vdso_getcpu"
> > +# endif
>
>  Also "__vdso_getcpu" does get exported unlike the time calls with RV32
> AFAICT:
>
> # Symbols present in the vdso
> vdso-syms  = rt_sigreturn
> ifdef CONFIG_64BIT
> vdso-syms += vgettimeofday
> endif
> vdso-syms += getcpu
> vdso-syms += flush_icache
>
> so it should be included (and placed outside the conditional, unlike with
> an earlier version of this change).  Then the change description (and
> preferably a comment as well) ought to explain why the remaining ones have
> been left out for RV32.

Ok, I have fixed this as well.

Alistair

>
>   Maciej


More information about the Libc-alpha mailing list