Lines Matching refs:num_vfs

861 	u16 num_vfs;  in pnv_pci_vf_resource_shift()  local
874 num_vfs = pdn->num_vfs; in pnv_pci_vf_resource_shift()
892 res2.end = res2.start + (size * num_vfs) - 1; in pnv_pci_vf_resource_shift()
896 i, &res2, res, num_vfs, offset); in pnv_pci_vf_resource_shift()
920 num_vfs, offset); in pnv_pci_vf_resource_shift()
1153 static int pnv_pci_vf_assign_m64(struct pci_dev *pdev, u16 num_vfs) in pnv_pci_vf_assign_m64() argument
1181 vf_groups = (num_vfs <= M64_PER_IOV) ? num_vfs: M64_PER_IOV; in pnv_pci_vf_assign_m64()
1182 vf_per_group = (num_vfs <= M64_PER_IOV)? 1: in pnv_pci_vf_assign_m64()
1183 roundup_pow_of_two(num_vfs) / pdn->m64_per_iov; in pnv_pci_vf_assign_m64()
1284 static void pnv_ioda_release_vf_PE(struct pci_dev *pdev, u16 num_vfs) in pnv_ioda_release_vf_PE() argument
1302 if (pdn->m64_per_iov == M64_PER_IOV && num_vfs > M64_PER_IOV) { in pnv_ioda_release_vf_PE()
1307 vf_per_group = roundup_pow_of_two(num_vfs) / pdn->m64_per_iov; in pnv_ioda_release_vf_PE()
1312 vf_index < num_vfs; in pnv_ioda_release_vf_PE()
1316 vf_index1 < num_vfs; in pnv_ioda_release_vf_PE()
1355 u16 num_vfs; in pnv_pci_sriov_disable() local
1362 num_vfs = pdn->num_vfs; in pnv_pci_sriov_disable()
1365 pnv_ioda_release_vf_PE(pdev, num_vfs); in pnv_pci_sriov_disable()
1375 bitmap_clear(phb->ioda.pe_alloc, pdn->offset, num_vfs); in pnv_pci_sriov_disable()
1382 static void pnv_ioda_setup_vf_PE(struct pci_dev *pdev, u16 num_vfs) in pnv_ioda_setup_vf_PE() argument
1402 for (vf_index = 0; vf_index < num_vfs; vf_index++) { in pnv_ioda_setup_vf_PE()
1437 if (pdn->m64_per_iov == M64_PER_IOV && num_vfs > M64_PER_IOV) { in pnv_ioda_setup_vf_PE()
1442 vf_per_group = roundup_pow_of_two(num_vfs) / pdn->m64_per_iov; in pnv_ioda_setup_vf_PE()
1447 vf_index < num_vfs; in pnv_ioda_setup_vf_PE()
1451 vf_index1 < num_vfs; in pnv_ioda_setup_vf_PE()
1469 int pnv_pci_sriov_enable(struct pci_dev *pdev, u16 num_vfs) in pnv_pci_sriov_enable() argument
1487 0, num_vfs, 0); in pnv_pci_sriov_enable()
1490 dev_info(&pdev->dev, "Failed to enable VF%d\n", num_vfs); in pnv_pci_sriov_enable()
1494 bitmap_set(phb->ioda.pe_alloc, pdn->offset, num_vfs); in pnv_pci_sriov_enable()
1495 pdn->num_vfs = num_vfs; in pnv_pci_sriov_enable()
1499 ret = pnv_pci_vf_assign_m64(pdev, num_vfs); in pnv_pci_sriov_enable()
1518 pnv_ioda_setup_vf_PE(pdev, num_vfs); in pnv_pci_sriov_enable()
1523 bitmap_clear(phb->ioda.pe_alloc, pdn->offset, num_vfs); in pnv_pci_sriov_enable()
1538 int pcibios_sriov_enable(struct pci_dev *pdev, u16 num_vfs) in pcibios_sriov_enable() argument
1543 pnv_pci_sriov_enable(pdev, num_vfs); in pcibios_sriov_enable()