lkml.org 
[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.15 026/846] riscv: mm: fix wrong phys_ram_base value for RV64
    Date
    From: Jisheng Zhang <jszhang@kernel.org>

    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 | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/arch/riscv/mm/init.c
    +++ b/arch/riscv/mm/init.c
    @@ -187,10 +187,10 @@ static void __init setup_bootmem(void)


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

    \
     
     \ /
      Last update: 2022-01-25 04:09    [W:4.650 / U:0.188 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site