This is a note to let you know that I've just added the patch titled RISC-V: Fix the XIP build to the 5.18-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: risc-v-fix-the-xip-build.patch and it can be found in the queue-5.18 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit eb2a188baf34dff277bc2520b282cb859b8016e9 Author: Palmer Dabbelt <palmer@xxxxxxxxxxxx> Date: Tue Apr 19 20:13:27 2022 -0700 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@xxxxxxxxxx> Link: https://lore.kernel.org/r/20220420184056.7886-5-palmer@xxxxxxxxxxxx Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 05ed641a1134..39e2e1d0e94f 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -677,7 +677,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;