Re: [PATCH v9 07/13] cxl/region: Use region data to get the root decoder

From: Alison Schofield

Date: Tue Jan 13 2026 - 22:19:45 EST


On Sat, Jan 10, 2026 at 12:46:52PM +0100, Robert Richter wrote:
> To find a region's root decoder, the endpoint's HPA range is used to
> search the matching decoder by its range. With address translation the
> endpoint decoder's range is in a different address space and thus
> cannot be used to determine the root decoder.
>
> The region parameters are encapsulated within struc cxl_region_context

maybe s/struc/struct upon applying

> and may include the translated Host Physical Address (HPA) range. Use
> this context to identify the root decoder rather than relying on the
> endpoint.
>
> Modify cxl_find_root_decoder() and add the region context as
> parameter. Rename this function to get_cxl_root_decoder() as a
> counterpart to put_cxl_root_decoder(). Simplify the implementation by
> removing function cxl_port_find_switch_decode(). The function is
> unnecessary because it is not referenced or utilized elsewhere in the
> code.
>

Reviewed-by: Alison Schofield <alison.schofield@xxxxxxxxx>