riscv: mm: fix wrong phys_ram_base value for RV64
authorJisheng Zhang <jszhang@kernel.org>
Thu, 2 Dec 2021 15:36:41 +0000 (23:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:02:50 +0000 (11:02 +0100)
commit07c1c8e3202e04f65f663848cd1d18d44f0c87d4
tree5128ef4b4cf4b2880b5b461ffe6fbb535043a1f9
parenta2389e4f54e5acdde7e6266df0c1fed9bed70eec
riscv: mm: fix wrong phys_ram_base value for RV64

commit b0fd4b1bf995172b9efcee23600d4f69571c321c upstream.

Currently, if 64BIT and !XIP_KERNEL, the phys_ram_base is always 0,
no matter the real start of dram reported by memblock is.

Fixes: 6d7f91d914bc ("riscv: Get rid of CONFIG_PHYS_RAM_BASE in kernel physical address conversion")
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Alexandre Ghiti <alex@ghiti.fr>
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/riscv/mm/init.c