Lines Matching refs:cxlrd
315 struct cxl_root_decoder *cxlrd = to_cxl_root_decoder(dev->parent); in interleave_ways_store() local
316 struct cxl_decoder *cxld = &cxlrd->cxlsd.cxld; in interleave_ways_store()
383 struct cxl_root_decoder *cxlrd = to_cxl_root_decoder(dev->parent); in interleave_granularity_store() local
384 struct cxl_decoder *cxld = &cxlrd->cxlsd.cxld; in interleave_granularity_store()
448 struct cxl_root_decoder *cxlrd = to_cxl_root_decoder(cxlr->dev.parent); in alloc_hpa() local
475 res = alloc_free_mem_region(cxlrd->res, size, SZ_256M, in alloc_hpa()
966 struct cxl_root_decoder *cxlrd = to_cxl_root_decoder(cxlr->dev.parent); in cxl_port_setup_targets() local
1013 parent_ig = cxlrd->cxlsd.cxld.interleave_granularity; in cxl_port_setup_targets()
1014 parent_iw = cxlrd->cxlsd.cxld.interleave_ways; in cxl_port_setup_targets()
1185 struct cxl_root_decoder *cxlrd = to_cxl_root_decoder(cxlr->dev.parent); in cxl_region_attach() local
1244 root_port = cxlrd_to_port(cxlrd); in cxl_region_attach()
1253 if (cxlrd->calc_hb(cxlrd, pos) != dport) { in cxl_region_attach()
1256 dev_name(&cxlrd->cxlsd.cxld.dev)); in cxl_region_attach()
1537 struct cxl_root_decoder *cxlrd = to_cxl_root_decoder(dev->parent); in cxl_region_release() local
1539 int id = atomic_read(&cxlrd->region_id); in cxl_region_release()
1547 if (atomic_try_cmpxchg(&cxlrd->region_id, &id, cxlr->id)) { in cxl_region_release()
1601 static struct cxl_region *cxl_region_alloc(struct cxl_root_decoder *cxlrd, int id) in cxl_region_alloc() argument
1615 dev->parent = &cxlrd->cxlsd.cxld.dev; in cxl_region_alloc()
1642 static struct cxl_region *devm_cxl_add_region(struct cxl_root_decoder *cxlrd, in devm_cxl_add_region() argument
1647 struct cxl_port *port = to_cxl_port(cxlrd->cxlsd.cxld.dev.parent); in devm_cxl_add_region()
1652 cxlr = cxl_region_alloc(cxlrd, id); in devm_cxl_add_region()
1672 dev_name(&cxlrd->cxlsd.cxld.dev), dev_name(dev)); in devm_cxl_add_region()
1683 struct cxl_root_decoder *cxlrd = to_cxl_root_decoder(dev); in create_pmem_region_show() local
1685 return sysfs_emit(buf, "region%u\n", atomic_read(&cxlrd->region_id)); in create_pmem_region_show()
1692 struct cxl_root_decoder *cxlrd = to_cxl_root_decoder(dev); in create_pmem_region_store() local
1704 if (atomic_cmpxchg(&cxlrd->region_id, id, rc) != id) { in create_pmem_region_store()
1709 cxlr = devm_cxl_add_region(cxlrd, id, CXL_DECODER_PMEM, in create_pmem_region_store()
1739 cxl_find_region_by_name(struct cxl_root_decoder *cxlrd, const char *name) in cxl_find_region_by_name() argument
1741 struct cxl_decoder *cxld = &cxlrd->cxlsd.cxld; in cxl_find_region_by_name()
1755 struct cxl_root_decoder *cxlrd = to_cxl_root_decoder(dev); in delete_region_store() local
1759 cxlr = cxl_find_region_by_name(cxlrd, buf); in delete_region_store()