+24
−26
Loading
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 struct cxl_region_context 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: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-8-rrichter@amd.com Signed-off-by:
Dave Jiang <dave.jiang@intel.com>