RISC-V: Fix the XIP build
authorPalmer Dabbelt <palmer@rivosinc.com>
Wed, 20 Apr 2022 03:13:27 +0000 (20:13 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 25 May 2022 21:43:42 +0000 (14:43 -0700)
A handful of functions unused functions were enabled during XIP builds,
which themselves didn't build correctly.  This just disables the
functions entirely.

Fixes: e8a62cc26ddf ("riscv: Implement sv48 support")
Reviewed-by: Guo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/r/20220420184056.7886-5-palmer@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/mm/init.c

index 7bc9a21..d2054a6 100644 (file)
@@ -660,7 +660,7 @@ static __init pgprot_t pgprot_from_va(uintptr_t va)
 }
 #endif /* CONFIG_STRICT_KERNEL_RWX */
 
-#ifdef CONFIG_64BIT
+#if defined(CONFIG_64BIT) && !defined(CONFIG_XIP_KERNEL)
 static void __init disable_pgtable_l5(void)
 {
        pgtable_l5_enabled = false;