summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@rivosinc.com>2022-04-19 20:13:27 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-09 10:26:14 +0200
commit06840814ec4f251b25812355f3813edb5fccc3f9 (patch)
treedef1eae339eb10e38b0bb64446bf4594630f2896 /arch
parent2587f5de4f3cd8934627544e60280ec8e87fcbd7 (diff)
RISC-V: Fix the XIP build
[ 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>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/mm/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 697a9aed4f77..e42c51196995 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -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;