/** * DOC: cxl pmem * * The core CXL PMEM infrastructure supports persistent memory * provisioning and serves as a bridge to the LIBNVDIMM subsystem. A CXL * 'bridge' device is added at the root of a CXL device topology if * platform firmware advertises at least one persistent memory capable * CXL window. That root-level bridge corresponds to a LIBNVDIMM 'bus' * device. Then for each cxl_memdev in the CXL device topology a bridge * device is added to host a LIBNVDIMM dimm object. When these bridges * are registered native LIBNVDIMM uapis are translated to CXL * operations, for example, namespace label access commands.
*/
/** * cxl_find_nvdimm_bridge() - find a bridge device relative to a port * @port: any descendant port of an nvdimm-bridge associated * root-cxl-port
*/ struct cxl_nvdimm_bridge *cxl_find_nvdimm_bridge(struct cxl_port *port)
{ struct cxl_root *cxl_root __free(put_cxl_root) = find_cxl_root(port); struct device *dev;
if (!cxl_root) return NULL;
dev = device_find_child(&cxl_root->port.dev,
&cxl_nvdimm_bridge_type,
device_match_type);
/** * devm_cxl_add_nvdimm() - add a bridge between a cxl_memdev and an nvdimm * @parent_port: parent port for the (to be added) @cxlmd endpoint port * @cxlmd: cxl_memdev instance that will perform LIBNVDIMM operations * * Return: 0 on success negative error code on failure.
*/ int devm_cxl_add_nvdimm(struct cxl_port *parent_port, struct cxl_memdev *cxlmd)
{ struct cxl_nvdimm_bridge *cxl_nvb; struct cxl_nvdimm *cxl_nvd; struct device *dev; int rc;
cxl_nvb = cxl_find_nvdimm_bridge(parent_port); if (!cxl_nvb) return -ENODEV;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.