diff options
author | Dan Williams <dan.j.williams@intel.com> | 2022-05-27 10:56:59 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2022-07-22 03:19:24 +0300 |
commit | de516b40116e98c60ee475e92108453686098c85 (patch) | |
tree | b9ad5e5e6ac81f9648b26cc52e37003a54d17ed0 /drivers/cxl/cxl.h | |
parent | cf880423b6a0599499c1f83542cab0b75daa29ba (diff) | |
download | linux-de516b40116e98c60ee475e92108453686098c85.tar.xz |
cxl/port: Record dport in endpoint references
Recall that the primary role of the cxl_mem driver is to probe if the
given endpoint is connected to a CXL port topology. In that process it
walks its device ancestry to its PCI root port. If that root port is
also a CXL root port then the probe process adds cxl_port object
instances at switch in the path between to the root and the endpoint. As
those cxl_port instances are added, or if a previous enumeration
attempt already created the port, a 'struct cxl_ep' instance is
registered with that port to track the endpoints interested in that
port.
At the time the cxl_ep is registered the downstream egress path from the
port to the endpoint is known. Take the opportunity to record that
information as it will be needed for dynamic programming of decoder
targets during region provisioning.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/165784329944.1758207.15203961796832072116.stgit@dwillia2-xfh.jf.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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h index 14e1c2c08e09..326283f1e328 100644 --- a/drivers/cxl/cxl.h +++ b/drivers/cxl/cxl.h @@ -378,10 +378,12 @@ 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; }; |