[PATCH v3 01/10] riscv: mm: Remove setup_zero_page()
From: Jisheng Zhang
Date: Mon Apr 12 2021 - 12:17:17 EST
From: Jisheng Zhang <jszhang@xxxxxxxxxx>
The empty_zero_page sits at .bss..page_aligned section, so will be
cleared to zero during clearing bss, we don't need to clear it again.
Signed-off-by: Jisheng Zhang <jszhang@xxxxxxxxxx>
---
arch/riscv/mm/init.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index 7f5036fbee8c..dbeaa4144e4d 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -57,11 +57,6 @@ static void __init zone_sizes_init(void)
free_area_init(max_zone_pfns);
}
-static void setup_zero_page(void)
-{
- memset((void *)empty_zero_page, 0, PAGE_SIZE);
-}
-
#if defined(CONFIG_MMU) && defined(CONFIG_DEBUG_VM)
static inline void print_mlk(char *name, unsigned long b, unsigned long t)
{
@@ -589,7 +584,6 @@ void mark_rodata_ro(void)
void __init paging_init(void)
{
setup_vm_final();
- setup_zero_page();
}
void __init misc_mem_init(void)
--
2.31.0