mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
PCI: Add pcibios_iov_resource_alignment() interface
Per the SR-IOV spec r1.1, sec 3.3.14, the required alignment of a PF's IOV BAR is the size of an individual VF BAR, and the size consumed is the individual VF BAR size times NumVFs. The PowerNV platform has additional alignment requirements to help support its Partitionable Endpoint device isolation feature (see Documentation/powerpc/pci_iov_resource_on_powernv.txt). Add a pcibios_iov_resource_alignment() interface to allow platforms to request additional alignment. [bhelgaas: changelog, adapt to reworked pci_sriov_resource_alignment(), drop "align" parameter] Signed-off-by: Wei Yang <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
This commit is contained in:
parent
995df527f3
commit
978d2d6831
2 changed files with 8 additions and 1 deletions
|
|
@ -569,6 +569,12 @@ int pci_iov_resource_bar(struct pci_dev *dev, int resno)
|
|||
4 * (resno - PCI_IOV_RESOURCES);
|
||||
}
|
||||
|
||||
resource_size_t __weak pcibios_iov_resource_alignment(struct pci_dev *dev,
|
||||
int resno)
|
||||
{
|
||||
return pci_iov_resource_size(dev, resno);
|
||||
}
|
||||
|
||||
/**
|
||||
* pci_sriov_resource_alignment - get resource alignment for VF BAR
|
||||
* @dev: the PCI device
|
||||
|
|
@ -581,7 +587,7 @@ int pci_iov_resource_bar(struct pci_dev *dev, int resno)
|
|||
*/
|
||||
resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev, int resno)
|
||||
{
|
||||
return pci_iov_resource_size(dev, resno);
|
||||
return pcibios_iov_resource_alignment(dev, resno);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue