All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Inform checksyscalls.sh about the rv32 ABI
@ 2021-09-06 18:52 Palmer Dabbelt
  2021-09-06 22:57 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Palmer Dabbelt @ 2021-09-06 18:52 UTC (permalink / raw)
  To: linux-riscv, Arnd Bergmann, Alistair Francis; +Cc: 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 <palmerdabbelt@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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] RISC-V: Inform checksyscalls.sh about the rv32 ABI
  2021-09-06 18:52 [PATCH] RISC-V: Inform checksyscalls.sh about the rv32 ABI Palmer Dabbelt
@ 2021-09-06 22:57 ` Arnd Bergmann
  2021-10-03  0:55   ` Palmer Dabbelt
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2021-09-06 22:57 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: linux-riscv, Arnd Bergmann, Alistair Francis

On Mon, Sep 6, 2021 at 8:52 PM Palmer Dabbelt <palmerdabbelt@google.com> wrote:
>
> 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@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

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.

> +/*
> + * 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
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] RISC-V: Inform checksyscalls.sh about the rv32 ABI
  2021-09-06 22:57 ` Arnd Bergmann
@ 2021-10-03  0:55   ` Palmer Dabbelt
  0 siblings, 0 replies; 3+ messages in thread
From: Palmer Dabbelt @ 2021-10-03  0:55 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-riscv, Arnd Bergmann, Alistair Francis

On Mon, 06 Sep 2021 15:57:32 PDT (-0700), Arnd Bergmann wrote:
> On Mon, Sep 6, 2021 at 8:52 PM Palmer Dabbelt <palmerdabbelt@google.com> wrote:
>>
>> 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@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
>
> 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.

OK, I've sent a patch to add it over there.

>
>> +/*
>> + * 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
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-03  0:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 18:52 [PATCH] RISC-V: Inform checksyscalls.sh about the rv32 ABI Palmer Dabbelt
2021-09-06 22:57 ` Arnd Bergmann
2021-10-03  0:55   ` Palmer Dabbelt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.