linux-kernel.vger.kernel.org archive mirror
 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, rppt, ard.biesheuvel, akpm, geert, tglx, mark.rutland
  Cc: linux-arm-kernel, linux-kernel, guillaume.gardet, Chester Lin,
	Gary Lin, Joey Lee

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


^ 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;
as well as URLs for NNTP newsgroup(s).