]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cxl/region: Add @hpa_range argument to function cxl_calc_interleave_pos()
authorRobert Richter <rrichter@amd.com>
Wed, 14 Jan 2026 16:48:22 +0000 (17:48 +0100)
committerDave Jiang <dave.jiang@intel.com>
Tue, 3 Feb 2026 17:52:58 +0000 (10:52 -0700)
commit1fd6c38fc5e18a9904bc1bd447bb4c2708f0292d
treea2c38073dd7c1899d23dba2bdddcb0a119711cc5
parentbc01fd5019faa14f4253de6f6abcae6d957c3a12
cxl/region: Add @hpa_range argument to function cxl_calc_interleave_pos()

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@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-7-rrichter@amd.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/region.c