[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce7569d5-e3fb-42b8-8dee-dd1fcf76a733@intel.com>
Date: Fri, 7 Nov 2025 08:50:27 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Robert Richter <rrichter@....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 11/7/25 8:45 AM, Robert Richter wrote:
> 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.
Ok that is fair.
>
> I haven't evaluated moving qos to cxl_rd_ops as this is not the scope
> of the series.
The qos callback belongs with the cxl_root since the ACPI query is against the host bridge.>
> -Robert
Powered by blists - more mailing lists