[RFC,v6,09/23] RISC-V: Add support for 32-bit vDSO calls
Commit Message
---
sysdeps/unix/sysv/linux/riscv/sysdep.h | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
Comments
On Sun, Jan 12, 2020 at 11:40 AM Alistair Francis
<alistair.francis@wdc.com> wrote:
> +# if __riscv_xlen == 32
> +# define VDSO_NAME "LINUX_5.4"
> +# define VDSO_HASH 61765876
> +# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime64"
> +# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu"
Mainline linux doesn't have these yet on risc-v. I assume you have
patches to add them?
Arnd
On Mon, Jan 13, 2020 at 11:33 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Sun, Jan 12, 2020 at 11:40 AM Alistair Francis
> <alistair.francis@wdc.com> wrote:
> > +# if __riscv_xlen == 32
> > +# define VDSO_NAME "LINUX_5.4"
> > +# define VDSO_HASH 61765876
>
> > +# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime64"
> > +# define HAVE_GETCPU_VSYSCALL "__vdso_getcpu"
>
> Mainline linux doesn't have these yet on risc-v. I assume you have
> patches to add them?
No... I don't. I just assumed these were supported. I will drop this.
Alistair
>
> Arnd
@@ -194,14 +194,23 @@
#ifndef __ASSEMBLER__
-# define VDSO_NAME "LINUX_4.15"
-# define VDSO_HASH 182943605
+# if __riscv_xlen == 32
+# define VDSO_NAME "LINUX_5.4"
+# define VDSO_HASH 61765876
/* 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"
+# define HAVE_CLOCK_GETTIME64_VSYSCALL "__vdso_clock_gettime64"
+# 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
/* Define a macro which expands into the inline wrapper code for a system
call. */