From: "Arnd Bergmann" <arnd@arndb.de>
To: "André Almeida" <andrealmeid@igalia.com>,
"Thomas Gleixner" <tglx@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Masami Hiramatsu" <mhiramat@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
kernel-dev@igalia.com
Subject: Re: [PATCH v4 12/12] alpha: Use the common syscall table
Date: Wed, 12 Aug 2026 11:09:44 +0200 [thread overview]
Message-ID: <581ec9d7-d308-4fcf-bcf9-f243661fcc59@app.fastmail.com> (raw)
In-Reply-To: <20260812-tonyk-syscall_table-v4-12-748d0229ad40@igalia.com>
On Wed, Aug 12, 2026, at 05:33, André Almeida wrote:
> Remove some of the duplicated code by using the common syscall number
>
> quiet_cmd_syshdr = SYSHDR $@
> - cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr $< $@
> + cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr \
> + --common-tbl $(systbl_common) --common-offset 110 \
> + --abis $(abis) $< $@
>
> quiet_cmd_systbl = SYSTBL $@
> - cmd_systbl = $(CONFIG_SHELL) $(systbl) $< $@
> + cmd_systbl = $(CONFIG_SHELL) $(systbl) \
> + --common-tbl $(systbl_common) --common-offset 110 \
> + --abis $(abis) $< $@
The --common-offset agument does seem simple enough here and it
avoids processing the files separately.
> @@ -45,6 +45,7 @@
> 434 common pidfd_open sys_pidfd_open
> 435 clone3 clone3 sys_clone3
> 435 __clone3 clone3 __sys_clone3
> +435 alpha clone3 alpha_clone3
> 436 common close_range sys_close_range
> 437 common openat2 sys_openat2
> 438 common pidfd_getfd sys_pidfd_getfd
I think it would be nicer to change the "fork_like" macro in
arch/alpha/kernel/entry.S to use the same __sys_clone3 name
(and fork/vfork/clone) that we have on
m68k/mips/nios2/openrisc/sparc and save another special case.
Or we could do this the way that nios2 does with a redirect
in the syscall_table.c file, which does:
#define __SYSCALL(nr, call) [nr] = (call),
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native)
#define sys_clone3 __sys_clone3
void *sys_call_table[__NR_syscalls] = {
[0 ... __NR_syscalls-1] = sys_ni_syscall,
#include <asm/syscall_table_32.h>
};
This could just completely avoid having two entries for clone3.
Arnd
next prev parent reply other threads:[~2026-08-12 9:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 3:32 [PATCH v4 00/12] syscalls: Add a shared table for all archs André Almeida
2026-08-12 3:32 ` [PATCH v4 01/12] syscalls: Make --abis parsing more robust André Almeida
2026-08-12 3:32 ` [PATCH v4 02/12] syscalls: Create unified partial table for all archs André Almeida
2026-08-12 3:32 ` [PATCH v4 03/12] scripts/syscall.tbl: Use the common table André Almeida
2026-08-12 3:33 ` [PATCH v4 04/12] arm: Use the common syscall table André Almeida
2026-08-12 3:33 ` [PATCH v4 05/12] s390: " André Almeida
2026-08-12 3:33 ` [PATCH v4 06/12] sparc: " André Almeida
2026-08-12 3:33 ` [PATCH v4 07/12] mips: Remove duplicated syscallnr.sh André Almeida
2026-08-12 3:33 ` [PATCH v4 08/12] mips: Get rid of custom mips ABIs for syscall tables André Almeida
2026-08-12 9:16 ` Arnd Bergmann
2026-08-12 12:53 ` André Almeida
2026-08-12 13:11 ` Arnd Bergmann
2026-08-12 17:36 ` André Almeida
2026-08-12 3:33 ` [PATCH v4 09/12] mips: Use the common syscall table André Almeida
2026-08-12 3:33 ` [PATCH v4 10/12] syscalls: Add an option for offsetting the common table André Almeida
2026-08-12 3:33 ` [PATCH v4 11/12] alpha: Define entry point for set_mempolicy_home_node syscall André Almeida
2026-08-12 3:33 ` [PATCH v4 12/12] alpha: Use the common syscall table André Almeida
2026-08-12 9:09 ` Arnd Bergmann [this message]
2026-08-12 12:55 ` André Almeida
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=581ec9d7-d308-4fcf-bcf9-f243661fcc59@app.fastmail.com \
--to=arnd@arndb.de \
--cc=andrealmeid@igalia.com \
--cc=kernel-dev@igalia.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=nathan@kernel.org \
--cc=tglx@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®