devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: of_reserved_mem: clean-up reserved memory with no-map
@ 2024-04-28 12:55 skseofh
  2024-04-28 13:10 ` DaeRo Lee
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: skseofh @ 2024-04-28 12:55 UTC (permalink / raw)
  To: robh, saravanak, rppt; +Cc: devicetree, linux-kernel, Daero Lee

From: Daero Lee <daero_le.lee@samsung.com>

In early_init_dt_reserve_memory we only add memory w/o no-map flag to
memblock.reserved. But we need to add memory w/ no-map flag to
memblock.reserved, because NOMAP and memblock.reserved are semantically
different.

Signed-off-by: Daero Lee <daero_le.lee@samsung.com>
---
 drivers/of/of_reserved_mem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 8236ecae2953..1c916da8adaf 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -91,7 +91,8 @@ static int __init early_init_dt_reserve_memory(phys_addr_t base,
 		    memblock_is_region_reserved(base, size))
 			return -EBUSY;
 
-		return memblock_mark_nomap(base, size);
+		if (memblock_mark_nomap(base, size))
+			return;
 	}
 	return memblock_reserve(base, size);
 }
-- 
2.25.1


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

end of thread, other threads:[~2024-05-24  9:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-28 12:55 [PATCH] of: of_reserved_mem: clean-up reserved memory with no-map skseofh
2024-04-28 13:10 ` DaeRo Lee
2024-04-29 14:14   ` Mike Rapoport
2024-05-01  1:39 ` kernel test robot
2024-05-01  4:59 ` kernel test robot
2024-05-01 13:23   ` [PATCH v2] " skseofh
2024-05-22 14:31     ` Rob Herring
2024-05-24  9:32       ` DaeRo Lee

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).