From: Palmer Dabbelt <palmer@xxxxxxxxxxxx> commit 4b1c70aa8ed8249608bb991380cb8ff423edf49e upstream. This manifests as a crash early in boot on VexRiscv. Signed-off-by: Myrtle Shah <gatecat@xxxxxx> [Palmer: split commit] Fixes: 6d7f91d914bc ("riscv: Get rid of CONFIG_PHYS_RAM_BASE in kernel physical address conversion") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/riscv/mm/init.c | 1 + 1 file changed, 1 insertion(+) --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -41,6 +41,7 @@ phys_addr_t phys_ram_base __ro_after_ini EXPORT_SYMBOL(phys_ram_base); #ifdef CONFIG_XIP_KERNEL +#define phys_ram_base (*(phys_addr_t *)XIP_FIXUP(&phys_ram_base)) extern char _xiprom[], _exiprom[], __data_loc; #endif Patches currently in stable-queue which might be from palmer@xxxxxxxxxxxx are queue-5.16/riscv-fix-xip_fixup_flash_offset.patch queue-5.16/riscv-cpu-hotplug-clear-cpu-from-numa-map-when-teardown.patch queue-5.16/riscv-eliminate-unreliable-__builtin_frame_address-1.patch queue-5.16/riscv-fix-build-with-binutils-2.38.patch queue-5.16/riscv-mm-add-xip_fixup-for-phys_ram_base.patch