Skip to content

Commit b0fd4b1

Browse files
xhackerustcpalmer-dabbelt
authored andcommitted
riscv: mm: fix wrong phys_ram_base value for RV64
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: 6d7f91d ("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>
1 parent 869c706 commit b0fd4b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/mm/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ static void __init setup_bootmem(void)
187187

188188

189189
phys_ram_end = memblock_end_of_DRAM();
190-
#ifndef CONFIG_64BIT
191190
#ifndef CONFIG_XIP_KERNEL
192191
phys_ram_base = memblock_start_of_DRAM();
193192
#endif
193+
#ifndef CONFIG_64BIT
194194
/*
195195
* memblock allocator is not aware of the fact that last 4K bytes of
196196
* the addressable memory can not be mapped because of IS_ERR_VALUE

0 commit comments

Comments
 (0)