public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] arm: skip nomap memblocks while finding the lowmem/highmem boundary
@ 2019-08-22  3:45 Chester Lin
  2019-08-22  3:59 ` Chester Lin
  2019-08-22  6:40 ` Mike Rapoport
  0 siblings, 2 replies; 5+ messages in thread
From: Chester Lin @ 2019-08-22  3:45 UTC (permalink / raw)
  To: linux@armlinux.org.uk, rppt@linux.ibm.com,
	ard.biesheuvel@linaro.org, akpm@linux-foundation.org,
	geert@linux-m68k.org, tglx@linutronix.de, mark.rutland@arm.com
  Cc: Joey Lee, guillaume.gardet@arm.com, linux-kernel@vger.kernel.org,
	Chester Lin, Gary Lin, linux-arm-kernel@lists.infradead.org

adjust_lowmem_bounds() checks every memblocks in order to find the boundary
between lowmem and highmem. However some memblocks could be marked as NOMAP
so they are not used by kernel, which should be skipped while calculating
the boundary.

Signed-off-by: Chester Lin <clin@suse.com>
---
 arch/arm/mm/mmu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 426d9085396b..b86dba44d828 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1181,6 +1181,9 @@ void __init adjust_lowmem_bounds(void)
 		phys_addr_t block_start = reg->base;
 		phys_addr_t block_end = reg->base + reg->size;
 
+		if (memblock_is_nomap(reg))
+			continue;
+
 		if (reg->base < vmalloc_limit) {
 			if (block_end > lowmem_limit)
 				/*
-- 
2.22.0


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

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

end of thread, other threads:[~2019-08-22  6:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-22  3:45 [PATCH] arm: skip nomap memblocks while finding the lowmem/highmem boundary Chester Lin
2019-08-22  3:59 ` Chester Lin
2019-08-22  6:44   ` Mike Rapoport
2019-08-22  6:46     ` Ard Biesheuvel
2019-08-22  6:40 ` Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox