From: Arnd Bergmann <arnd@kernel.org> To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>, Russell King <linux@armlinux.org.uk>, Linus Walleij <linus.walleij@linaro.org>, Geert Uytterhoeven <geert+renesas@glider.be>, 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> Subject: [PATCH 5/5] ARM: make ARCH_MULTIPLATFORM user-visible Date: Thu, 18 Aug 2022 16:56:16 +0200 [thread overview] Message-ID: <20220818145616.3156379-6-arnd@kernel.org> (raw) In-Reply-To: <20220818145616.3156379-1-arnd@kernel.org> 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> --- arch/arm/Kconfig | 15 ++++++++++++++- arch/arm/Kconfig.debug | 1 + arch/arm/kernel/devtree.c | 2 -- arch/arm/mach-dove/Makefile | 2 +- arch/arm/mach-mv78xx0/Makefile | 2 +- arch/arm/mach-mvebu/Makefile | 2 +- arch/arm/mach-orion5x/Makefile | 2 +- 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3066ce82cffc..9cbac5bf8b3a 100644 --- 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 help Always use the default kernel command string, even if the boot loader passes other arguments to the kernel. diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 655f84ada30f..c345775f035b 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1904,6 +1904,7 @@ config DEBUG_UART_8250_PALMCHIP config DEBUG_UNCOMPRESS bool "Enable decompressor debugging via DEBUG_LL output" + depends on !ARCH_MULTIPLATFORM depends on !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100) depends on DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \ diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c index 02839d8b6202..264827281113 100644 --- a/arch/arm/kernel/devtree.c +++ b/arch/arm/kernel/devtree.c @@ -194,14 +194,12 @@ const struct machine_desc * __init setup_machine_fdt(void *dt_virt) { const struct machine_desc *mdesc, *mdesc_best = NULL; -#if defined(CONFIG_ARCH_MULTIPLATFORM) || defined(CONFIG_ARM_SINGLE_ARMV7M) DT_MACHINE_START(GENERIC_DT, "Generic DT based system") .l2c_aux_val = 0x0, .l2c_aux_mask = ~0x0, MACHINE_END mdesc_best = &__mach_desc_GENERIC_DT; -#endif if (!dt_virt || !early_init_dt_verify(dt_virt)) return NULL; diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile index e83f6492834d..da373a5768ba 100644 --- a/arch/arm/mach-dove/Makefile +++ b/arch/arm/mach-dove/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include +ccflags-y := -I$(srctree)/arch/arm/plat-orion/include obj-y += common.o obj-$(CONFIG_DOVE_LEGACY) += irq.o mpp.o diff --git a/arch/arm/mach-mv78xx0/Makefile b/arch/arm/mach-mv78xx0/Makefile index a839e960b8c6..50aff70065f2 100644 --- a/arch/arm/mach-mv78xx0/Makefile +++ b/arch/arm/mach-mv78xx0/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include +ccflags-y := -I$(srctree)/arch/arm/plat-orion/include obj-y += common.o mpp.o irq.o pcie.o obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index cb106899dd7c..c21733cbb4fa 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include +ccflags-y := -I$(srctree)/arch/arm/plat-orion/include AFLAGS_coherency_ll.o := -Wa,-march=armv7-a CFLAGS_pmsu.o := -march=armv7-a diff --git a/arch/arm/mach-orion5x/Makefile b/arch/arm/mach-orion5x/Makefile index 1a585a62d5e6..572c3520f7fe 100644 --- a/arch/arm/mach-orion5x/Makefile +++ b/arch/arm/mach-orion5x/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include +ccflags-y := -I$(srctree)/arch/arm/plat-orion/include obj-y += common.o pci.o irq.o mpp.o obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o -- 2.29.2
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org> To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>, Russell King <linux@armlinux.org.uk>, Linus Walleij <linus.walleij@linaro.org>, Geert Uytterhoeven <geert+renesas@glider.be>, 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> Subject: [PATCH 5/5] ARM: make ARCH_MULTIPLATFORM user-visible Date: Thu, 18 Aug 2022 16:56:16 +0200 [thread overview] Message-ID: <20220818145616.3156379-6-arnd@kernel.org> (raw) In-Reply-To: <20220818145616.3156379-1-arnd@kernel.org> 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> --- arch/arm/Kconfig | 15 ++++++++++++++- arch/arm/Kconfig.debug | 1 + arch/arm/kernel/devtree.c | 2 -- arch/arm/mach-dove/Makefile | 2 +- arch/arm/mach-mv78xx0/Makefile | 2 +- arch/arm/mach-mvebu/Makefile | 2 +- arch/arm/mach-orion5x/Makefile | 2 +- 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3066ce82cffc..9cbac5bf8b3a 100644 --- 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 help Always use the default kernel command string, even if the boot loader passes other arguments to the kernel. diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 655f84ada30f..c345775f035b 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1904,6 +1904,7 @@ config DEBUG_UART_8250_PALMCHIP config DEBUG_UNCOMPRESS bool "Enable decompressor debugging via DEBUG_LL output" + depends on !ARCH_MULTIPLATFORM depends on !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100) depends on DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \ diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c index 02839d8b6202..264827281113 100644 --- a/arch/arm/kernel/devtree.c +++ b/arch/arm/kernel/devtree.c @@ -194,14 +194,12 @@ const struct machine_desc * __init setup_machine_fdt(void *dt_virt) { const struct machine_desc *mdesc, *mdesc_best = NULL; -#if defined(CONFIG_ARCH_MULTIPLATFORM) || defined(CONFIG_ARM_SINGLE_ARMV7M) DT_MACHINE_START(GENERIC_DT, "Generic DT based system") .l2c_aux_val = 0x0, .l2c_aux_mask = ~0x0, MACHINE_END mdesc_best = &__mach_desc_GENERIC_DT; -#endif if (!dt_virt || !early_init_dt_verify(dt_virt)) return NULL; diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile index e83f6492834d..da373a5768ba 100644 --- a/arch/arm/mach-dove/Makefile +++ b/arch/arm/mach-dove/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include +ccflags-y := -I$(srctree)/arch/arm/plat-orion/include obj-y += common.o obj-$(CONFIG_DOVE_LEGACY) += irq.o mpp.o diff --git a/arch/arm/mach-mv78xx0/Makefile b/arch/arm/mach-mv78xx0/Makefile index a839e960b8c6..50aff70065f2 100644 --- a/arch/arm/mach-mv78xx0/Makefile +++ b/arch/arm/mach-mv78xx0/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include +ccflags-y := -I$(srctree)/arch/arm/plat-orion/include obj-y += common.o mpp.o irq.o pcie.o obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index cb106899dd7c..c21733cbb4fa 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include +ccflags-y := -I$(srctree)/arch/arm/plat-orion/include AFLAGS_coherency_ll.o := -Wa,-march=armv7-a CFLAGS_pmsu.o := -march=armv7-a diff --git a/arch/arm/mach-orion5x/Makefile b/arch/arm/mach-orion5x/Makefile index 1a585a62d5e6..572c3520f7fe 100644 --- a/arch/arm/mach-orion5x/Makefile +++ b/arch/arm/mach-orion5x/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-orion/include +ccflags-y := -I$(srctree)/arch/arm/plat-orion/include obj-y += common.o pci.o irq.o mpp.o obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o -- 2.29.2 _______________________________________________ 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-08-18 14:57 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 ` Arnd Bergmann [this message] 2022-08-18 14:56 ` [PATCH 5/5] ARM: make ARCH_MULTIPLATFORM user-visible Arnd Bergmann 2022-09-27 12:31 ` Geert Uytterhoeven 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=20220818145616.3156379-6-arnd@kernel.org \ --to=arnd@kernel.org \ --cc=andrew@lunn.ch \ --cc=ardb@kernel.org \ --cc=arnd@arndb.de \ --cc=brgl@bgdev.pl \ --cc=geert+renesas@glider.be \ --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@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.