riscv: enable HAVE_ARCH_HUGE_VMAP for XIP kernel
authorNam Cao <namcao@linutronix.de>
Sun, 26 May 2024 11:01:04 +0000 (13:01 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 30 May 2024 16:42:52 +0000 (09:42 -0700)
HAVE_ARCH_HUGE_VMAP also works on XIP kernel, so remove its dependency on
!XIP_KERNEL.

This also fixes a boot problem for XIP kernel introduced by the commit in
"Fixes:". This commit used huge page mapping for vmemmap, but huge page
vmap was not enabled for XIP kernel.

Fixes: ff172d4818ad ("riscv: Use hugepage mappings for vmemmap")
Signed-off-by: Nam Cao <namcao@linutronix.de>
Cc: <stable@vger.kernel.org>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240526110104.470429-1-namcao@linutronix.de
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/Kconfig

index b94176e..0525ee2 100644 (file)
@@ -106,7 +106,7 @@ config RISCV
        select HAS_IOPORT if MMU
        select HAVE_ARCH_AUDITSYSCALL
        select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP
-       select HAVE_ARCH_HUGE_VMAP if MMU && 64BIT && !XIP_KERNEL
+       select HAVE_ARCH_HUGE_VMAP if MMU && 64BIT
        select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
        select HAVE_ARCH_JUMP_LABEL_RELATIVE if !XIP_KERNEL
        select HAVE_ARCH_KASAN if MMU && 64BIT