Message ID | 29811415ee8fa8e8e4cb379903c2199b5df54f9b.1578824547.git.alistair.francis@wdc.com |
---|---|
State | New |
Headers | show |
Series | RISC-V glibc port for the 32-bit | expand |
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
diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h index d030bf0db0..b02a5c30f6 100644 --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h @@ -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. */