• Home
  • Raw
  • Download

Lines Matching refs:afu

47 	struct cxl_afu *afu;  in cxl_pci_enable_device_hook()  local
50 afu = (struct cxl_afu *)phb->private_data; in cxl_pci_enable_device_hook()
52 if (!cxl_ops->link_ok(afu->adapter, afu)) { in cxl_pci_enable_device_hook()
60 return _cxl_pci_associate_default_context(dev, afu); in cxl_pci_enable_device_hook()
86 static void cxl_afu_configured_put(struct cxl_afu *afu) in cxl_afu_configured_put() argument
88 atomic_dec_if_positive(&afu->configured_state); in cxl_afu_configured_put()
91 static bool cxl_afu_configured_get(struct cxl_afu *afu) in cxl_afu_configured_get() argument
93 return atomic_inc_unless_negative(&afu->configured_state); in cxl_afu_configured_get()
97 struct cxl_afu *afu, int *_record) in cxl_pcie_config_info() argument
102 if (record > afu->crs_num) in cxl_pcie_config_info()
113 struct cxl_afu *afu; in cxl_pcie_read_config() local
118 afu = pci_bus_to_afu(bus); in cxl_pcie_read_config()
120 if (afu == NULL || !cxl_afu_configured_get(afu)) in cxl_pcie_read_config()
123 rc = cxl_pcie_config_info(bus, devfn, afu, &record); in cxl_pcie_read_config()
129 rc = cxl_ops->afu_cr_read8(afu, record, offset, &val8); in cxl_pcie_read_config()
133 rc = cxl_ops->afu_cr_read16(afu, record, offset, &val16); in cxl_pcie_read_config()
137 rc = cxl_ops->afu_cr_read32(afu, record, offset, &val32); in cxl_pcie_read_config()
145 cxl_afu_configured_put(afu); in cxl_pcie_read_config()
153 struct cxl_afu *afu; in cxl_pcie_write_config() local
155 afu = pci_bus_to_afu(bus); in cxl_pcie_write_config()
157 if (afu == NULL || !cxl_afu_configured_get(afu)) in cxl_pcie_write_config()
160 rc = cxl_pcie_config_info(bus, devfn, afu, &record); in cxl_pcie_write_config()
166 rc = cxl_ops->afu_cr_write8(afu, record, offset, val & 0xff); in cxl_pcie_write_config()
169 rc = cxl_ops->afu_cr_write16(afu, record, offset, val & 0xffff); in cxl_pcie_write_config()
172 rc = cxl_ops->afu_cr_write32(afu, record, offset, val); in cxl_pcie_write_config()
179 cxl_afu_configured_put(afu); in cxl_pcie_write_config()
203 int cxl_pci_vphb_add(struct cxl_afu *afu) in cxl_pci_vphb_add() argument
217 if (!afu->crs_num) in cxl_pci_vphb_add()
227 parent = afu->adapter->dev.parent; in cxl_pci_vphb_add()
242 phb->private_data = afu; in cxl_pci_vphb_add()
264 afu->phb = phb; in cxl_pci_vphb_add()
269 void cxl_pci_vphb_remove(struct cxl_afu *afu) in cxl_pci_vphb_remove() argument
274 if (!afu || !afu->phb) in cxl_pci_vphb_remove()
277 phb = afu->phb; in cxl_pci_vphb_remove()
278 afu->phb = NULL; in cxl_pci_vphb_remove()