[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1578625755-11792-4-git-send-email-anshuman.khandual@arm.com>
Date: Fri, 10 Jan 2020 08:39:13 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, akpm@...ux-foundation.org,
catalin.marinas@....com, will@...nel.org
Cc: mark.rutland@....com, david@...hat.com, cai@....pw,
logang@...tatee.com, cpandya@...eaurora.org, arunks@...eaurora.org,
dan.j.williams@...el.com, mgorman@...hsingularity.net,
osalvador@...e.de, ard.biesheuvel@....com, steve.capper@....com,
broonie@...nel.org, valentin.schneider@....com,
Robin.Murphy@....com, steven.price@....com, suzuki.poulose@....com,
ira.weiny@...el.com, Anshuman Khandual <anshuman.khandual@....com>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
devicetree@...r.kernel.org
Subject: [PATCH V11 3/5] of/fdt: Mark boot memory with MEMBLOCK_BOOT
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@...nel.org>
Cc: Frank Rowand <frowand.list@...il.com>
Cc: devicetree@...r.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@....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
Powered by blists - more mailing lists