[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQ4UADgeq6NH1lwl@rric.localdomain>
Date: Fri, 7 Nov 2025 16:45:04 +0100
From: Robert Richter <rrichter@....com>
To: Dave Jiang <dave.jiang@...el.com>
Cc: Alison Schofield <alison.schofield@...el.com>,
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>,
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 v4 05/14] cxl: Simplify cxl_root_ops allocation and
handling
On 04.11.25 16:02:04, Dave Jiang wrote:
>
>
> On 11/3/25 2:53 PM, Dave Jiang wrote:
> >
> >
> > On 11/3/25 11:47 AM, Robert Richter wrote:
> >> A root port's callback handlers are collected in struct cxl_root_ops.
> >> The structure is dynamically allocated, though it contains only a
> >> single pointer in it. This also requires to check two pointers to
> >> check for the existance of a callback.
> >>
> >> Simplify the allocation, release and handler check by embedding the
> >> ops statical in struct cxl_root.
> >>
> >> Signed-off-by: Robert Richter <rrichter@....com>
> >
> > Reviewed-by: Dave Jiang <dave.jiang@...el.com>
>
>
> Thought about it for a bit, should the callback be with 'cxl_rd_ops'
> and the rest of the translation functions under the root decoder
> rather than cxl_root_ops with the cxl root? That seems to be the
> better fit.
The handler for address translation is needed to determine the root
decoders. Because of that the cxl_rd_ops cannot be used to hold the
callback reference. The use of cxl_root_ops works since the pci tree
can be walked to get the cxl root without any cxl specific knowledge.
A description of that is already in the patch that adds the callback.
I haven't evaluated moving qos to cxl_rd_ops as this is not the scope
of the series.
-Robert
Powered by blists - more mailing lists