All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Fix usage of memblock_enforce_memory_limit
@ 2020-12-17  7:48 ` Atish Patra
  0 siblings, 0 replies; 12+ messages in thread
From: Atish Patra @ 2020-12-17  7:48 UTC (permalink / raw)
  To: linux-kernel
  Cc: Atish Patra, 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 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>
---
 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


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

end of thread, other threads:[~2020-12-17 23:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-12-17  8:27   ` Mike Rapoport

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.