All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] RISC-V: Fix usage of memblock_enforce_memory_limit
@ 2020-12-19  0:13 ` Atish Patra
  0 siblings, 0 replies; 4+ messages in thread
From: Atish Patra @ 2020-12-19  0:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Atish Patra, stable, Bin Meng, Mike Rapoport, Albert Ou,
	Andrew Morton, Anup Patel, linux-riscv, Mike Rapoport,
	Palmer Dabbelt, Paul Walmsley, Bin Meng

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@vger.kernel.org

Reported-by: Bin Meng <bin.meng@windriver.com>
Tested-by: Bin Meng <bin.meng@windriver.com>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Atish Patra <atish.patra@wdc.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);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2] RISC-V: Fix usage of memblock_enforce_memory_limit
@ 2020-12-19  0:13 ` Atish Patra
  0 siblings, 0 replies; 4+ messages in thread
From: Atish Patra @ 2020-12-19  0:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: Albert Ou, Bin Meng, stable, Mike Rapoport, Atish Patra,
	Anup Patel, Palmer Dabbelt, Paul Walmsley, Andrew Morton,
	Bin Meng, linux-riscv, Mike Rapoport

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@vger.kernel.org

Reported-by: Bin Meng <bin.meng@windriver.com>
Tested-by: Bin Meng <bin.meng@windriver.com>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Atish Patra <atish.patra@wdc.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);
-- 
2.25.1


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] RISC-V: Fix usage of memblock_enforce_memory_limit
  2020-12-19  0:13 ` Atish Patra
@ 2020-12-22  5:02   ` Palmer Dabbelt
  -1 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2020-12-22  5:02 UTC (permalink / raw)
  To: Atish Patra
  Cc: linux-kernel, Atish Patra, stable, bin.meng, rppt, aou, akpm,
	Anup Patel, linux-riscv, rppt, Paul Walmsley, bmeng.cn

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@vger.kernel.org
>
> Reported-by: Bin Meng <bin.meng@windriver.com>
> Tested-by: Bin Meng <bin.meng@windriver.com>
> Acked-by: Mike Rapoport <rppt@linux.ibm.com>
> Signed-off-by: Atish Patra <atish.patra@wdc.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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] RISC-V: Fix usage of memblock_enforce_memory_limit
@ 2020-12-22  5:02   ` Palmer Dabbelt
  0 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2020-12-22  5:02 UTC (permalink / raw)
  To: Atish Patra
  Cc: aou, bin.meng, linux-kernel, stable, rppt, Atish Patra,
	Anup Patel, Paul Walmsley, akpm, bmeng.cn, linux-riscv, rppt

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@vger.kernel.org
>
> Reported-by: Bin Meng <bin.meng@windriver.com>
> Tested-by: Bin Meng <bin.meng@windriver.com>
> Acked-by: Mike Rapoport <rppt@linux.ibm.com>
> Signed-off-by: Atish Patra <atish.patra@wdc.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.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-22  5:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-19  0:13 [PATCH v2] RISC-V: Fix usage of memblock_enforce_memory_limit Atish Patra
2020-12-19  0:13 ` Atish Patra
2020-12-22  5:02 ` Palmer Dabbelt
2020-12-22  5:02   ` Palmer Dabbelt

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.