Lines Matching refs:afu

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