diff options
author | Atish Patra <atish.patra@wdc.com> | 2020-11-18 16:38:27 -0800 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-01-14 15:08:56 -0800 |
commit | cbd34f4bb37d62d8a027f54205bff07e73340da4 (patch) | |
tree | ed19f921a0d13b18c2bc54041ec5c158fb71852c /arch/riscv/mm | |
parent | ae3c107cd8bea82cb7cb427d9c5d305b8ce72216 (diff) | |
download | linux-cbd34f4bb37d62d8a027f54205bff07e73340da4.tar.bz2 |
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: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Greentime Hu <greentime.hu@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/mm')
-rw-r--r-- | arch/riscv/mm/init.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 77bd23f47a72..62716b43660b 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -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(); } |