Re: [PATCH v3 06/11] cxl/region: Separate region parameter setup and region construction
From: Gregory Price
Date: Wed Sep 17 2025 - 16:16:02 EST
On Fri, Sep 12, 2025 at 04:45:08PM +0200, Robert Richter wrote:
> To construct a region, the region parameters such as address range and
> interleaving config need to be determined. This is done while
> constructing the region by inspecting the endpoint decoder
> configuration. The endpoint decoder is passed as a function argument.
>
> With address translation the endpoint decoder data is no longer
> sufficient to extract the region parameters as some of the information
> is obtained using other methods such as using firmware calls.
>
> In a first step, separate code to determine and setup the region
> parameters from the region construction. Temporarily store all the
> data to create the region in the new struct cxl_region_context. Add a
> new function setup_region_parameters() to fill that struct and later
> use it to construct the region. This simplifies the extension of the
> function to support other methods needed, esp. to support address
> translation.
>
> Patch is a prerequisite to implement address translation.
>
> Signed-off-by: Robert Richter <rrichter@xxxxxxx>
Dave already got the init code, so with that change feel free to add
Reviewed-by: Gregory Price <gourry@xxxxxxxxxx>