Re: [PATCH v7 06/11] cxl/region: Add @hpa_range argument to function cxl_calc_interleave_pos()

From: Jonathan Cameron

Date: Mon Nov 17 2025 - 09:04:09 EST


On Fri, 14 Nov 2025 22:39:19 +0100
Robert Richter <rrichter@xxxxxxx> wrote:

> cxl_calc_interleave_pos() uses the endpoint decoder's HPA range to
> determine its interleaving position. This requires the endpoint
> decoders to be an SPA, which is not the case for systems that need
> address translation.
>
> Add a separate @hpa_range argument to function
> cxl_calc_interleave_pos() to specify the address range. Now it is
> possible to pass the SPA translated address range of an endpoint
> decoder to function cxl_calc_interleave_pos().
>
> Refactor only, no functional changes.
>
> Patch is a prerequisite to implement address translation.
>
> Reviewed-by: Gregory Price <gourry@xxxxxxxxxx>
> Reviewed-by: Dave Jiang <dave.jiang@xxxxxxxxx>
> Tested-by: Gregory Price <gourry@xxxxxxxxxx>
> Signed-off-by: Robert Richter <rrichter@xxxxxxx>
Reviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>