Commit e4ef93ed authored by Song Shuai's avatar Song Shuai Committed by Palmer Dabbelt

riscv: mm: remove redundant parameter of create_fdt_early_page_table

create_fdt_early_page_table() explicitly uses early_pg_dir for
32-bit fdt mapping and the pgdir parameter is redundant here.
So remove it and its caller.
Reviewed-by: default avatarAlexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: default avatarSong Shuai <suagrfillet@gmail.com>
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Fixes: ef69d255 ("riscv: Move early dtb mapping into the fixmap region")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230426100009.685435-1-suagrfillet@gmail.comSigned-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 38dab744
...@@ -919,8 +919,7 @@ static void __init create_kernel_page_table(pgd_t *pgdir, bool early) ...@@ -919,8 +919,7 @@ static void __init create_kernel_page_table(pgd_t *pgdir, bool early)
* this means 2 PMD entries whereas for 32-bit kernel, this is only 1 PGDIR * this means 2 PMD entries whereas for 32-bit kernel, this is only 1 PGDIR
* entry. * entry.
*/ */
static void __init create_fdt_early_page_table(pgd_t *pgdir, static void __init create_fdt_early_page_table(uintptr_t fix_fdt_va,
uintptr_t fix_fdt_va,
uintptr_t dtb_pa) uintptr_t dtb_pa)
{ {
uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1); uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1);
...@@ -1132,8 +1131,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa) ...@@ -1132,8 +1131,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)
create_kernel_page_table(early_pg_dir, true); create_kernel_page_table(early_pg_dir, true);
/* Setup early mapping for FDT early scan */ /* Setup early mapping for FDT early scan */
create_fdt_early_page_table(early_pg_dir, create_fdt_early_page_table(__fix_to_virt(FIX_FDT), dtb_pa);
__fix_to_virt(FIX_FDT), dtb_pa);
/* /*
* Bootime fixmap only can handle PMD_SIZE mapping. Thus, boot-ioremap * Bootime fixmap only can handle PMD_SIZE mapping. Thus, boot-ioremap
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment