[PATCH] RISC-V: Inform checksyscalls.sh about the rv32 ABI

Palmer Dabbelt palmerdabbelt at google.com
Mon Sep 6 11:52:01 PDT 2021


I remember having seen some build output from this before, but didn't
know what it meant.  These are now showing up as errors.

As far as I understand our 32-bit syscall ABI is fine, the issue here is
simply that we don't need the syscalls in question because we never had
the legacy versions to begin with.  One could imagine describing these
constraints in an arch-generic way, but I'm not sure it's worth
bothering until another arch comes along that behaves this way.

Fixes: d4c08b9776b3 ("riscv: Use latest system call ABI")
Signed-off-by: Palmer Dabbelt <palmerdabbelt at google.com>
---
 arch/riscv/include/asm/unistd.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
index 6c316093a1e5..cbc2646b4662 100644
--- a/arch/riscv/include/asm/unistd.h
+++ b/arch/riscv/include/asm/unistd.h
@@ -14,3 +14,17 @@
 #include <uapi/asm/unistd.h>
 
 #define NR_syscalls (__NR_syscalls)
+
+#if __BITS_PER_LONG == 32
+/*
+ * RISC-V never had the 32-bit off/len syscall flavors, which means we don't
+ * need the the explicit off64/len64 versions.
+ */
+#define __IGNORE_fstat64
+#define __IGNORE_fstatat64
+/*
+ * RISC-V never had the 32-bit time_t syscall flavors, which means we don't
+ * need the explicit 64-bit versions.
+ */
+#define __IGNORE_clone3
+#endif
-- 
2.33.0.153.gba50c8fa24-goog




More information about the linux-riscv mailing list