Skip to content

Commit ca0cb9a

Browse files
riscv/mm: Add XIP_FIXUP for riscv_pfn_base
This manifests as a crash early in boot on VexRiscv. Signed-off-by: Myrtle Shah <[email protected]> [Palmer: split commit] Fixes: 44c9225 ("RISC-V: enable XIP") Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 4b1c70a commit ca0cb9a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/mm/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ static pmd_t __maybe_unused early_dtb_pmd[PTRS_PER_PMD] __initdata __aligned(PAG
232232

233233
#ifdef CONFIG_XIP_KERNEL
234234
#define pt_ops (*(struct pt_alloc_ops *)XIP_FIXUP(&pt_ops))
235+
#define riscv_pfn_base (*(unsigned long *)XIP_FIXUP(&riscv_pfn_base))
235236
#define trampoline_pg_dir ((pgd_t *)XIP_FIXUP(trampoline_pg_dir))
236237
#define fixmap_pte ((pte_t *)XIP_FIXUP(fixmap_pte))
237238
#define early_pg_dir ((pgd_t *)XIP_FIXUP(early_pg_dir))

0 commit comments

Comments
 (0)