about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2019-09-18 08:41:59 -0700
committerAlistair Francis <alistair.francis@wdc.com>2020-08-27 08:17:42 -0700
commit68efae739a3eae514dafb52c42d5e3295fd13903 (patch)
treed9f0d0d8a6561a3165ba1c3ffb313103f25a7cae /sysdeps
parent7ed05adc829c1b3690080c693888287255b7322b (diff)
downloadglibc-68efae739a3eae514dafb52c42d5e3295fd13903.tar.gz
glibc-68efae739a3eae514dafb52c42d5e3295fd13903.tar.xz
glibc-68efae739a3eae514dafb52c42d5e3295fd13903.zip
RISC-V: Add support for 32-bit vDSO calls
Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/riscv/sysdep.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h
index 430fa23a58..e94afbf106 100644
--- a/sysdeps/unix/sysv/linux/riscv/sysdep.h
+++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h
@@ -135,13 +135,24 @@
 
 #else /* !__ASSEMBLER__ */
 
-# define VDSO_NAME  "LINUX_4.15"
-# define VDSO_HASH  182943605
+# if __WORDSIZE == 64
+#  define VDSO_NAME	"LINUX_4.15"
+#  define VDSO_HASH	182943605
+
+/* List of system calls which are supported as vsyscalls only
+   for RV64.  */
+#  define HAVE_CLOCK_GETRES64_VSYSCALL	"__vdso_clock_getres"
+#  define HAVE_CLOCK_GETTIME64_VSYSCALL	"__vdso_clock_gettime"
+#  define HAVE_GETTIMEOFDAY_VSYSCALL	"__vdso_gettimeofday"
+# else
+#  define VDSO_NAME	"LINUX_5.4"
+#  define VDSO_HASH	61765876
+
+/* RV32 does not support the gettime VDSO syscalls.  */
+# endif
 
-/* 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"
+/* List of system calls which are supported as vsyscalls (for RV32 and
+   RV64).  */
 # define HAVE_GETCPU_VSYSCALL		"__vdso_getcpu"
 
 # define INTERNAL_SYSCALL(name, nr, args...) \