Commit 84fc8636 authored by Arnd Bergmann's avatar Arnd Bergmann

ARM: make ARCH_MULTIPLATFORM user-visible

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: default avatarArnd Bergmann <arnd@arndb.de>
parent 5408445b
...@@ -320,7 +320,19 @@ config ARCH_MMAP_RND_BITS_MAX ...@@ -320,7 +320,19 @@ config ARCH_MMAP_RND_BITS_MAX
default 16 default 16
config ARCH_MULTIPLATFORM 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" menu "Platform selection"
depends on MMU depends on MMU
...@@ -1609,6 +1621,7 @@ config CMDLINE_EXTEND ...@@ -1609,6 +1621,7 @@ config CMDLINE_EXTEND
config CMDLINE_FORCE config CMDLINE_FORCE
bool "Always use the default kernel command string" bool "Always use the default kernel command string"
depends on !ARCH_MULTIPLATFORM
help help
Always use the default kernel command string, even if the boot Always use the default kernel command string, even if the boot
loader passes other arguments to the kernel. loader passes other arguments to the kernel.
......
...@@ -1904,6 +1904,7 @@ config DEBUG_UART_8250_PALMCHIP ...@@ -1904,6 +1904,7 @@ config DEBUG_UART_8250_PALMCHIP
config DEBUG_UNCOMPRESS config DEBUG_UNCOMPRESS
bool "Enable decompressor debugging via DEBUG_LL output" bool "Enable decompressor debugging via DEBUG_LL output"
depends on !ARCH_MULTIPLATFORM
depends on !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100) depends on !(ARCH_FOOTBRIDGE || ARCH_RPC || ARCH_SA1100)
depends on DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ depends on DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
(!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \ (!DEBUG_TEGRA_UART || !ZBOOT_ROM) && \
......
...@@ -194,14 +194,12 @@ const struct machine_desc * __init setup_machine_fdt(void *dt_virt) ...@@ -194,14 +194,12 @@ const struct machine_desc * __init setup_machine_fdt(void *dt_virt)
{ {
const struct machine_desc *mdesc, *mdesc_best = NULL; 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") DT_MACHINE_START(GENERIC_DT, "Generic DT based system")
.l2c_aux_val = 0x0, .l2c_aux_val = 0x0,
.l2c_aux_mask = ~0x0, .l2c_aux_mask = ~0x0,
MACHINE_END MACHINE_END
mdesc_best = &__mach_desc_GENERIC_DT; mdesc_best = &__mach_desc_GENERIC_DT;
#endif
if (!dt_virt || !early_init_dt_verify(dt_virt)) if (!dt_virt || !early_init_dt_verify(dt_virt))
return NULL; return NULL;
......
# SPDX-License-Identifier: GPL-2.0 # 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-y += common.o
obj-$(CONFIG_DOVE_LEGACY) += irq.o mpp.o obj-$(CONFIG_DOVE_LEGACY) += irq.o mpp.o
......
# SPDX-License-Identifier: GPL-2.0 # 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-y += common.o mpp.o irq.o pcie.o
obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o
......
# SPDX-License-Identifier: GPL-2.0 # 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 AFLAGS_coherency_ll.o := -Wa,-march=armv7-a
CFLAGS_pmsu.o := -march=armv7-a CFLAGS_pmsu.o := -march=armv7-a
......
# SPDX-License-Identifier: GPL-2.0 # 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-y += common.o pci.o irq.o mpp.o
obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment