[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqKWd2H0bV9Z8REMBYd2hPMTjDO1T4dYehM-QvemB9zrDg@mail.gmail.com>
Date: Mon, 26 Jan 2026 10:33:13 -0600
From: Rob Herring <robh@...nel.org>
To: Marek Szyprowski <m.szyprowski@...sung.com>
Cc: Oreoluwa Babatunde <oreoluwa.babatunde@....qualcomm.com>, ye.li@....nxp.com,
kernel@....qualcomm.com, saravanak@...gle.com, akpm@...ux-foundation.org,
david@...hat.com, lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com,
vbabka@...e.cz, rppt@...nel.org, surenb@...gle.com, mhocko@...e.com,
robin.murphy@....com, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org, iommu@...ts.linux.dev,
quic_c_gdjako@...cinc.com
Subject: Re: [PATCH] of: reserved_mem: Allow reserved_mem framework detect
"cma=" kernel param
On Mon, Jan 19, 2026 at 4:38 AM Marek Szyprowski
<m.szyprowski@...sung.com> wrote:
>
> On 18.12.2025 15:42, Rob Herring wrote:
> > On Thu, Dec 18, 2025 at 3:55 AM Marek Szyprowski
> > <m.szyprowski@...sung.com> wrote:
> >> On 10.12.2025 15:07, Rob Herring wrote:
> >>> On Tue, Dec 9, 2025 at 6:20 PM Oreoluwa Babatunde
> >>> <oreoluwa.babatunde@....qualcomm.com> wrote:
> >>>> When initializing the default cma region, the "cma=" kernel parameter
> >>>> takes priority over a DT defined linux,cma-default region. Hence, give
> >>>> the reserved_mem framework the ability to detect this so that the DT
> >>>> defined cma region can skip initialization accordingly.
> >>> Please explain here why this is a new problem. Presumably the
> >>> RESERVEDMEM_OF_DECLARE hook after commit xxxx gets called before the
> >>> early_param hook. And why is it now earlier?
> >>>
> >>> I don't really like the state/ordering having to be worried about in 2 places.
> >> I also don't like this spaghetti, but it originates from
> >> commit 8a6e02d0c00e ("of: reserved_mem: Restructure how the reserved
> >> memory regions are processed") and the first fixup for it: 2c223f7239f3
> >> ("of: reserved_mem: Restructure call site for
> >> dma_contiguous_early_fixup()").
> > Honestly, this code wasn't great before. Every time it is touched it
> > breaks someone.
>
> Indeed it got a bit complicated and needs some improvement, but first I
> want to fix the the reported regression. This patch does this and it
> looks that there are no ideas how to fix this in a different way. Rob,
> could I apply it via dma-mapping-fixes?
Sigh, yes.
Acked-by: Rob Herring (Arm) <robh@...nel.org>
Rob
Powered by blists - more mailing lists