[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aNbS5NL7_KXs42VH@rric.localdomain>
Date: Fri, 26 Sep 2025 19:52:36 +0200
From: Robert Richter <rrichter@....com>
To: Alison Schofield <alison.schofield@...el.com>
Cc: Vishal Verma <vishal.l.verma@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Dave Jiang <dave.jiang@...el.com>,
Davidlohr Bueso <dave@...olabs.net>, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org, Gregory Price <gourry@...rry.net>,
"Fabio M. De Francesco" <fabio.m.de.francesco@...ux.intel.com>,
Terry Bowman <terry.bowman@....com>,
Joshua Hahn <joshua.hahnjy@...il.com>
Subject: Re: [PATCH v3 01/11] cxl/region: Store root decoder in struct
cxl_region
On 23.09.25 14:40:31, Alison Schofield wrote:
> On Fri, Sep 12, 2025 at 04:45:03PM +0200, Robert Richter 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 code by removing dynamic lookups and removing 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.
>
> Where is the follow on patch that makes this a prerequisite?
I changed this to simplify and rework the argument list of
__construct_region(cxlr, cxled). Later, this changes further to use a
context argument: __construct_region(cxlr, ctx).
The patch additionally simplifies the arg list of
cxl_region_attach_position() and it removes the use of
to_cxl_root_decoder() which always reconstructs and checks the
pointer. The pointer never changes and is frequently used. Also, code
becomes more readable as this amphazises the binding between both
objects. Overall, I don't see a reason to use to_cxl_root_decoder() as
an alternative to avoid the the pointer, which would generally be
possible.
I will update the description accordingly.
Thanks,
-Robert
Powered by blists - more mailing lists