[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <862f42d7-b582-4d88-a9d2-f72ea5bfe903@app.fastmail.com>
Date: Tue, 26 Sep 2023 08:07:40 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Zhangjin Wu" <falcon@...ylab.org>, linux-kernel@...r.kernel.org,
linux-mips@...r.kernel.org, linux-riscv@...ts.infradead.org
Cc: "Palmer Dabbelt" <palmer@...osinc.com>,
"Paul Walmsley" <paul.walmsley@...ive.com>, paulburton@...nel.org,
"Paul E. McKenney" <paulmck@...nel.org>,
"Thomas Bogendoerfer" <tsbogend@...ha.franken.de>,
"Willy Tarreau" <w@....eu>,
Thomas Weißschuh <linux@...ssschuh.net>,
"Tim Bird" <tim.bird@...y.com>
Subject: Re: [PATCH v1 4/7] DCE/DSE: mips: add HAVE_TRIM_UNUSED_SYSCALLS support
On Tue, Sep 26, 2023, at 00:40, Zhangjin Wu wrote:
> For HAVE_TRIM_UNUSED_SYSCALLS, the syscall tables are hacked with the
> input used syscalls.
>
> Based on the used syscalls information, a new version of tbl file is
> generated from the original tbl file and named with a 'used' suffix.
>
> With this new tbl file, both unistd_nr_*.h and syscall_table_*.h files
> are updated to only include the used syscalls.
>
> $ grep _Linux_syscalls -ur arch/mips/include/generated/asm/
> arch/mips/include/generated/asm/unistd_nr_n64.h:#define
> __NR_64_Linux_syscalls 165
> arch/mips/include/generated/asm/unistd_nr_n32.h:#define
> __NR_N32_Linux_syscalls 165
> arch/mips/include/generated/asm/unistd_nr_o32.h:#define
> __NR_O32_Linux_syscalls 89
>
> $ grep -vr sys_ni_syscall
> arch/mips/include/generated/asm/syscall_table_*.h
> arch/mips/include/generated/asm/syscall_table_n32.h:__SYSCALL(58,
> sys_exit)
> arch/mips/include/generated/asm/syscall_table_n32.h:__SYSCALL(164,
> sys_reboot)
> arch/mips/include/generated/asm/syscall_table_n64.h:__SYSCALL(58,
> sys_exit)
My feeling is that instead of postprocessing the generated files,
it would be much better to make the elimination part of the
existing infrastructure that generates the files from syscall.tbl,
and finally change the include/asm-generic/unistd.h to the
same format, as we had planned for a long time.
I should be able to help out with that part.
Arnd
Powered by blists - more mailing lists