Re: [PATCH v3 07/11] cxl: Introduce callback to translate a decoder's HPA to the next parent port
From: Robert Richter
Date: Wed Sep 17 2025 - 04:21:07 EST
On 15.09.25 13:22:14, Dave Jiang wrote:
> On 9/12/25 7:45 AM, Robert Richter wrote:
> > @@ -619,6 +631,7 @@ struct cxl_port {
> > struct cxl_dport *parent_dport;
> > struct ida decoder_ida;
> > struct cxl_register_map reg_map;
> > + cxl_to_hpa_fn to_hpa;
>
> The more I look at this, the more I feel the callback should be part
> of 'struct cxl_rd_ops' and not under each port. While this provides
> flexibility in a general case if there is a need to translate at
> each level, the actual use case in the field today only requires
> translation at the top as far as I can tell. And the translate
> functionality should be part of a decoder and not a port. And in
> this case, the root decoder would suffice.
Ok, I see the tendence to handle this in a more specific use case. A
change of the implementation should be possible, will change that.
Thanks,
-Robert