Re: [PATCH v4 01/14] cxl/region: Store root decoder in struct cxl_region

Robert Richter
2025-11-14T09:37:38Z

On 11.11.25 14:45:41, Jonathan Cameron wrote:
> On Mon, 3 Nov 2025 19:47:42 +0100
> Robert Richter <rrichter@amd.com> wrote:
>
> > A region is always bound to a root decoder. The region's associated
> > root decoder is often needed. Add it to struct cxl_region.
> >
> > This simplifies the code by removing dynamic lookups and the root
> > decoder argument from the function argument list where possible.
> >
> > Patch is a prerequisite to implement address translation which uses
> > struct cxl_region to store all relevant region and interleaving
> > parameters. It changes the argument list of __construct_region() in
> > preparation of adding a context argument. Additionally the arg list of
> > cxl_region_attach_position() is simplified and the use of
> > to_cxl_root_decoder() removed, which always reconstructs and checks
> > the pointer. The pointer never changes and is frequently used. Code
> > becomes more readable as this amphazises the binding between both
> > objects.
> >
> > Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> > Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
> > Reviewed-by: Gregory Price <gourry@gourry.net>
> > Signed-off-by: Robert Richter <rrichter@amd.com>
>
> Just a note to say this will (maybe just context) clash with Alejandro's rework
> around construct_region_begin()
>
> https://lore.kernel.org/all/20251110153657.2706192-19-alejandro.lucero-palau@amd.com/
>
> Probably easy to resolve, but worth both of you being aware if you hadn't noticed
> already!

I have checked the conflicts and they look trivial. There are no
"functional" conflicts.

Thanks for pointing out.

-Robert