[PATCH 2/6] powerpc: Provide syscall wrapper

Arnd Bergmann arnd at arndb.de
Wed Jun 15 20:13:58 AEST 2022


On Wed, Jun 15, 2022 at 3:47 AM Rohan McLure <rmclure at linux.ibm.com> wrote:
> > On 3 Jun 2022, at 7:04 pm, Arnd Bergmann <arnd at arndb.de> wrote:
> > On Wed, Jun 1, 2022 at 7:48 AM Rohan McLure <rmclure at linux.ibm.com> wrote:

> > What is the benefit of having a separate set of macros for this? I think that
> > adds more complexity than it saves in the end.
>
> I was unsure whether the exact return types needed to be respected for syscall
> handlers or not. I realise that under the existing behaviour,
> system_call_exception performs an indirect call, the return type of which is
> interpreted as a long, so the return type should be irrelevant. On inspection
> PPC_SYSCALL_DEFINE is readily replacable with COMPAT_SYSCALL_DEFINE as you
> have suggested.
>
> Before resubmitting this series, I will try for a patch series which modernises
> syscall handlers in arch/powerpc, and inspect where powerpc private versions
> are strictly necessary, using __ARCH_WANT_... wherever possible.

Ok, great! The parameter ordering is a bit tricky for some of them. I think
in most cases the version used by risc-v now should be the same as what
you need for powerpc (with the appropriate compat_arg_u64_dual()).
If some don't work, I would suggest modifying the common code so it can
handle both riscv and powerpc instead of keeping a private copy.

       Arnd


More information about the Linuxppc-dev mailing list