未验证 提交 cbd34f4b 编写于 作者: A Atish Patra 提交者: Palmer Dabbelt

riscv: Separate memory init from paging init

Currently, we perform some memory init functions in paging init. But,
that will be an issue for NUMA support where DT needs to be flattened
before numa initialization and memblock_present can only be called
after numa initialization.

Move memory initialization related functions to a separate function.
Signed-off-by: NAtish Patra <atish.patra@wdc.com>
Reviewed-by: NGreentime Hu <greentime.hu@sifive.com>
Reviewed-by: NAnup Patel <anup@brainfault.org>
Reviewed-by: NPalmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: NPalmer Dabbelt <palmerdabbelt@google.com>
上级 ae3c107c
......@@ -469,6 +469,7 @@ extern void *dtb_early_va;
extern uintptr_t dtb_early_pa;
void setup_bootmem(void);
void paging_init(void);
void misc_mem_init(void);
#define FIRST_USER_ADDRESS 0
......
......@@ -250,6 +250,7 @@ void __init setup_arch(char **cmdline_p)
else
pr_err("No DTB found in kernel mappings\n");
#endif
misc_mem_init();
sbi_init();
......
......@@ -649,8 +649,12 @@ void mark_rodata_ro(void)
void __init paging_init(void)
{
setup_vm_final();
sparse_init();
setup_zero_page();
}
void __init misc_mem_init(void)
{
sparse_init();
zone_sizes_init();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册