From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Palmer Dabbelt <palmer@rivosinc.com>
Cc: linux-riscv <linux-riscv@lists.infradead.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Randy Dunlap <rdunlap@infradead.org>,
Arnd Bergmann <arnd@arndb.de>, Anup Patel <anup@brainfault.org>,
Alexandre Ghiti <alexandre.ghiti@canonical.com>,
Damien Le Moal <damien.lemoal@opensource.wdc.com>,
Atish Patra <atishp@rivosinc.com>, Jens Axboe <axboe@kernel.dk>,
Guo Ren <guoren@kernel.org>,
mchitale@ventanamicro.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux@rivosinc.com
Subject: Re: [PATCH v3] RISC-V: Add CONFIG_{NON,}PORTABLE
Date: Fri, 15 Jul 2022 09:47:58 +0200 [thread overview]
Message-ID: <CAMuHMdVJ7bhPka0acgw2wAZmsgDP2+tbqS7fO2A=_BOmv+8+HA@mail.gmail.com> (raw)
In-Reply-To: <20220521193356.26562-1-palmer@rivosinc.com>
Hi Palmer,
On Sat, May 21, 2022 at 10:49 PM Palmer Dabbelt <palmer@rivosinc.com> wrote:
> From: Palmer Dabbelt <palmer@rivosinc.com>
>
> The RISC-V port has collected a handful of options that are
> fundamentally non-portable. To prevent users from shooting themselves
> in the foot, hide them all behind a config entry that explicitly calls
> out that non-portable binaries may be produced.
>
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Thanks for your patch, which is now commit 44c1e84a38a03175 ("RISC-V:
Add CONFIG_{NON,}PORTABLE") in riscv/for-next
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -222,6 +222,21 @@ source "arch/riscv/Kconfig.erratas"
>
> menu "Platform type"
>
> +config NONPORTABLE
> + bool "Allow configurations that result in non-portable kernels"
> + help
> + RISC-V kernel binaries are compatible between all known systems
> + whenever possible, but there are some use cases that can only be
> + satisfied by configurations that result in kernel binaries that are
> + not portable between systems.
> +
> + Selecting N does not guarantee kernels will be portable to all known
> + systems. Selecting any of the options guarded by NONPORTABLE will
> + result in kernel binaries that are unlikely to be portable between
> + systems.
> +
> + If unsure, say N.
Doing it this way means allmodconfig will enable NONPORTABLE, which
may not be what we want?
> +
> choice
> prompt "Base ISA"
> default ARCH_RV64I
> @@ -554,7 +571,7 @@ config PHYS_RAM_BASE
>
> config XIP_KERNEL
> bool "Kernel Execute-In-Place from ROM"
> - depends on MMU && SPARSEMEM
> + depends on MMU && SPARSEMEM && NONPORTABLE
Nice! Would we get something like this on arm32 past rmk?
> # This prevents XIP from being enabled by all{yes,mod}config, which
> # fail to build since XIP doesn't support large kernels.
> depends on !COMPILE_TEST
> @@ -594,9 +611,16 @@ endmenu
>
> config BUILTIN_DTB
> bool
> - depends on OF
> + depends on OF && NONPORTABLE
> default y if XIP_KERNEL
>
> +config PORTABLE
> + bool
> + default !NONPORTABLE
> + select EFI
> + select OF
> + select MMU
> +
> menu "Power management options"
>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
prev parent reply other threads:[~2022-07-15 7:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-21 19:33 Palmer Dabbelt
2022-05-22 8:09 ` Atish Patra
2022-05-22 8:57 ` Damien Le Moal
2022-05-22 12:27 ` Guo Ren
2022-07-14 21:26 ` Palmer Dabbelt
2022-07-15 7:47 ` Geert Uytterhoeven [this message]
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='CAMuHMdVJ7bhPka0acgw2wAZmsgDP2+tbqS7fO2A=_BOmv+8+HA@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=alexandre.ghiti@canonical.com \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=atishp@rivosinc.com \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@opensource.wdc.com \
--cc=guoren@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@rivosinc.com \
--cc=mchitale@ventanamicro.com \
--cc=palmer@dabbelt.com \
--cc=palmer@rivosinc.com \
--cc=paul.walmsley@sifive.com \
--cc=rdunlap@infradead.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®