From 84fc863606239d8b434e59e6bbbe805f457e5767 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 27 Jul 2022 14:08:24 +0200
Subject: 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: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/kernel/devtree.c | 2 --
 1 file changed, 2 deletions(-)

(limited to 'arch/arm/kernel/devtree.c')

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;
-- 
cgit v1.2.3