[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <11706f7e-a53a-5640-d713-bc4562db71fa@huawei.com>
Date: Mon, 28 Jun 2021 08:53:16 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: Bin Meng <bmeng.cn@...il.com>,
Palmer Dabbelt <palmerdabbelt@...gle.com>,
Atish Patra <atish.patra@....com>,
<linux-kernel@...r.kernel.org>, <linux-riscv@...ts.infradead.org>
CC: <stable@...r.kernel.org>
Subject: Re: [PATCH] riscv: Fix 32-bit RISC-V boot failure
Hi, sorry for the mistake,the bug is fixed by
https://lore.kernel.org/linux-riscv/20210602085517.127481-2-wangkefeng.wang@huawei.com/
On 2021/6/27 21:51, Bin Meng wrote:
> Commit dd2d082b5760 ("riscv: Cleanup setup_bootmem()") adjusted
> the calling sequence in setup_bootmem(), which invalidates the fix
> commit de043da0b9e7 ("RISC-V: Fix usage of memblock_enforce_memory_limit")
> did for 32-bit RISC-V unfortunately.
>
> So now 32-bit RISC-V does not boot again when testing booting kernel
> on QEMU 'virt' with '-m 2G', which was exactly what the original
> commit de043da0b9e7 ("RISC-V: Fix usage of memblock_enforce_memory_limit")
> tried to fix.
>
> Fixes: dd2d082b5760 ("riscv: Cleanup setup_bootmem()")
> Cc: stable@...r.kernel.org # v5.12+
> Signed-off-by: Bin Meng <bmeng.cn@...il.com>
> ---
>
> arch/riscv/mm/init.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> index 4c4c92ce0bb8..9b23b95c50cf 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -123,7 +123,7 @@ void __init setup_bootmem(void)
> {
> phys_addr_t vmlinux_end = __pa_symbol(&_end);
> phys_addr_t vmlinux_start = __pa_symbol(&_start);
> - phys_addr_t dram_end = memblock_end_of_DRAM();
> + phys_addr_t dram_end;
> phys_addr_t max_mapped_addr = __pa(~(ulong)0);
>
> #ifdef CONFIG_XIP_KERNEL
> @@ -146,6 +146,8 @@ void __init setup_bootmem(void)
> #endif
> memblock_reserve(vmlinux_start, vmlinux_end - vmlinux_start);
>
> + dram_end = memblock_end_of_DRAM();
> +
> /*
> * 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
Powered by blists - more mailing lists