[PATCH v2 09/10] um: allow deselecting CONFIG_MMU
Johannes Berg <[email protected]> Thu, 23 Jul 2026 11:35:50 +0200
| Newsgroups | org.infradead.lists.linux-um |
|---|---|
| Message-ID | <20260723113633.dc6b7df78016.Id9eb1e435a7d9ee75ec3e25db69ed3e8ff202a58@changeid> |
From: Hajime Tazaki <[email protected]> Allow deselecting CONFIG_MMU to build a no-MMU UML kernel. Signed-off-by: Hajime Tazaki <[email protected]> Signed-off-by: Ricardo Koller <[email protected]> [drop defconfig file, minor adjustments/fixes, rewrite message] Signed-off-by: Johannes Berg <[email protected]> --- arch/um/Kconfig | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/arch/um/Kconfig b/arch/um/Kconfig index d9541d13d9eb..d17bcdd200c4 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -17,9 +17,9 @@ config UML select ARCH_HAS_KCOV select ARCH_HAS_STRNCPY_FROM_USER select ARCH_HAS_STRNLEN_USER - select ARCH_HAS_STRICT_KERNEL_RWX + select ARCH_HAS_STRICT_KERNEL_RWX if MMU select HAVE_ARCH_AUDITSYSCALL - select HAVE_ARCH_KASAN if X86_64 + select HAVE_ARCH_KASAN if X86_64 && MMU select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN select HAVE_ARCH_SECCOMP_FILTER select HAVE_ASM_MODVERSIONS @@ -37,18 +37,23 @@ config UML select ARCH_SUPPORTS_LTO_CLANG_THIN select TRACE_IRQFLAGS_SUPPORT select TTY # Needed for line.c - select HAVE_ARCH_VMAP_STACK + select HAVE_ARCH_VMAP_STACK if MMU select HAVE_RUST select ARCH_HAS_UBSAN select HAVE_ARCH_TRACEHOOK select HAVE_SYSCALL_TRACEPOINTS select THREAD_INFO_IN_TASK select SPARSE_IRQ - select MMU_GATHER_RCU_TABLE_FREE + select MMU_GATHER_RCU_TABLE_FREE if MMU + select UACCESS_MEMCPY if !MMU + select GENERIC_STRNLEN_USER if !MMU + select GENERIC_STRNCPY_FROM_USER if !MMU config MMU - bool + bool "MMU support" default y + help + Turning this off allows a nommu build, say Y. config UML_DMA_EMULATION bool @@ -229,8 +234,15 @@ config MAGIC_SYSRQ The keys are documented in <file:Documentation/admin-guide/sysrq.rst>. Don't say Y unless you really know what this hack does. +config ARCH_FORCE_MAX_ORDER + int "Order of maximal physically contiguous allocations" if EXPERT + default "10" if MMU + default "16" if !MMU + config KERNEL_STACK_ORDER int "Kernel stack size order" + default 3 if !MMU + range 3 10 if !MMU default 2 if 64BIT range 2 10 if 64BIT default 1 if !64BIT -- 2.53.0