riscv: Separate memory init from paging init
authorAtish Patra <atish.patra@wdc.com>
Thu, 19 Nov 2020 00:38:27 +0000 (16:38 -0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 14 Jan 2021 23:08:56 +0000 (15:08 -0800)
commitcbd34f4bb37d62d8a027f54205bff07e73340da4
treeed19f921a0d13b18c2bc54041ec5c158fb71852c
parentae3c107cd8bea82cb7cb427d9c5d305b8ce72216
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>
arch/riscv/include/asm/pgtable.h
arch/riscv/kernel/setup.c
arch/riscv/mm/init.c