[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201217082714.GA366777@kernel.org>
Date: Thu, 17 Dec 2020 10:27:14 +0200
From: Mike Rapoport <rppt@...nel.org>
To: Atish Patra <atish.patra@....com>
Cc: linux-kernel@...r.kernel.org, Albert Ou <aou@...s.berkeley.edu>,
Andrew Morton <akpm@...ux-foundation.org>,
Anup Patel <anup.patel@....com>,
linux-riscv@...ts.infradead.org,
Palmer Dabbelt <palmer@...belt.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Bin Meng <bmeng.cn@...il.com>
Subject: Re: [PATCH] RISC-V: Fix usage of memblock_enforce_memory_limit
On Wed, Dec 16, 2020 at 11:48:55PM -0800, Atish Patra wrote:
> memblock_enforce_memory_limit accepts the maximum memory size not the last
> address. Fix the function invocation correctly.
>
> Fixes: 1bd14a66ee52 ("RISC-V: Remove any memblock representing unusable memory area")
>
> Signed-off-by: Atish Patra <atish.patra@....com>
Acked-by: Mike Rapoport <rppt@...ux.ibm.com>
> ---
> 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 8e577f14f120..e4133c20744c 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -174,7 +174,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);
> --
> 2.25.1
>
--
Sincerely yours,
Mike.
Powered by blists - more mailing lists