]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cxl/region: Separate region parameter setup and region construction
authorRobert Richter <rrichter@amd.com>
Wed, 14 Jan 2026 16:48:21 +0000 (17:48 +0100)
committerDave Jiang <dave.jiang@intel.com>
Tue, 3 Feb 2026 17:52:58 +0000 (10:52 -0700)
commitbc01fd5019faa14f4253de6f6abcae6d957c3a12
tree80395b576fe8e649cd5708268f0b366df2d42afd
parent3e422caa40d0d4bf25ece6e82418ce642d56524a
cxl/region: Separate region parameter setup and region construction

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 the region parameters from
the region construction. Temporarily store all the data to create the
region in the new struct cxl_region_context. Once the region data is
determined and struct cxl_region_context is filled, construct the
region.

Patch is a prerequisite to implement address translation. The code
separation helps to later extend it to determine region parameters
using other methods as needed, esp. to support address translation.

Reviewed-by: Gregory Price <gourry@gourry.net>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Tested-by: Gregory Price <gourry@gourry.net>
Signed-off-by: Robert Richter <rrichter@amd.com>
Link: https://patch.msgid.link/20260114164837.1076338-6-rrichter@amd.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/core.h
drivers/cxl/core/region.c