diff options
author | Dan Williams <dan.j.williams@intel.com> | 2021-09-14 22:08:40 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2021-09-21 23:47:10 +0300 |
commit | 2e52b6256b9af23c5a881f56b5b5e7f5cb9b8b4b (patch) | |
tree | 3f2d5de620f4136b5441a20abd4bdf09ed17513c /drivers/cxl/cxl.h | |
parent | 60b8f17215de1e6551fec4e942494c3832c3e98b (diff) | |
download | linux-2e52b6256b9af23c5a881f56b5b5e7f5cb9b8b4b.tar.xz |
cxl/pmem: Add support for multiple nvdimm-bridge objects
In preparation for a mocked unit test environment for CXL objects, allow
for multiple unique nvdimm-bridge objects.
For now, just allow multiple bridges to be registered. Later, when there
are multiple present, further updates are needed to
cxl_find_nvdimm_bridge() to identify which bridge is associated with
which CXL hierarchy for nvdimm registration.
Note that this does change the kernel device-name for the bridge object.
User space should not have any attachment to the device name at this
point as it is still early days in the CXL driver development.
Acked-by: Ben Widawsky <ben.widawsky@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/163164647007.2831228.2150246954620721526.stgit@dwillia2-desk3.amr.corp.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 53927f9fa77e..1b2e816e061e 100644 --- a/drivers/cxl/cxl.h +++ b/drivers/cxl/cxl.h @@ -211,6 +211,7 @@ enum cxl_nvdimm_brige_state { }; struct cxl_nvdimm_bridge { + int id; struct device dev; struct cxl_port *port; struct nvdimm_bus *nvdimm_bus; @@ -323,4 +324,5 @@ struct cxl_nvdimm_bridge *devm_cxl_add_nvdimm_bridge(struct device *host, struct cxl_nvdimm *to_cxl_nvdimm(struct device *dev); bool is_cxl_nvdimm(struct device *dev); int devm_cxl_add_nvdimm(struct device *host, struct cxl_memdev *cxlmd); +struct cxl_nvdimm_bridge *cxl_find_nvdimm_bridge(void); #endif /* __CXL_H__ */ |