RISC-V: Inform checksyscalls.sh about the rv32 ABI
PATCH 1/1 RISC-V: Inform checksyscalls.sh about the rv32 ABI
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.
--- arch/riscv/include/asm/unistd.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/riscv/include/asm/unistd.h +14 -0
@@ -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
Signature · 7 lines
2.33.0.153.gba50c8fa24-goog _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 22 lines · Palmer Dabbelt
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 <[email protected]>--- arch/riscv/include/asm/unistd.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/riscv/include/asm/unistd.h +0
-0@@ -14,3 +14,17 @@#include <uapi/asm/unistd.h>
arch/riscv/include/asm/unistd.h line 24
Quoted 10 lines
arch/riscv/include/asm/unistd.h +8
-0#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
These should be in the checksyscalls.pl script: new architectures can all just use statx() here. This has nothing to do with 32-bit off/len though, only with time64.
arch/riscv/include/asm/unistd.h line 30
Quoted 6 lines
arch/riscv/include/asm/unistd.h +6
-0+/* +* 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
clone3 should be implemented, IIRC it's only missing because there is no easy way to do an architecture-independent version.
Arnd
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 24 lines · Arnd Bergmann
Quoted 23 lines · Palmer Dabbelt
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 <[email protected]>--- arch/riscv/include/asm/unistd.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/riscv/include/asm/unistd.h +0
-0@@ -14,3 +14,17 @@#include <uapi/asm/unistd.h>
Quoted 13 lines
arch/riscv/include/asm/unistd.h line 24
Quoted 9 lines
arch/riscv/include/asm/unistd.h +8
-0#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_fstatat64These should be in the checksyscalls.pl script: new architectures can all just use
statx()here. This has nothing to do with 32-bit off/len though, only with time64.
OK, I've sent a patch to add it over there.
Quoted 10 lines
arch/riscv/include/asm/unistd.h line 30
Quoted 7 lines
arch/riscv/include/asm/unistd.h +6
-0+/* +* 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 clone3 should be implemented, IIRC it's only missing because there is no easy way to do an architecture-independent version.
Not sure what I was thinking when I wrote that one. Luckily there's an easy __ARCH_WANT_SYS_CLONE3 now, so we can just use that. I'm not sure why it never ended up in rv32, maybe because we were only testing rv64 at the time.
I sent a patch for this too.
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv