riscv: fixup max_low_pfn with PFN_DOWN.

max_low_pfn should be pfn_size not byte_size.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Signed-off-by: Mao Han <mao_han@c-sky.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
Guo Ren
2019-01-12 16:16:27 +08:00
committed by Palmer Dabbelt
parent a19f74708e
commit 28198c4639
2 changed files with 3 additions and 2 deletions

View File

@@ -181,7 +181,7 @@ static void __init setup_bootmem(void)
BUG_ON(mem_size == 0);
set_max_mapnr(PFN_DOWN(mem_size));
max_low_pfn = memblock_end_of_DRAM();
max_low_pfn = PFN_DOWN(memblock_end_of_DRAM());
#ifdef CONFIG_BLK_DEV_INITRD
setup_initrd();