From: "Arnd Bergmann" <arnd@arndb.de>
To: "Zhangjin Wu" <falcon@tinylab.org>, "Willy Tarreau" <w@1wt.eu>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-riscv@lists.infradead.org,
"Thomas Weißschuh" <thomas@t-8ch.de>
Subject: Re: [PATCH v3 3/3] selftests/nolibc: riscv: customize makefile for rv32
Date: Tue, 06 Jun 2023 09:43:15 +0200 [thread overview]
Message-ID: <d1c83340-af4c-4780-a101-b9d22b47379c@app.fastmail.com> (raw)
In-Reply-To: <ca162c288c3eeda309c33049711b5272eb80f8e2.1685780412.git.falcon@tinylab.org>
On Sat, Jun 3, 2023, at 11:05, Zhangjin Wu wrote:
> Both riscv64 and riscv32 have:
>
> * the same ARCH value, it is riscv
> * the same arch/riscv source code tree
>
> The only differences are:
>
> * riscv64 uses defconfig, riscv32 uses rv32_defconfig
> * riscv64 uses qemu-system-riscv64, riscv32 uses qemu-system-riscv32
> * riscv32 has different compiler options (-march= and -mabi=)
>
> So, riscv32 can share most of the settings with riscv64, there is no
> need to add it as a whole new architecture but just need a flag to
> record and reflect the difference.
>
> The 32bit mips and loongarch may be able to use the same method, so,
> let's use a meaningful flag: CONFIG_32BIT. If required in the future,
> this flag can also be automatically loaded from
> include/config/auto.conf.
If we use a CONFIG_* symbol, I think it should be the other way
round, for consistency with the kernel, which uses CONFIG_64BIT
on all architectures, but only uses CONFIG_32BIT on mips, loongarch
powerpc and riscv.
> # kernel image names by architecture
> IMAGE_i386 = arch/x86/boot/bzImage
> IMAGE_x86_64 = arch/x86/boot/bzImage
> @@ -34,7 +40,7 @@ DEFCONFIG_x86 = defconfig
> DEFCONFIG_arm64 = defconfig
> DEFCONFIG_arm = multi_v7_defconfig
> DEFCONFIG_mips = malta_defconfig
> -DEFCONFIG_riscv = defconfig
> +DEFCONFIG_riscv = $(if $(CONFIG_32BIT),rv32_defconfig,defconfig)
> DEFCONFIG_s390 = defconfig
> DEFCONFIG_loongarch = defconfig
> DEFCONFIG = $(DEFCONFIG_$(ARCH))
This feels slightly odd, as we otherwise have a fixed defconfig
per target, so doing
DEFCONFIG_riscv = defconfig
DEFCONFIG_riscv64 = defconfig
DEFCONFIG_riscv32 = rv32_defconfig
would seem more consistent with how x86 is handled, and would
probably be more easily extensible if we want to also make
this work with other sub-targets like mipseb, armv5 or ppc32
in the future.
Arnd
next prev parent reply other threads:[~2023-06-06 7:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-03 9:00 [PATCH v3 0/3] nolibc: add part2 of support " Zhangjin Wu
2023-06-03 9:01 ` [PATCH v3 1/3] tools/nolibc: fix up #error compile failures with -ENOSYS Zhangjin Wu
2023-06-06 7:35 ` Arnd Bergmann
2023-06-07 5:19 ` Zhangjin Wu
2023-06-07 8:45 ` Arnd Bergmann
2023-06-07 9:46 ` Zhangjin Wu
2023-06-07 10:02 ` Arnd Bergmann
2023-06-07 13:26 ` Zhangjin Wu
2023-06-03 9:04 ` [PATCH v3 2/3] tools/nolibc: fix up undeclared syscall macros with #ifdef and -ENOSYS Zhangjin Wu
2023-06-03 9:05 ` [PATCH v3 3/3] selftests/nolibc: riscv: customize makefile for rv32 Zhangjin Wu
2023-06-06 7:43 ` Arnd Bergmann [this message]
2023-06-06 11:12 ` Zhangjin Wu
2023-06-06 11:21 ` Arnd Bergmann
2023-06-06 12:07 ` Zhangjin Wu
2023-06-07 1:20 ` Zhangjin Wu
2023-06-07 4:17 ` Willy Tarreau
2023-06-07 6:33 ` Zhangjin Wu
2023-06-07 7:33 ` Willy Tarreau
2023-06-07 8:11 ` Zhangjin Wu
2023-06-07 10:44 ` Willy Tarreau
2023-06-06 4:25 ` [PATCH v3 0/3] nolibc: add part2 of support " Zhangjin Wu
2023-06-06 4:42 ` Willy Tarreau
2023-06-06 6:34 ` Zhangjin Wu
2023-06-06 6:45 ` Willy Tarreau
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=d1c83340-af4c-4780-a101-b9d22b47379c@app.fastmail.com \
--to=arnd@arndb.de \
--cc=falcon@tinylab.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-riscv@lists.infradead.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
all inboxes | Powered by JetHome®