Lines Matching refs:iov

152 	struct pnv_iov_data *iov;  in pnv_pci_ioda_fixup_iov_resources()  local
155 iov = kzalloc(sizeof(*iov), GFP_KERNEL); in pnv_pci_ioda_fixup_iov_resources()
156 if (!iov) in pnv_pci_ioda_fixup_iov_resources()
158 pdev->dev.archdata.iov_data = iov; in pnv_pci_ioda_fixup_iov_resources()
197 iov->m64_single_mode[i] = true; in pnv_pci_ioda_fixup_iov_resources()
212 iov->need_shift = true; in pnv_pci_ioda_fixup_iov_resources()
226 kfree(iov); in pnv_pci_ioda_fixup_iov_resources()
258 struct pnv_iov_data *iov = pnv_iov_get(pdev); in pnv_pci_iov_resource_alignment() local
266 if (!iov) in pnv_pci_iov_resource_alignment()
274 if (iov->m64_single_mode[resno - PCI_IOV_RESOURCES]) in pnv_pci_iov_resource_alignment()
292 struct pnv_iov_data *iov; in pnv_pci_vf_release_m64() local
297 iov = pnv_iov_get(pdev); in pnv_pci_vf_release_m64()
299 for_each_set_bit(window_id, iov->used_m64_bar_mask, MAX_M64_BARS) { in pnv_pci_vf_release_m64()
404 static int pnv_pci_alloc_m64_bar(struct pnv_phb *phb, struct pnv_iov_data *iov) in pnv_pci_alloc_m64_bar() argument
416 set_bit(win, iov->used_m64_bar_mask); in pnv_pci_alloc_m64_bar()
423 struct pnv_iov_data *iov; in pnv_pci_vf_assign_m64() local
433 iov = pnv_iov_get(pdev); in pnv_pci_vf_assign_m64()
441 if (!iov->m64_single_mode[i]) { in pnv_pci_vf_assign_m64()
442 win = pnv_pci_alloc_m64_bar(phb, iov); in pnv_pci_vf_assign_m64()
458 base_pe_num = iov->vf_pe_arr[0].pe_number; in pnv_pci_vf_assign_m64()
461 win = pnv_pci_alloc_m64_bar(phb, iov); in pnv_pci_vf_assign_m64()
512 struct pnv_iov_data *iov; in pnv_pci_vf_resource_shift() local
519 iov = pnv_iov_get(dev); in pnv_pci_vf_resource_shift()
529 num_vfs = iov->num_vfs; in pnv_pci_vf_resource_shift()
534 if (iov->m64_single_mode[i]) in pnv_pci_vf_resource_shift()
567 if (iov->m64_single_mode[i]) in pnv_pci_vf_resource_shift()
579 devm_release_resource(&dev->dev, &iov->holes[i]); in pnv_pci_vf_resource_shift()
580 memset(&iov->holes[i], 0, sizeof(iov->holes[i])); in pnv_pci_vf_resource_shift()
586 iov->holes[i].start = res2.start; in pnv_pci_vf_resource_shift()
587 iov->holes[i].end = res2.start + size * offset - 1; in pnv_pci_vf_resource_shift()
588 iov->holes[i].flags = IORESOURCE_BUS; in pnv_pci_vf_resource_shift()
589 iov->holes[i].name = "pnv_iov_reserved"; in pnv_pci_vf_resource_shift()
591 &iov->holes[i]); in pnv_pci_vf_resource_shift()
600 struct pnv_iov_data *iov; in pnv_pci_sriov_disable() local
602 iov = pnv_iov_get(pdev); in pnv_pci_sriov_disable()
603 num_vfs = iov->num_vfs; in pnv_pci_sriov_disable()
604 base_pe = iov->vf_pe_arr[0].pe_number; in pnv_pci_sriov_disable()
606 if (WARN_ON(!iov)) in pnv_pci_sriov_disable()
613 if (iov->need_shift) in pnv_pci_sriov_disable()
626 struct pnv_iov_data *iov; in pnv_ioda_setup_vf_PE() local
634 iov = pnv_iov_get(pdev); in pnv_ioda_setup_vf_PE()
642 pe = &iov->vf_pe_arr[vf_index]; in pnv_ioda_setup_vf_PE()
683 struct pnv_iov_data *iov; in pnv_pci_sriov_enable() local
689 iov = pnv_iov_get(pdev); in pnv_pci_sriov_enable()
703 if (!iov) { in pnv_pci_sriov_enable()
715 iov->vf_pe_arr = base_pe; in pnv_pci_sriov_enable()
716 iov->num_vfs = num_vfs; in pnv_pci_sriov_enable()
730 if (iov->need_shift) { in pnv_pci_sriov_enable()
746 pnv_ioda_free_pe(&iov->vf_pe_arr[i]); in pnv_pci_sriov_enable()