All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Atish Patra <atish.patra@wdc.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>,
	Anup Patel <anup.patel@wdc.com>,
	linux-kernel@vger.kernel.org, Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Bin Meng <bmeng.cn@gmail.com>,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH] RISC-V: Fix usage of memblock_enforce_memory_limit
Date: Thu, 17 Dec 2020 10:27:14 +0200	[thread overview]
Message-ID: <20201217082714.GA366777@kernel.org> (raw)
In-Reply-To: <20201217074855.1948743-1-atish.patra@wdc.com>

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@wdc.com>

Acked-by: Mike Rapoport <rppt@linux.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.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Mike Rapoport <rppt@kernel.org>
To: Atish Patra <atish.patra@wdc.com>
Cc: linux-kernel@vger.kernel.org, Albert Ou <aou@eecs.berkeley.edu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Anup Patel <anup.patel@wdc.com>,
	linux-riscv@lists.infradead.org,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Bin Meng <bmeng.cn@gmail.com>
Subject: Re: [PATCH] RISC-V: Fix usage of memblock_enforce_memory_limit
Date: Thu, 17 Dec 2020 10:27:14 +0200	[thread overview]
Message-ID: <20201217082714.GA366777@kernel.org> (raw)
In-Reply-To: <20201217074855.1948743-1-atish.patra@wdc.com>

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@wdc.com>

Acked-by: Mike Rapoport <rppt@linux.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.

  parent reply	other threads:[~2020-12-17  8:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  7:48 [PATCH] RISC-V: Fix usage of memblock_enforce_memory_limit Atish Patra
2020-12-17  7:48 ` Atish Patra
2020-12-17  8:12 ` Bin Meng
2020-12-17  8:12   ` Bin Meng
2020-12-17  8:43   ` Atish Patra
2020-12-17  8:43     ` Atish Patra
2020-12-17  8:53     ` Bin Meng
2020-12-17  8:53       ` Bin Meng
2020-12-17 23:44       ` Atish Patra
2020-12-17 23:44         ` Atish Patra
2020-12-17  8:27 ` Mike Rapoport [this message]
2020-12-17  8:27   ` Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201217082714.GA366777@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=anup.patel@wdc.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=atish.patra@wdc.com \
    --cc=bmeng.cn@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.