riscv: mm: remove redundant parameter of create_fdt_early_page_table
PATCH v2 1/1 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.
---
Changes in V1:
https://lore.kernel.org/linux-riscv/[email protected]/T/#t
- fix the typo
--- arch/riscv/mm/init.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
arch/riscv/mm/init.c +2 -4
@@ -843,8 +843,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 * entry. */ -static void __init create_fdt_early_page_table (pgd_t *pgdir, -uintptr_t fix_fdt_va, +static void __init create_fdt_early_page_table (uintptr_t fix_fdt_va,uintptr_t dtb_pa) {uintptr_t pa = dtb_pa & ~(PMD_SIZE -1 );
@@ -1034,8 +1033,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)create_kernel_page_table (early_pg_dir, true);/* Setup early mapping for FDT early scan */ -create_fdt_early_page_table (early_pg_dir, -__fix_to_virt (FIX_FDT ), dtb_pa); +create_fdt_early_page_table (__fix_to_virt (FIX_FDT ), dtb_pa);/* * Bootime fixmap only can handle PMD_SIZE mapping. Thus, boot-ioremap
Signature · 7 lines
2.20.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 6 lines · Song Shuai
create_fdt_early_page_table()explicitly usesearly_pg_dirfor 32-bit fdt mapping and the pgdir parameter is redundant here. So remove it and its caller.Reviewed-by Alexandre Ghiti <[email protected]>Signed-off-by Song Shuai <[email protected]>
Whoops, I missed the v2, so copy-pasting:
"and its caller" sounds like you're removing the caller itself when that's not what you're doing!
I am certainly not suggesting that you resubmit because of that though.
Automation failed to apply this which is a bit weird. What was the base-commit?
Cheers,
Conor.
Quoted 35 lines
---
Changes in V1:
https://lore.kernel.org/linux-riscv/[email protected]/T/#t
- fix the typo--- arch/riscv/mm/init.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)arch/riscv/mm/init.c +2
-4@@ -843,8 +843,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 * entry. */ -static void __init create_fdt_early_page_table (pgd_t *pgdir, -uintptr_t fix_fdt_va, +static void __init create_fdt_early_page_table (uintptr_t fix_fdt_va,uintptr_t dtb_pa) {uintptr_t pa = dtb_pa & ~(PMD_SIZE -1 );@@ -1034,8 +1033,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)create_kernel_page_table (early_pg_dir, true);/* Setup early mapping for FDT early scan */ -create_fdt_early_page_table (early_pg_dir, -__fix_to_virt (FIX_FDT ), dtb_pa); +create_fdt_early_page_table (__fix_to_virt (FIX_FDT ), dtb_pa);/* * Bootime fixmap only can handle PMD_SIZE mapping. Thus, boot-ioremap Signature · 1 line
2.20.1
Quoted 11 lines · Conor Dooley <[email protected]> 于2023年4月27日周四 10:15写道:
Quoted 6 lines · Song Shuai
create_fdt_early_page_table()explicitly usesearly_pg_dirfor 32-bit fdt mapping and the pgdir parameter is redundant here. So remove it and its caller.Reviewed-by Alexandre Ghiti <[email protected]>Signed-off-by Song Shuai <[email protected]>Whoops, I missed the v2, so copy-pasting:
Quoted 8 lines
"and its caller" sounds like you're removing the caller itself when that's not what you're doing!
I am certainly not suggesting that you resubmit because of that though.Reviewed-by Conor Dooley <[email protected]>Automation failed to apply this which is a bit weird. What was the base-commit?
commit 1b50f956c8fe riscv: No need to relocate the dtb as it lies in the fixmap region in riscv/linux fixes branch.
Quoted 39 lines
Cheers,
Conor.Quoted 35 lines
---
Changes in V1:
https://lore.kernel.org/linux-riscv/[email protected]/T/#t
- fix the typo--- arch/riscv/mm/init.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)arch/riscv/mm/init.c +2
-5@@ -843,8 +843,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 * entry. */ -static void __init create_fdt_early_page_table (pgd_t *pgdir, -uintptr_t fix_fdt_va, +static void __init create_fdt_early_page_table (uintptr_t fix_fdt_va,uintptr_t dtb_pa) {uintptr_t pa = dtb_pa & ~(PMD_SIZE -1 );@@ -1034,8 +1033,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)create_kernel_page_table (early_pg_dir, true);/* Setup early mapping for FDT early scan */ -create_fdt_early_page_table (early_pg_dir, -__fix_to_virt (FIX_FDT ), dtb_pa); +create_fdt_early_page_table (__fix_to_virt (FIX_FDT ), dtb_pa);/* * Bootime fixmap only can handle PMD_SIZE mapping. Thus, boot-ioremap -- 2.20.1
Signature · 7 lines
Thanks, Song _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Palmer Dabbelt
AppliedQuoted 5 lines · Song Shuai
create_fdt_early_page_table()explicitly usesearly_pg_dirfor 32-bit fdt mapping and the pgdir parameter is redundant here. So remove it and its caller.
Applied, thanks!
[1/1] riscv: mm: remove redundant parameter of create_fdt_early_page_table
https://git.kernel.org/palmer/c/e4ef93edd4e0
Best regards,
Signature · 1 line
Palmer Dabbelt <[email protected]>