devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V11 3/5] of/fdt: Mark boot memory with MEMBLOCK_BOOT
       [not found] <1578625755-11792-1-git-send-email-anshuman.khandual@arm.com>
@ 2020-01-10  3:09 ` Anshuman Khandual
  0 siblings, 0 replies; only message in thread
From: Anshuman Khandual @ 2020-01-10  3:09 UTC (permalink / raw)
  To: linux-mm, linux-kernel, linux-arm-kernel, akpm, catalin.marinas, will
  Cc: mark.rutland, david, cai, logang, cpandya, arunks,
	dan.j.williams, mgorman, osalvador, ard.biesheuvel, steve.capper,
	broonie, valentin.schneider, Robin.Murphy, steven.price,
	suzuki.poulose, ira.weiny, Anshuman Khandual, Rob Herring,
	Frank Rowand, devicetree

early_init_dt_add_memory_arch() adds memory into memblock on both UEFI and
DT based arm64 systems. Lets mark these as boot memory right after they get
into memblock. All other platforms using this default implementation for
early_init_dt_add_memory_arch() will also have this memblock flag set on
boot memory ranges but will be upto the platforms if they would like to
use it or not. On arm64 platform this flag will be used to identify boot
memory at runtime and reject any attempt to remove them.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
 drivers/of/fdt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 2cdf64d..a2ae2c88 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1143,6 +1143,7 @@ void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)
 		base = phys_offset;
 	}
 	memblock_add(base, size);
+	memblock_mark_boot(base, size);
 }
 
 int __init __weak early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-10  3:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1578625755-11792-1-git-send-email-anshuman.khandual@arm.com>
2020-01-10  3:09 ` [PATCH V11 3/5] of/fdt: Mark boot memory with MEMBLOCK_BOOT Anshuman Khandual

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