[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <mhng-35592185-e0e1-499f-8845-a4026154b983@palmerdabbelt-glaptop>
Date: Mon, 21 Dec 2020 21:02:50 -0800 (PST)
From: Palmer Dabbelt <palmer@...belt.com>
To: Atish Patra <Atish.Patra@....com>
CC: linux-kernel@...r.kernel.org, Atish Patra <Atish.Patra@....com>,
stable@...r.kernel.org, bin.meng@...driver.com, rppt@...ux.ibm.com,
aou@...s.berkeley.edu, akpm@...ux-foundation.org,
Anup Patel <Anup.Patel@....com>,
linux-riscv@...ts.infradead.org, rppt@...nel.org,
Paul Walmsley <paul.walmsley@...ive.com>, bmeng.cn@...il.com
Subject: Re: [PATCH v2] RISC-V: Fix usage of memblock_enforce_memory_limit
On Fri, 18 Dec 2020 16:13:56 PST (-0800), Atish Patra wrote:
> memblock_enforce_memory_limit accepts the maximum memory size not the
> maximum address that can be handled by kernel. Fix the function invocation
> accordingly.
>
> Fixes: 1bd14a66ee52 ("RISC-V: Remove any memblock representing unusable memory area")
> Cc: stable@...r.kernel.org
>
> Reported-by: Bin Meng <bin.meng@...driver.com>
> Tested-by: Bin Meng <bin.meng@...driver.com>
> Acked-by: Mike Rapoport <rppt@...ux.ibm.com>
> Signed-off-by: Atish Patra <atish.patra@....com>
> ---
> Changes from v1->v2:
> 1. Added stable-kernel in cc.
> 2. Added reported/tested by tag.
> ---
> arch/riscv/mm/init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> index 13ba533f462b..bf5379135e39 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -176,7 +176,7 @@ void __init setup_bootmem(void)
> * Make sure that any memory beyond mem_start + (-PAGE_OFFSET) is removed
> * as it is unusable by kernel.
> */
> - memblock_enforce_memory_limit(mem_start - PAGE_OFFSET);
> + memblock_enforce_memory_limit(-PAGE_OFFSET);
>
> /* Reserve from the start of the kernel to the end of the kernel */
> memblock_reserve(vmlinux_start, vmlinux_end - vmlinux_start);
Thanks, this is on fixes.
Powered by blists - more mailing lists