Re: [PATCH 2/2] of: reserved_mem: allocate and map the reserved_mem array early

From: Mike Rapoport

Date: Sat Oct 10 2026 - 06:08:19 EST


On Thu, Oct 08, 2026 at 09:05:15AM -0500, Rob Herring wrote:
> On Thu, Oct 08, 2026 at 11:41:23AM +0200, Marek Szyprowski wrote:
> > Get rid of the static, limited-size reserved_mem array and replace it
> > with array allocated by memblock_alloc_raw() and accessed through a
> > temporary early_memremap() mapping. Such mapping is needed for some
> > architectures (like ARM64), where linear map is not yet available during
> > early boot scan. Having a single, writeable array with all reserved
> > regions removes the need to perform two step initialization introduced
> > by commit 8a6e02d0c00e ("of: reserved_mem: Restructure how the reserved
> > memory regions are processed"), so all regions can be processed
> > directly during the early scan again.
> >
> > Suggested-by: Mike Rapoport <rppt@xxxxxxxxxx>
> > Link: https://lore.kernel.org/all/asc6brs_g0ky0wOM@xxxxxxxxxx/
> > Assisted-By: Claude Opus 5.5 <noreply@xxxxxxxxxxxxx>
>
> Assisted-by: LLM
>
> is the new way...

Probably not any more :)

https://lore.kernel.org/all/20261009083137.3-1-sashal@xxxxxxxxxx/

> > Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
> > ---
> > drivers/of/fdt.c | 3 -
> > drivers/of/of_private.h | 2 -
> > drivers/of/of_reserved_mem.c | 251 ++++++++++++++---------------------
> > 3 files changed, 96 insertions(+), 160 deletions(-)

--
Sincerely yours,
Mike.