[PATCH] riscv: reserve DTB before possible memblock allocation

Conor Dooley conor.dooley at microchip.com
Mon Nov 27 06:29:21 PST 2023


On Wed, Jun 07, 2023 at 11:23:31PM +0100, Conor Dooley wrote:
> On Thu, Jun 08, 2023 at 06:17:22AM +0800, Woody Zhang wrote:
> > Hi, Conor
> > 
> > On Wed, Jun 07, 2023 at 07:17:28PM +0100, Conor Dooley wrote:
> > >+CC Alex, you should take a look at this patch.
> > >
> > >On Wed, Jun 07, 2023 at 09:35:19PM +0800, Woody Zhang wrote:
> > >> It's possible that early_init_fdt_scan_reserved_mem() allocates memory
> > >> from memblock for dynamic reserved memory in `/reserved-memory` node.
> > >> Any fixed reservation must be done before that to avoid potential
> > >> conflicts.
> > >> 
> > >> Reserve the DTB in memblock just after early scanning it.
> > >
> > >The rationale makes sense to me, I am just wondering what compelling
> > >reason there is to move it away from the memblock_reserve()s for the
> > >initd and vmlinux? Moving it above early_init_fdt_scan_reserved_mem()
> > >should be the sufficient minimum & would keep things together.
> > 
> > IMO, moving it to parse_dtb() is more reasonable as early scanning and
> > reservation are both subject to DTB. It can also lower the risk to
> > mess up the sequence in the future. BTW, it's also invoked in
> > setup_machine_fdt() in arm64.
> 
> I'm fine with the change either way, so:
> Reviewed-by: Conor Dooley <conor.dooley at microchip.com>
> Mostly wanted to know whether you'd considered the minimal change.

What ever happened to this patch?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20231127/56a7b24e/attachment.sig>


More information about the linux-riscv mailing list