diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index d8f37034c092..0afcd4ae7eed 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -572,9 +572,9 @@ static void __init create_kernel_page_table(pgd_t *pgdir, bool early) static void __init create_fdt_early_page_table(uintptr_t fix_fdt_va, uintptr_t dtb_pa) { +#ifndef CONFIG_BUILTIN_DTB uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1); -#ifndef CONFIG_BUILTIN_DTB /* Make sure the fdt fixmap address is always aligned on PMD size */ BUILD_BUG_ON(FIX_FDT % (PMD_SIZE / PAGE_SIZE));