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
  70de321de3.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
Yanfeng Liu 2024-04-14 05:29:21 +08:00 committed by Xiang Xiao
parent 3a844d8dd7
commit 8d4eae41c1
2 changed files with 7 additions and 2 deletions

View File

@ -722,6 +722,10 @@ config ARCH_VMA_MAPPING
bool "Support runtime memory mapping into SHM area" bool "Support runtime memory mapping into SHM area"
default n default n
config ARCH_KVMA_MAPPING
bool
default n
config ARCH_SHM_VBASE config ARCH_SHM_VBASE
hex "Shared memory base" hex "Shared memory base"
depends on ARCH_VMA_MAPPING depends on ARCH_VMA_MAPPING
@ -730,7 +734,7 @@ config ARCH_SHM_VBASE
config ARCH_KMAP_VBASE config ARCH_KMAP_VBASE
hex "Kernel dynamic virtual mappings base" hex "Kernel dynamic virtual mappings base"
depends on MM_KMAP depends on ARCH_KVMA_MAPPING
---help--- ---help---
The virtual address of the beginning of the kernel dynamic mapping The virtual address of the beginning of the kernel dynamic mapping
region. region.
@ -792,7 +796,7 @@ endif # ARCH_VMA_MAPPING
config ARCH_KMAP_NPAGES config ARCH_KMAP_NPAGES
int "Max kernel dynamic mapping pages" int "Max kernel dynamic mapping pages"
default 1 default 1
depends on MM_KMAP depends on ARCH_KVMA_MAPPING
---help--- ---help---
The maximum amount of pages that a kernel can use for dynamically The maximum amount of pages that a kernel can use for dynamically
mapping physical pages to itself. mapping physical pages to itself.

View File

@ -198,6 +198,7 @@ config MM_KMAP
bool "Support for dynamic kernel virtual mappings" bool "Support for dynamic kernel virtual mappings"
default n default n
depends on MM_PGALLOC && BUILD_KERNEL depends on MM_PGALLOC && BUILD_KERNEL
select ARCH_KVMA_MAPPING
---help--- ---help---
Build support for dynamically mapping pages from the page pool into Build support for dynamically mapping pages from the page pool into
kernel virtual memory. This includes pages that are already mapped kernel virtual memory. This includes pages that are already mapped