Skip to content

Commit e4ef93e

Browse files
Song Shuaipalmer-dabbelt
authored andcommitted
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: Alexandre Ghiti <alexghiti@rivosinc.com> Signed-off-by: Song Shuai <suagrfillet@gmail.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Fixes: ef69d25 ("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.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 38dab74 commit e4ef93e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

arch/riscv/mm/init.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,7 @@ static void __init create_kernel_page_table(pgd_t *pgdir, bool early)
919919
* this means 2 PMD entries whereas for 32-bit kernel, this is only 1 PGDIR
920920
* entry.
921921
*/
922-
static void __init create_fdt_early_page_table(pgd_t *pgdir,
923-
uintptr_t fix_fdt_va,
922+
static void __init create_fdt_early_page_table(uintptr_t fix_fdt_va,
924923
uintptr_t dtb_pa)
925924
{
926925
uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1);
@@ -1132,8 +1131,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)
11321131
create_kernel_page_table(early_pg_dir, true);
11331132

11341133
/* Setup early mapping for FDT early scan */
1135-
create_fdt_early_page_table(early_pg_dir,
1136-
__fix_to_virt(FIX_FDT), dtb_pa);
1134+
create_fdt_early_page_table(__fix_to_virt(FIX_FDT), dtb_pa);
11371135

11381136
/*
11391137
* Bootime fixmap only can handle PMD_SIZE mapping. Thus, boot-ioremap

0 commit comments

Comments
 (0)