From: Geert Uytterhoeven <geert@linux-m68k.org> To: Arnd Bergmann <arnd@kernel.org> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>, Russell King <linux@armlinux.org.uk>, Linus Walleij <linus.walleij@linaro.org>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Ard Biesheuvel <ardb@kernel.org>, Sekhar Nori <nsekhar@ti.com>, Bartosz Golaszewski <brgl@bgdev.pl>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Andrew Lunn <andrew@lunn.ch>, Gregory Clement <gregory.clement@bootlin.com>, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>, Linux-Renesas <linux-renesas-soc@vger.kernel.org> Subject: Re: [PATCH 5/5] ARM: make ARCH_MULTIPLATFORM user-visible Date: Tue, 27 Sep 2022 14:31:36 +0200 [thread overview] Message-ID: <CAMuHMdU3bKa5rU6Tx6LVYOnzSmQZJ5o=5hj=aYqwaOPVPUX-5w@mail.gmail.com> (raw) In-Reply-To: <20220818145616.3156379-6-arnd@kernel.org> Hi Arnd, On Thu, Aug 18, 2022 at 4:56 PM Arnd Bergmann <arnd@kernel.org> wrote: > From: Arnd Bergmann <arnd@arndb.de> > > Some options like CONFIG_DEBUG_UNCOMPRESS and CONFIG_CMDLINE_FORCE are > fundamentally incompatible with portable kernels but are currently allowed > in all configurations. Other options like XIP_KERNEL are essentially > useless after the completion of the multiplatform conversion. > > Repurpose the existing CONFIG_ARCH_MULTIPLATFORM option to decide > whether the resulting kernel image is meant to be portable or not, > and using this to guard all of the known incompatible options. > > This is similar to how the RISC-V kernel handles the CONFIG_NONPORTABLE > option (with the opposite polarity). > > A few references to CONFIG_ARCH_MULTIPLATFORM were left behind by > earlier clanups and have to be removed now up. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Thanks for your patch, which is now commit 84fc863606239d8b ("ARM: make ARCH_MULTIPLATFORM user-visible") in soc/for-next. > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -320,7 +320,19 @@ config ARCH_MMAP_RND_BITS_MAX > default 16 > > config ARCH_MULTIPLATFORM > - def_bool MMU && !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100) > + bool "Require kernel to be portable to multiple machines" if EXPERT > + depends on MMU && !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100) > + default y > + help > + In general, all Arm machines can be supported in a single > + kernel image, covering either Armv4/v5 or Armv6/v7. > + > + However, some configuration options require hardcoding machine > + specific physical addresses or enable errata workarounds that may > + break other machines. > + > + Selecting N here allows using those options, including > + DEBUG_UNCOMPRESS, XIP_KERNEL and ZBOOT_ROM. If unsure, say Y. > > menu "Platform selection" > depends on MMU > @@ -1609,6 +1621,7 @@ config CMDLINE_EXTEND > > config CMDLINE_FORCE > bool "Always use the default kernel command string" > + depends on !ARCH_MULTIPLATFORM This change broke half of the boards in my collective. Dropping this dependency again fixes the issue for me. On older platforms that boot an image with an appended DTB, or where the boot loader has no support for updating chosen/bootargs, I rely on CMDLINE_FORCE. Note that the CMDLINE choice depends on CONFIG_ATAGS=y, although my systems do not use ATAGS at all. Arm64, loongarch, microblaze, nios2, powerpc, and riscv do not have such a limitation, so perhaps that should be lifted on arm, too? I do see the rationale behind this change, and agree that a fixed command line can make the kernel unbootable on other platforms. However, a common command line is not guaranteed to cause that. E.g. all Renesas boards use the same chosen/bootargs in upstream DTS, which works fine if your DHCP server hands out proper nfsroot parameters (note that mine, running on OpenWRT, doesn't, hence my use of CMDLINE_FORCE ;-). > help > Always use the default kernel command string, even if the boot > loader passes other arguments to the kernel. 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
WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org> To: Arnd Bergmann <arnd@kernel.org> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>, Russell King <linux@armlinux.org.uk>, Linus Walleij <linus.walleij@linaro.org>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Ard Biesheuvel <ardb@kernel.org>, Sekhar Nori <nsekhar@ti.com>, Bartosz Golaszewski <brgl@bgdev.pl>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Andrew Lunn <andrew@lunn.ch>, Gregory Clement <gregory.clement@bootlin.com>, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>, Linux-Renesas <linux-renesas-soc@vger.kernel.org> Subject: Re: [PATCH 5/5] ARM: make ARCH_MULTIPLATFORM user-visible Date: Tue, 27 Sep 2022 14:31:36 +0200 [thread overview] Message-ID: <CAMuHMdU3bKa5rU6Tx6LVYOnzSmQZJ5o=5hj=aYqwaOPVPUX-5w@mail.gmail.com> (raw) In-Reply-To: <20220818145616.3156379-6-arnd@kernel.org> Hi Arnd, On Thu, Aug 18, 2022 at 4:56 PM Arnd Bergmann <arnd@kernel.org> wrote: > From: Arnd Bergmann <arnd@arndb.de> > > Some options like CONFIG_DEBUG_UNCOMPRESS and CONFIG_CMDLINE_FORCE are > fundamentally incompatible with portable kernels but are currently allowed > in all configurations. Other options like XIP_KERNEL are essentially > useless after the completion of the multiplatform conversion. > > Repurpose the existing CONFIG_ARCH_MULTIPLATFORM option to decide > whether the resulting kernel image is meant to be portable or not, > and using this to guard all of the known incompatible options. > > This is similar to how the RISC-V kernel handles the CONFIG_NONPORTABLE > option (with the opposite polarity). > > A few references to CONFIG_ARCH_MULTIPLATFORM were left behind by > earlier clanups and have to be removed now up. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Thanks for your patch, which is now commit 84fc863606239d8b ("ARM: make ARCH_MULTIPLATFORM user-visible") in soc/for-next. > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -320,7 +320,19 @@ config ARCH_MMAP_RND_BITS_MAX > default 16 > > config ARCH_MULTIPLATFORM > - def_bool MMU && !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100) > + bool "Require kernel to be portable to multiple machines" if EXPERT > + depends on MMU && !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100) > + default y > + help > + In general, all Arm machines can be supported in a single > + kernel image, covering either Armv4/v5 or Armv6/v7. > + > + However, some configuration options require hardcoding machine > + specific physical addresses or enable errata workarounds that may > + break other machines. > + > + Selecting N here allows using those options, including > + DEBUG_UNCOMPRESS, XIP_KERNEL and ZBOOT_ROM. If unsure, say Y. > > menu "Platform selection" > depends on MMU > @@ -1609,6 +1621,7 @@ config CMDLINE_EXTEND > > config CMDLINE_FORCE > bool "Always use the default kernel command string" > + depends on !ARCH_MULTIPLATFORM This change broke half of the boards in my collective. Dropping this dependency again fixes the issue for me. On older platforms that boot an image with an appended DTB, or where the boot loader has no support for updating chosen/bootargs, I rely on CMDLINE_FORCE. Note that the CMDLINE choice depends on CONFIG_ATAGS=y, although my systems do not use ATAGS at all. Arm64, loongarch, microblaze, nios2, powerpc, and riscv do not have such a limitation, so perhaps that should be lifted on arm, too? I do see the rationale behind this change, and agree that a fixed command line can make the kernel unbootable on other platforms. However, a common command line is not guaranteed to cause that. E.g. all Renesas boards use the same chosen/bootargs in upstream DTS, which works fine if your DHCP server hands out proper nfsroot parameters (note that mine, running on OpenWRT, doesn't, hence my use of CMDLINE_FORCE ;-). > help > Always use the default kernel command string, even if the boot > loader passes other arguments to the kernel. 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-09-27 12:32 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-18 14:56 [PATCH 0/5] ARM: clean up after multiplatform changes Arnd Bergmann 2022-08-18 14:56 ` Arnd Bergmann 2022-08-18 14:56 ` [PATCH 1/5] ARM: remove obsolete Makefile.boot infrastructure Arnd Bergmann 2022-08-18 14:56 ` Arnd Bergmann 2022-08-19 7:45 ` Krzysztof Kozlowski 2022-08-19 7:45 ` Krzysztof Kozlowski 2022-08-18 14:56 ` [PATCH 2/5] ARM: simplify machdirs/platdirs handling Arnd Bergmann 2022-08-18 14:56 ` Arnd Bergmann 2022-08-18 14:56 ` [PATCH 3/5] ARM: Kconfig: clean up platform selection Arnd Bergmann 2022-08-18 14:56 ` Arnd Bergmann 2022-08-18 14:56 ` [PATCH 4/5] ARM: fix CPU_V6 dependencies Arnd Bergmann 2022-08-18 14:56 ` Arnd Bergmann 2022-08-25 13:43 ` Linus Walleij 2022-08-25 13:43 ` Linus Walleij 2022-08-29 9:33 ` Arnd Bergmann 2022-08-29 9:33 ` Arnd Bergmann 2022-08-30 7:20 ` [PATCH] ARM: fix XIP_KERNEL dependencies Arnd Bergmann 2022-08-30 7:20 ` Arnd Bergmann 2022-08-30 7:41 ` Geert Uytterhoeven 2022-08-30 7:41 ` Geert Uytterhoeven 2022-08-30 9:18 ` Arnd Bergmann 2022-08-30 9:18 ` Arnd Bergmann 2022-08-31 13:35 ` Linus Walleij 2022-08-31 13:35 ` Linus Walleij 2022-08-18 14:56 ` [PATCH 5/5] ARM: make ARCH_MULTIPLATFORM user-visible Arnd Bergmann 2022-08-18 14:56 ` Arnd Bergmann 2022-09-27 12:31 ` Geert Uytterhoeven [this message] 2022-09-27 12:31 ` Geert Uytterhoeven 2022-09-27 13:29 ` Geert Uytterhoeven 2022-09-27 13:29 ` Geert Uytterhoeven 2022-09-27 13:31 ` Geert Uytterhoeven 2022-09-27 13:31 ` Geert Uytterhoeven 2022-09-27 20:10 ` Arnd Bergmann 2022-09-27 20:10 ` Arnd Bergmann 2022-09-28 6:48 ` Geert Uytterhoeven 2022-09-28 6:48 ` Geert Uytterhoeven 2022-09-28 8:13 ` Arnd Bergmann 2022-09-28 8:13 ` Arnd Bergmann
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='CAMuHMdU3bKa5rU6Tx6LVYOnzSmQZJ5o=5hj=aYqwaOPVPUX-5w@mail.gmail.com' \ --to=geert@linux-m68k.org \ --cc=andrew@lunn.ch \ --cc=ardb@kernel.org \ --cc=arnd@arndb.de \ --cc=arnd@kernel.org \ --cc=brgl@bgdev.pl \ --cc=gregory.clement@bootlin.com \ --cc=kernel@pengutronix.de \ --cc=krzysztof.kozlowski@linaro.org \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-renesas-soc@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=nsekhar@ti.com \ --cc=s.hauer@pengutronix.de \ --cc=sebastian.hesselbarth@gmail.com \ --cc=shawnguo@kernel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.