]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
RISC-V: Fix the XIP build
authorPalmer Dabbelt <palmer@rivosinc.com>
Wed, 20 Apr 2022 03:13:27 +0000 (20:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:26:14 +0000 (10:26 +0200)
[ Upstream commit d9e418d0ca1c464fe361468b772d4aa870d54e63 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/mm/init.c

index 697a9aed4f77f8aace0c96bfdfa2b3e54ebdfa75..e42c511969957720a41d79b7e0a9ebc3339d59f4 100644 (file)
@@ -591,7 +591,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_l4(void)
 {
        pgtable_l4_enabled = false;