Lines Matching refs:afu

70 			struct cxl_afu *afu)  in read_phys_addr()  argument
88 afu->guest->handle = addr; in read_phys_addr()
91 afu->guest->p2n_phys += addr; in read_phys_addr()
92 afu->guest->p2n_size = size; in read_phys_addr()
95 afu->psn_phys += addr; in read_phys_addr()
96 afu->adapter->ps_size = size; in read_phys_addr()
111 static int read_vpd(struct cxl *adapter, struct cxl_afu *afu) in read_vpd() argument
122 rc = cxl_guest_read_afu_vpd(afu, vpd, len); in read_vpd()
131 int cxl_of_read_afu_handle(struct cxl_afu *afu, struct device_node *afu_np) in cxl_of_read_afu_handle() argument
133 if (read_handle(afu_np, &afu->guest->handle)) in cxl_of_read_afu_handle()
135 pr_devel("AFU handle: 0x%.16llx\n", afu->guest->handle); in cxl_of_read_afu_handle()
140 int cxl_of_read_afu_properties(struct cxl_afu *afu, struct device_node *np) in cxl_of_read_afu_properties() argument
163 rc = read_phys_addr(np, "reg", afu); in cxl_of_read_afu_properties()
167 rc = read_phys_addr(np, "assigned-addresses", afu); in cxl_of_read_afu_properties()
171 if (afu->psn_phys == 0) in cxl_of_read_afu_properties()
172 afu->psa = false; in cxl_of_read_afu_properties()
174 afu->psa = true; in cxl_of_read_afu_properties()
181 read_prop_dword(np, "ibm,#processes", &afu->max_procs_virtualised); in cxl_of_read_afu_properties()
187 read_vpd(NULL, afu); in cxl_of_read_afu_properties()
190 read_prop_dword(np, "ibm,max-ints-per-process", &afu->guest->max_ints); in cxl_of_read_afu_properties()
191 afu->irqs_max = afu->guest->max_ints; in cxl_of_read_afu_properties()
193 prop = read_prop_dword(np, "ibm,min-ints-per-process", &afu->pp_irqs); in cxl_of_read_afu_properties()
199 afu->pp_irqs--; in cxl_of_read_afu_properties()
207 read_prop64_dword(np, "ibm,error-buffer-size", &afu->eb_len); in cxl_of_read_afu_properties()
208 afu->eb_offset = 0; in cxl_of_read_afu_properties()
213 read_prop64_dword(np, "ibm,config-record-size", &afu->crs_len); in cxl_of_read_afu_properties()
214 afu->crs_offset = 0; in cxl_of_read_afu_properties()
216 read_prop_dword(np, "ibm,#config-records", &afu->crs_num); in cxl_of_read_afu_properties()
219 for (i = 0; i < afu->crs_num; i++) { in cxl_of_read_afu_properties()
220 rc = cxl_ops->afu_cr_read16(afu, i, PCI_DEVICE_ID, in cxl_of_read_afu_properties()
225 rc = cxl_ops->afu_cr_read16(afu, i, PCI_VENDOR_ID, in cxl_of_read_afu_properties()
230 rc = cxl_ops->afu_cr_read32(afu, i, PCI_CLASS_REVISION, in cxl_of_read_afu_properties()
255 afu->pp_psa = true; in cxl_of_read_afu_properties()
257 afu->pp_psa = false; in cxl_of_read_afu_properties()
267 afu->serr_hwirq = val; in cxl_of_read_afu_properties()
269 pr_devel("AFU handle: %#llx\n", afu->guest->handle); in cxl_of_read_afu_properties()
271 afu->guest->p2n_phys, afu->guest->p2n_size); in cxl_of_read_afu_properties()
273 afu->psn_phys, afu->adapter->ps_size); in cxl_of_read_afu_properties()
275 afu->max_procs_virtualised); in cxl_of_read_afu_properties()
276 pr_devel("Per-process irqs min=%i, max=%i\n", afu->pp_irqs, in cxl_of_read_afu_properties()
277 afu->irqs_max); in cxl_of_read_afu_properties()
278 pr_devel("Slice error interrupt=%#lx\n", afu->serr_hwirq); in cxl_of_read_afu_properties()
438 int afu; in cxl_of_remove() local
441 for (afu = 0; afu < adapter->slices; afu++) in cxl_of_remove()
442 cxl_guest_remove_afu(adapter->afu[afu]); in cxl_of_remove()