From: Zhangjin Wu <falcon@tinylab.org>
To: w@1wt.eu
Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, thomas@t-8ch.de
Subject: [PATCH v2 00/12] tools/nolibc: shrink arch support
Date: Sat, 8 Jul 2023 23:25:37 +0800 [thread overview]
Message-ID: <cover.1688828139.git.falcon@tinylab.org> (raw)
Hi, Willy
This is v2 of the "tools/nolibc: shrink arch support" [1].
This v2 has no core code logic change, but applies some suggestions from
Willy and Thomas, one is using post-whitespaces instead of post-tab,
another is restructuring the arch support directory and files [2].
Like musl, this v2 creates <ARCH> directory for every arch and splits
the old arch-<ARCH>.h to <ARCH>/{crt.h, sys.h} and at the same time,
splits the old arch.h to crt_arch.h and sys_arch.h. at last, only need
to include crt_arch.h in crt.h and sys_arch.h in sys.h respectively, and
no longer need to include arch.h in the other common headers:
crt.h <-- crt_arch.h <-- <ARCH>/crt.h
sys.h <-- sys_arch.h <-- <ARCH>/sys.h
It is based on the 20230705-nolibc-series2 branch of nolibc repo [3]. It
should be applied after the v6 __sysret helper series [4] and the v4
min config support series [5].
Here is the test report for all of the supported architectures:
arch/board | result
------------|------------
arm/vexpress-a9 | 142 test(s) passed, 1 skipped, 0 failed.
arm/virt | 142 test(s) passed, 1 skipped, 0 failed.
aarch64/virt | 142 test(s) passed, 1 skipped, 0 failed.
ppc/g3beige | not supported
ppc/ppce500 | not supported
i386/pc | 142 test(s) passed, 1 skipped, 0 failed.
x86_64/pc | 142 test(s) passed, 1 skipped, 0 failed.
mipsel/malta | 142 test(s) passed, 1 skipped, 0 failed.
loongarch64/virt | 142 test(s) passed, 1 skipped, 0 failed.
riscv64/virt | 142 test(s) passed, 1 skipped, 0 failed.
riscv32/virt | 0 test(s) passed, 0 skipped, 0 failed.
s390x/s390-ccw-virtio | 142 test(s) passed, 1 skipped, 0 failed.
Changes from v1 --> v2:
* tools/nolibc: rename arch-<ARCH>.h to <ARCH>/arch.h
tools/nolibc: split arch.h to crt.h and sys.h
Restruct the arch support directory and files.
Fix up the errors reported by scripts/checkpatch.pl.
* tools/nolibc: sys.h: remove the old sys_stat support
Rebase on the new arch support directory and files.
* tools/nolibc: crt.h: add _start_c
Move #include "compiler.h" in the common crt.h too.
* tools/nolibc: arm/crt.h: shrink _start with _start_c
tools/nolibc: aarch64/crt.h: shrink _start with _start_c
tools/nolibc: i386/crt.h: shrink _start with _start_c
tools/nolibc: x86_64/crt.h: shrink _start with _start_c
tools/nolibc: mips/crt.h: shrink _start with _start_c
tools/nolibc: loongarch/crt.h: shrink _start with _start_c
tools/nolibc: riscv/crt.h: shrink _start with _start_c
tools/nolibc: s390/crt.h: shrink _start with _start_c
Rebase on the new arch support directory and files.
Use post-whitespaces instead of post-tab.
Best regards,
Zhangjin
---
[1]: https://lore.kernel.org/lkml/cover.1687976753.git.falcon@tinylab.org/
[2]: https://lore.kernel.org/lkml/20230703145500.500460-1-falcon@tinylab.org/
[3]: https://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/nolibc.git
[4]: https://lore.kernel.org/lkml/cover.1688739492.git.falcon@tinylab.org/
[5]: https://lore.kernel.org/lkml/cover.1688750763.git.falcon@tinylab.org/
Zhangjin Wu (12):
tools/nolibc: rename arch-<ARCH>.h to <ARCH>/arch.h
tools/nolibc: split arch.h to crt.h and sys.h
tools/nolibc: sys.h: remove the old sys_stat support
tools/nolibc: crt.h: add _start_c
tools/nolibc: arm/crt.h: shrink _start with _start_c
tools/nolibc: aarch64/crt.h: shrink _start with _start_c
tools/nolibc: i386/crt.h: shrink _start with _start_c
tools/nolibc: x86_64/crt.h: shrink _start with _start_c
tools/nolibc: mips/crt.h: shrink _start with _start_c
tools/nolibc: loongarch/crt.h: shrink _start with _start_c
tools/nolibc: riscv/crt.h: shrink _start with _start_c
tools/nolibc: s390/crt.h: shrink _start with _start_c
tools/include/nolibc/Makefile | 36 ++++---
tools/include/nolibc/aarch64/crt.h | 24 +++++
.../nolibc/{arch-aarch64.h => aarch64/sys.h} | 68 +------------
tools/include/nolibc/arch.h | 36 -------
tools/include/nolibc/arm/crt.h | 25 +++++
.../include/nolibc/{arch-arm.h => arm/sys.h} | 96 +------------------
tools/include/nolibc/crt.h | 60 ++++++++++++
tools/include/nolibc/crt_arch.h | 32 +++++++
tools/include/nolibc/i386/crt.h | 33 +++++++
.../nolibc/{arch-i386.h => i386/sys.h} | 77 +--------------
tools/include/nolibc/loongarch/crt.h | 30 ++++++
.../{arch-loongarch.h => loongarch/sys.h} | 64 +------------
tools/include/nolibc/mips/crt.h | 32 +++++++
.../nolibc/{arch-mips.h => mips/sys.h} | 87 +----------------
tools/include/nolibc/nolibc.h | 2 +-
tools/include/nolibc/riscv/crt.h | 28 ++++++
.../nolibc/{arch-riscv.h => riscv/sys.h} | 83 +---------------
tools/include/nolibc/s390/crt.h | 21 ++++
.../nolibc/{arch-s390.h => s390/sys.h} | 74 +-------------
tools/include/nolibc/signal.h | 1 -
tools/include/nolibc/stdio.h | 1 -
tools/include/nolibc/stdlib.h | 2 +-
tools/include/nolibc/sys.h | 65 +++----------
tools/include/nolibc/sys_arch.h | 32 +++++++
tools/include/nolibc/time.h | 1 -
tools/include/nolibc/types.h | 4 +-
tools/include/nolibc/unistd.h | 1 -
tools/include/nolibc/x86_64/crt.h | 33 +++++++
.../nolibc/{arch-x86_64.h => x86_64/sys.h} | 74 +-------------
29 files changed, 421 insertions(+), 701 deletions(-)
create mode 100644 tools/include/nolibc/aarch64/crt.h
rename tools/include/nolibc/{arch-aarch64.h => aarch64/sys.h} (76%)
delete mode 100644 tools/include/nolibc/arch.h
create mode 100644 tools/include/nolibc/arm/crt.h
rename tools/include/nolibc/{arch-arm.h => arm/sys.h} (74%)
create mode 100644 tools/include/nolibc/crt.h
create mode 100644 tools/include/nolibc/crt_arch.h
create mode 100644 tools/include/nolibc/i386/crt.h
rename tools/include/nolibc/{arch-i386.h => i386/sys.h} (73%)
create mode 100644 tools/include/nolibc/loongarch/crt.h
rename tools/include/nolibc/{arch-loongarch.h => loongarch/sys.h} (73%)
create mode 100644 tools/include/nolibc/mips/crt.h
rename tools/include/nolibc/{arch-mips.h => mips/sys.h} (74%)
create mode 100644 tools/include/nolibc/riscv/crt.h
rename tools/include/nolibc/{arch-riscv.h => riscv/sys.h} (70%)
create mode 100644 tools/include/nolibc/s390/crt.h
rename tools/include/nolibc/{arch-s390.h => s390/sys.h} (68%)
create mode 100644 tools/include/nolibc/sys_arch.h
create mode 100644 tools/include/nolibc/x86_64/crt.h
rename tools/include/nolibc/{arch-x86_64.h => x86_64/sys.h} (76%)
--
2.25.1
next reply other threads:[~2023-07-08 15:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-08 15:25 Zhangjin Wu [this message]
2023-07-08 15:26 ` [PATCH v2 01/12] tools/nolibc: rename arch-<ARCH>.h to <ARCH>/arch.h Zhangjin Wu
2023-07-09 9:56 ` Willy Tarreau
2023-07-10 7:23 ` Zhangjin Wu
2023-07-10 15:51 ` Thomas Weißschuh
2023-07-11 7:41 ` Willy Tarreau
2023-07-11 16:38 ` Zhangjin Wu
2023-07-11 19:28 ` Willy Tarreau
2023-07-08 15:27 ` [PATCH v2 02/12] tools/nolibc: split arch.h to crt.h and sys.h Zhangjin Wu
2023-07-08 15:28 ` [PATCH v2 03/12] tools/nolibc: sys.h: remove the old sys_stat support Zhangjin Wu
2023-07-08 15:29 ` [PATCH v2 04/12] tools/nolibc: crt.h: add _start_c Zhangjin Wu
2023-07-09 18:49 ` Thomas Weißschuh
2023-07-09 21:00 ` Thomas Weißschuh
2023-07-10 9:26 ` Zhangjin Wu
2023-07-10 15:24 ` Thomas Weißschuh
2023-07-10 16:45 ` Zhangjin Wu
2023-07-08 15:31 ` [PATCH v2 05/12] tools/nolibc: arm/crt.h: shrink _start with _start_c Zhangjin Wu
2023-07-08 15:32 ` [PATCH v2 06/12] tools/nolibc: aarch64/crt.h: " Zhangjin Wu
2023-07-08 15:33 ` [PATCH v2 07/12] tools/nolibc: i386/crt.h: " Zhangjin Wu
2023-07-08 15:34 ` [PATCH v2 08/12] tools/nolibc: x86_64/crt.h: " Zhangjin Wu
2023-07-08 15:35 ` [PATCH v2 09/12] tools/nolibc: mips/crt.h: " Zhangjin Wu
2023-07-08 15:36 ` [PATCH v2 10/12] tools/nolibc: loongarch/crt.h: " Zhangjin Wu
2023-07-08 15:37 ` [PATCH v2 11/12] tools/nolibc: riscv/crt.h: " Zhangjin Wu
2023-07-08 15:38 ` [PATCH v2 12/12] tools/nolibc: s390/crt.h: " Zhangjin Wu
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=cover.1688828139.git.falcon@tinylab.org \
--to=falcon@tinylab.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=thomas@t-8ch.de \
--cc=w@1wt.eu \
/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