cxl/port: Move 'cxl_ep' references to an xarray per port
authorDan Williams <dan.j.williams@intel.com>
Fri, 27 May 2022 17:58:26 +0000 (10:58 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 22 Jul 2022 00:19:24 +0000 (17:19 -0700)
commit256d0e9ee4f2f14d30b93fd593cef3108b0527ca
treee51b7c7bf27683b0ba828039d01f70f0ef21fc37
parent1b58b4cac6fc6fab55f34f74087594125fc60b84
cxl/port: Move 'cxl_ep' references to an xarray per port

In preparation for region provisioning that needs to walk the topology
by endpoints, use an xarray to record endpoint interest in a given port.
In addition to being more space and time efficient it also reduces the
complexity of the implementation by moving locking internal to the
xarray implementation. It also allows for a single cxl_ep reference to
be recorded in multiple xarrays.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20220624041950.559155-2-dan.j.williams@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/port.c
drivers/cxl/cxl.h