Re: [PATCH v7 03/13] scripts/syscall.tbl: Use the common table

From: Arnd Bergmann

Date: Fri Sep 18 2026 - 02:35:46 EST


On Fri, Sep 18, 2026, at 01:46, André Almeida wrote:
> Remove some of the duplicated code by using the common syscall number
> table.
>
> Signed-off-by: André Almeida <andrealmeid@xxxxxxxxxx>
> ---
> arch/arm64/tools/syscall_32.tbl | 69 -----------------------------------------
> scripts/Makefile.asm-headers | 15 ++++-----
> scripts/syscall.tbl | 69 -----------------------------------------
> 3 files changed, 8 insertions(+), 145 deletions(-)

This somewhat desyncs the two copies of the arm32 table, which
isn't great.

> diff --git a/scripts/Makefile.asm-headers b/scripts/Makefile.asm-headers
> index f1c3d287c14b..b09dbc8992c3 100644
> --- a/scripts/Makefile.asm-headers
> +++ b/scripts/Makefile.asm-headers
> @@ -15,9 +15,10 @@ all:
>
> src := $(srctree)/$(subst /generated,,$(obj))
>
> -syscall_abis_32 += common,32
> -syscall_abis_64 += common,64
> +syscall_abis_32 += clone3,common,32
> +syscall_abis_64 += clone3,common,64

The clone3 variant is wrong on nios2 and openrisc, as they need the
__clone3 version. These currently redirect it using a macro from
syscall_table.c doing

#define sys_clone3 __sys_clone3

which will continue to work here, but I don't like how this is
inconsistent between the architectures. Let's use either
syscall_abis_* or a macro to pick the clone3 variant on
all architectures, but not both.

Arnd