From 8d4eae41c164e08edcd57c84f3f27ac5b52b67db Mon Sep 17 00:00:00 2001 From: Yanfeng Liu Date: Sun, 14 Apr 2024 05:29:21 +0800 Subject: [PATCH] arch/kconfig: revising kernel mapping configs - Add ARCH_KVMA_MAPPING to guard kernel mapping. - Set dependency from MM_KMAP to ARCH_KVMA_MAPPING, as per commit 70de321de3f. Signed-off-by: Yanfeng Liu --- arch/Kconfig | 8 ++++++-- mm/Kconfig | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index c0818d8a72..11779a77f6 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -722,6 +722,10 @@ config ARCH_VMA_MAPPING bool "Support runtime memory mapping into SHM area" default n +config ARCH_KVMA_MAPPING + bool + default n + config ARCH_SHM_VBASE hex "Shared memory base" depends on ARCH_VMA_MAPPING @@ -730,7 +734,7 @@ config ARCH_SHM_VBASE config ARCH_KMAP_VBASE hex "Kernel dynamic virtual mappings base" - depends on MM_KMAP + depends on ARCH_KVMA_MAPPING ---help--- The virtual address of the beginning of the kernel dynamic mapping region. @@ -792,7 +796,7 @@ endif # ARCH_VMA_MAPPING config ARCH_KMAP_NPAGES int "Max kernel dynamic mapping pages" default 1 - depends on MM_KMAP + depends on ARCH_KVMA_MAPPING ---help--- The maximum amount of pages that a kernel can use for dynamically mapping physical pages to itself. diff --git a/mm/Kconfig b/mm/Kconfig index 813135f914..1026b32ce6 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -198,6 +198,7 @@ config MM_KMAP bool "Support for dynamic kernel virtual mappings" default n depends on MM_PGALLOC && BUILD_KERNEL + select ARCH_KVMA_MAPPING ---help--- Build support for dynamically mapping pages from the page pool into kernel virtual memory. This includes pages that are already mapped