riscv: mm: call best_map_size many times during linear-mapping
authorQinglin Pan <panqinglin2020@iscas.ac.cn>
Mon, 28 Nov 2022 02:36:43 +0000 (10:36 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Fri, 9 Dec 2022 21:42:26 +0000 (13:42 -0800)
commit6ff8ca3f93d3cd2a77f051d2d971cf3638d39546
tree80ec1366fc40f0c3a7bc25f6a994c7ea01599e94
parent61b2f0bdaa3c7e6956fdac0a7c1e8284b9b81d1d
riscv: mm: call best_map_size many times during linear-mapping

Modify the best_map_size function to give map_size many times instead
of only once, so a memory region can be mapped by both PMD_SIZE and
PAGE_SIZE.

Signed-off-by: Qinglin Pan <panqinglin2020@iscas.ac.cn>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20221128023643.329091-1-panqinglin2020@iscas.ac.cn
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/mm/init.c