From: Zhangjin Wu <falcon@tinylab.org>
To: arnd@arndb.de
Cc: falcon@tinylab.org, linux-kernel@vger.kernel.org,
linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org,
tim.bird@sony.com, tanyuan@tinylab.org
Subject: Re: [PATCH v1 4/7] DCE/DSE: mips: add HAVE_TRIM_UNUSED_SYSCALLS support
Date: Sat, 7 Oct 2023 20:58:17 +0800 [thread overview]
Message-ID: <20231007125817.5259-1-falcon@tinylab.org> (raw)
In-Reply-To: <862f42d7-b582-4d88-a9d2-f72ea5bfe903@app.fastmail.com>
Hi, Arnd
> 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.
>
Agree very much, then we can simply touch the common files, no need to
touch the arch specific files.
> I should be able to help out with that part.
>
Thanks, is it enough to touch these ones?
$ ls scripts/syscall*
scripts/syscallhdr.sh scripts/syscallnr.sh scripts/syscalltbl.sh
One question here is that is it possible or required to share the used syscalls
selection code among them?
Another question require your help is the compat part, the compat stuff makes
things harder (include the Kconfig symbol interface definition and select
logic), perhaps we can simply limit our first DSE version under !COMPAT?
Best regards,
Zhangjin
> Arnd
next prev parent reply other threads:[~2023-10-07 12:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 22:33 [PATCH v1 0/7] DCE/DSE: Add Dead Syscalls Elimination support, part1 Zhangjin Wu
2023-09-25 22:35 ` [PATCH v1 1/7] DCE: add debug support Zhangjin Wu
2023-09-25 22:36 ` [PATCH v1 2/7] DCE/DSE: add unused syscalls elimination configure support Zhangjin Wu
2023-10-07 10:01 ` Yuan Tan
2023-09-25 22:38 ` [PATCH v1 3/7] DCE/DSE: Add a new scripts/Makefile.syscalls Zhangjin Wu
2023-09-26 5:55 ` Arnd Bergmann
2023-09-25 22:40 ` [PATCH v1 4/7] DCE/DSE: mips: add HAVE_TRIM_UNUSED_SYSCALLS support Zhangjin Wu
2023-09-26 6:07 ` Arnd Bergmann
2023-10-07 12:58 ` Zhangjin Wu [this message]
2023-09-25 22:41 ` [PATCH v1 5/7] DCE/DSE: riscv: move syscall tables to syscalls/ Zhangjin Wu
2023-09-25 22:42 ` [PATCH v1 6/7] DCE/DSE: riscv: add HAVE_TRIM_UNUSED_SYSCALLS support Zhangjin Wu
2023-09-26 6:10 ` Arnd Bergmann
2023-10-07 13:29 ` Zhangjin Wu
2023-10-07 20:43 ` Arnd Bergmann
2023-09-25 22:43 ` [PATCH v1 7/7] DCE/DSE: riscv: trim syscall tables Zhangjin Wu
2023-09-26 6:01 ` Arnd Bergmann
2023-10-07 13:35 ` Zhangjin Wu
2023-09-26 7:14 ` [PATCH v1 0/7] DCE/DSE: Add Dead Syscalls Elimination support, part1 Arnd Bergmann
2023-09-26 11:24 ` Arnd Bergmann
2023-09-26 14:07 ` Arnd Bergmann
2023-09-26 20:49 ` Nicolas Pitre
2023-09-27 10:21 ` Arnd Bergmann
2023-09-30 9:31 ` Yuan Tan
2023-10-03 16:43 ` Yuan Tan
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=20231007125817.5259-1-falcon@tinylab.org \
--to=falcon@tinylab.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=tanyuan@tinylab.org \
--cc=tim.bird@sony.com \
/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®