[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240126235425.12233-16-quic_obabatun@quicinc.com>
Date: Fri, 26 Jan 2024 15:53:54 -0800
From: Oreoluwa Babatunde <quic_obabatun@...cinc.com>
To: <catalin.marinas@....com>, <will@...nel.org>, <robh+dt@...nel.org>,
<frowand.list@...il.com>, <vgupta@...nel.org>, <arnd@...db.de>,
<olof@...om.net>, <soc@...nel.org>, <guoren@...nel.org>,
<monstr@...str.eu>, <palmer@...belt.com>, <aou@...s.berkeley.edu>,
<dinguyen@...nel.org>, <chenhuacai@...nel.org>,
<tsbogend@...ha.franken.de>, <jonas@...thpole.se>,
<stefan.kristiansson@...nalahti.fi>, <shorne@...il.com>,
<mpe@...erman.id.au>, <ysato@...rs.sourceforge.jp>, <dalias@...c.org>,
<glaubitz@...sik.fu-berlin.de>, <richard@....at>,
<anton.ivanov@...bridgegreys.com>, <johannes@...solutions.net>,
<chris@...kel.net>, <jcmvbkbc@...il.com>
CC: <linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<devicetree@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
<kernel@...cinc.com>, Oreoluwa Babatunde <quic_obabatun@...cinc.com>
Subject: [PATCH 15/46] um: reserved_mem: Implement the new processing order for reserved memory
Call early_fdt_scan_reserved_mem() in place of
early_init_fdt_scan_reserved_mem() to carry out the first stage of the
reserved memory processing only.
The early_fdt_scan_reserved_mem() function is used to scan through the
DT and mark all the reserved memory regions as reserved or nomap as
needed, as well as allocate the memory required by the
dynamically-placed
reserved memory regions.
The second stage of the reserved memory processing is done by
fdt_init_reserved_mem(). This function is used to store the information
of the statically-placed reserved memory nodes in the reserved_mem
array as well as call the region specific initialization function on all
the stored reserved memory regions.
The call to fdt_init_reserved_mem() is placed right after
early_fdt_scan_reserved_mem() because memblock allocated memory should
already be writable at this point.
Signed-off-by: Oreoluwa Babatunde <quic_obabatun@...cinc.com>
---
arch/um/kernel/dtb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/um/kernel/dtb.c b/arch/um/kernel/dtb.c
index 484141b06938..3ecee151a083 100644
--- a/arch/um/kernel/dtb.c
+++ b/arch/um/kernel/dtb.c
@@ -2,6 +2,7 @@
#include <linux/init.h>
#include <linux/of_fdt.h>
+#include <linux/of_reserved_mem.h>
#include <linux/printk.h>
#include <linux/memblock.h>
#include <init.h>
@@ -25,7 +26,8 @@ void uml_dtb_init(void)
return;
}
- early_init_fdt_scan_reserved_mem();
+ early_fdt_scan_reserved_mem();
+ fdt_init_reserved_mem();
unflatten_device_tree();
}
--
2.17.1
Powered by blists - more mailing lists