cxl/pmem: Add support for multiple nvdimm-bridge objects
authorDan Williams <dan.j.williams@intel.com>
Tue, 14 Sep 2021 19:08:40 +0000 (12:08 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 21 Sep 2021 20:47:10 +0000 (13:47 -0700)
commit2e52b6256b9af23c5a881f56b5b5e7f5cb9b8b4b
tree3f2d5de620f4136b5441a20abd4bdf09ed17513c
parent60b8f17215de1e6551fec4e942494c3832c3e98b
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>
drivers/cxl/core/pmem.c
drivers/cxl/cxl.h
drivers/cxl/pmem.c