cxl_root
static int cxl_acpi_qos_class(struct cxl_root *cxl_root,
struct device *dev = cxl_root->port.uport_dev;
struct cxl_root *cxl_root;
cxl_root = devm_cxl_add_root(host);
if (IS_ERR(cxl_root))
return PTR_ERR(cxl_root);
cxl_root->ops.qos_class = cxl_acpi_qos_class;
root_port = &cxl_root->port;
cxl_setup_prm_address_translation(cxl_root);
void cxl_setup_prm_address_translation(struct cxl_root *cxl_root)
struct device *host = cxl_root->port.uport_dev;
cxl_root->ops.translation_setup_root = cxl_prm_setup_root;
static int cxl_prm_setup_root(struct cxl_root *cxl_root, void *data)
struct cxl_root *cxl_root __free(put_cxl_root) = find_cxl_root(port);
if (!cxl_root)
if (!cxl_root->ops.qos_class)
rc = cxl_root->ops.qos_class(cxl_root,
struct cxl_root *cxl_root __free(put_cxl_root) =
if (!cxl_root)
root_port = &cxl_root->port;
struct cxl_root *cxl_root __free(put_cxl_root) = find_cxl_root(port);
if (!cxl_root)
dev = device_find_child(&cxl_root->port.dev,
struct cxl_root *find_cxl_root(struct cxl_port *port)
struct cxl_root *cxl_root __free(kfree) = NULL;
cxl_root = kzalloc_obj(*cxl_root);
if (!cxl_root)
if (cxl_root)
port = &no_free_ptr(cxl_root)->port;
struct cxl_root *devm_cxl_add_root(struct device *host)
static int cxl_root_setup_translation(struct cxl_root *cxl_root,
if (!cxl_root->ops.translation_setup_root)
return cxl_root->ops.translation_setup_root(cxl_root, ctx);
struct cxl_root *cxl_root __free(put_cxl_root) = find_cxl_root(port);
rc = cxl_root_setup_translation(cxl_root, ctx);
cxlrd_dev = device_find_child(&cxl_root->port.dev, &ctx->hpa_range,
struct cxl_root;
int (*qos_class)(struct cxl_root *cxl_root,
int (*translation_setup_root)(struct cxl_root *cxl_root, void *data);
static inline struct cxl_root *
return container_of(port, struct cxl_root, port);
struct cxl_root *devm_cxl_add_root(struct device *host);
struct cxl_root *find_cxl_root(struct cxl_port *port);
DEFINE_FREE(put_cxl_root, struct cxl_root *, if (_T) put_device(&_T->port.dev))
void cxl_setup_prm_address_translation(struct cxl_root *cxl_root);
void cxl_setup_prm_address_translation(struct cxl_root *cxl_root) {}
struct cxl_root *cxl_root __free(put_cxl_root) =
if (!cxl_root)