diff options
author | Dan Williams <dan.j.williams@intel.com> | 2022-05-27 20:58:26 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2022-07-22 03:19:24 +0300 |
commit | 256d0e9ee4f2f14d30b93fd593cef3108b0527ca (patch) | |
tree | e51b7c7bf27683b0ba828039d01f70f0ef21fc37 /drivers/cxl/cxl.h | |
parent | 1b58b4cac6fc6fab55f34f74087594125fc60b84 (diff) | |
download | linux-256d0e9ee4f2f14d30b93fd593cef3108b0527ca.tar.xz |
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>
Diffstat (limited to 'drivers/cxl/cxl.h')
-rw-r--r-- | drivers/cxl/cxl.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h index 4bdc47600f9d..f1dd60c86e2a 100644 --- a/drivers/cxl/cxl.h +++ b/drivers/cxl/cxl.h @@ -347,7 +347,7 @@ struct cxl_port { struct device *host_bridge; int id; struct list_head dports; - struct list_head endpoints; + struct xarray endpoints; struct cxl_dport *parent_dport; struct ida decoder_ida; int hdm_end; @@ -381,12 +381,10 @@ struct cxl_dport { * struct cxl_ep - track an endpoint's interest in a port * @ep: device that hosts a generic CXL endpoint (expander or accelerator) * @dport: which dport routes to this endpoint on @port - * @list: node on port->endpoints list */ struct cxl_ep { struct device *ep; struct cxl_dport *dport; - struct list_head list; }; /* |