Re: [PATCH v9 02/10] of: reserved_mem: Introduce "ll-map" property
From: Vincent Donnefort
Date: Mon Sep 07 2026 - 13:11:50 EST
On Mon, Sep 07, 2026 at 04:00:19PM +0200, Thierry Reding wrote:
> On Thu, Sep 03, 2026 at 11:03:12AM +0100, Vincent Donnefort wrote:
> > On Wed, Sep 02, 2026 at 12:24:36PM -0500, Rob Herring wrote:
> > > On Wed, Sep 02, 2026 at 11:47:04AM +0100, Vincent Donnefort wrote:
> > > > Keeping last-level mappings is interesting on some architectures as it
> > > > allows mapping/unmapping pages from the kernel direct map without the
> > > > risk of splitting blocks which, under the break-before-make rule, may
> > > > trigger page-faults the kernel can't handle.
> > > >
> > > > Add an "ll-map" property for reserved-memory regions. When set, it
> > > > splits the underlying memblock and sets the MEMBLOCK_LLMAP flag.
> > >
> > > Where is this documented? Any DT property must have a schema.
> >
> > Ack.
> >
> > >
> > > Though I'm not thrilled about more flag properties. Handling all the
> > > combinations of properties has proven to be painful. Can this be implied
> > > from the compatible string instead?
> > >
> > > Rob
> >
> > We need this before the kernel direct map has been created (paging_init()).
> >
> > I would have moved that directly into the driver lend_pool.c, but then it is
> > probed too late (unflatten_device_tree()).
>
> Any of the node_*() callbacks from struct reserved_mem_ops get called
> prior to paging_init(), so these could be used to manually set the
> memblock flags in the corresponding drivers.
>
> Thierry
Ha yes my bad, early_init_fdt_scan_reserved_mem() is calling ->node_init()
So I should be able to drop this patch entirely to do set memblock_set_llmap()
(or memblock_set_pte_map()) directly ino the that new FF-A lend_pool driver.
--
Vincent