mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@igalia.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org,
	Nathan Chancellor <nathan@kernel.org>,
	Thomas Gleixner <tglx@kernel.org>,
	linux-kbuild@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>,
	kernel-dev@igalia.com
Subject: Re: [PATCH RFC v3 8/8] mips: Use the common syscall table
Date: Mon, 10 Aug 2026 10:20:30 -0300	[thread overview]
Message-ID: <cac9327a-25f9-4a56-8aea-e9eda7f1c76a@igalia.com> (raw)
In-Reply-To: <772d5c6a-d080-4bff-acbd-5021d93ca2d7@app.fastmail.com>

Em 07/08/2026 18:02, Arnd Bergmann escreveu:
> On Fri, Aug 7, 2026, at 21:34, André Almeida wrote:
>> Syscall numbers from 403 are shared with all architectures, so move the
>> toolchain to use the common syscall table and remove duplicated code.
>>
>> The generated files are not exactly the same as before, but they have no
>> functional changes:
>>
>>   - for O32 ABI, the syscall table would have entries like
>>   __SYSCALL_WITH_COMPAT(403, sys_clock_gettime, sys_clock_gettime)
>>   which is equivalent to the new entry __SYSCALL(403, sys_clock_gettime)
>>
>>   - for N32 ABI, the syscall table would have entries like
>>   __SYSCALL(413, compat_sys_pselect6_time64), which is equivalent to
>>   __SYSCALL_WITH_COMPAT(413, sys_pselect6, compat_sys_pselect6_time64)
>>   given the new __SYSCALL_WITH_COMPAT() definition for N32.
>>
>> The generated syscall table for N64 is exactly the same.
>>
>> Signed-off-by: André Almeida <andrealmeid@igalia.com>
>> ---
>>   arch/mips/kernel/scall64-n32.S            |  1 +
>>   arch/mips/kernel/syscalls/Makefile        | 22 +++++++---
>>   arch/mips/kernel/syscalls/syscall_n32.tbl | 68 -------------------------------
>>   arch/mips/kernel/syscalls/syscall_n64.tbl | 48 ----------------------
>>   arch/mips/kernel/syscalls/syscall_o32.tbl | 68 -------------------------------
>>   5 files changed, 18 insertions(+), 189 deletions(-)
> 
> I still wonder whether we should combine the n32 and n64 tables
> here. Since the script can now deal with multiple input files,
> the first 211 syscall numbers can be in a shared file, while
> numbers 212 through 332 are always going to be different.
> 
> Alternatively, two the files could just be merged into one file
> like
> 
> 0       common    read                       sys_read
> 1       common    write                      sys_write
> ...
> 13      common    rt_sigaction                sys_rt_sigaction     compat_sys_rt_sigaction
> ...
> 210     common    remap_file_pages           sys_remap_file_pages
> 211     common    rt_sigreturn               sys_rt_sigreturn
> ...
> 212     32        fcntl64                       compat_sys_fcntl64
> 213     32        set_tid_address               sys_set_tid_address
> ...
> 212     64        set_tid_address               sys_set_tid_address
> 213     64        restart_syscall               sys_restart_syscall
> 
>   
>> -$(kapi)/unistd_nr_%.h: $(src)/syscall_%.tbl $(sysnr) FORCE
>> +abis := common,__cln3
>> +
>> +abis_n32 := $(abis),32,n32
>> +abis_o32 := $(abis),32,o32
>> +abis_n64 := $(abis),64,n64
> 
> We should probably drop the custom ABI names here and just use
> common/32/64 in the .tbl file. There was never a real need for
> the special case here, and now it causes extra complexity.
> 
Ok! I like this ideas, I will prepare it for v4

  reply	other threads:[~2026-08-10 13:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 19:34 [PATCH RFC v3 0/8] syscalls: Add a shared table for all archs André Almeida
2026-08-07 19:34 ` [PATCH RFC v3 1/8] syscalls: Make --abis parsing more robust André Almeida
2026-08-07 19:34 ` [PATCH RFC v3 2/8] syscalls: Create unified partial table for all archs André Almeida
2026-08-07 20:40   ` Arnd Bergmann
2026-08-10 13:19     ` André Almeida
2026-08-10 14:22       ` Arnd Bergmann
2026-08-07 19:34 ` [PATCH RFC v3 3/8] scripts/syscall.tbl: Use the common table André Almeida
2026-08-07 19:34 ` [PATCH RFC v3 4/8] arm: Use the common syscall table André Almeida
2026-08-07 19:34 ` [PATCH RFC v3 5/8] s390: " André Almeida
2026-08-07 19:34 ` [PATCH RFC v3 6/8] sparc: " André Almeida
2026-08-07 19:34 ` [PATCH RFC v3 7/8] mips: Remove duplicated syscallnr.sh André Almeida
2026-08-07 19:34 ` [PATCH RFC v3 8/8] mips: Use the common syscall table André Almeida
2026-08-07 21:02   ` Arnd Bergmann
2026-08-10 13:20     ` André Almeida [this message]
2026-08-07 20:43 ` [PATCH RFC v3 0/8] syscalls: Add a shared table for all archs Arnd Bergmann
2026-08-10 13:25   ` André Almeida
2026-08-10 14:18     ` Arnd Bergmann

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=cac9327a-25f9-4a56-8aea-e9eda7f1c76a@igalia.com \
    --to=andrealmeid@igalia.com \
    --cc=arnd@arndb.de \
    --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®