powerpc fixes for 4.8 #7
- powernv/pci: Fix m64 checks for SR-IOV and window alignment from Russell Currey -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJX50CvAAoJEFHr6jzI4aWAqJAP/0/0D8YGwOuIoYD2GmfoasKR TFbbuhX3xnfdiRG6w/sFBI3oh7icCw7hC+Qj1lNu9D3L/UkxOTBny+W07KvWzX44 Yu74nEHgq3mVrRAU4McztbKIUBK2zagGwwCcGZXZl/uQI1ylvmmpcH3xClQzF+oA xKk8eB1OW2Ay6+y+FkSuyBHHSfww6QCk7ERPqaStCW9Uy+dDBjIwStLQuOpAhN/o Z9K+JwpPJ8qgw1Pe9pvrD5MjcM0hR+tUZm6LklZCCk89feqlwcrz9cpOrmTdGuF+ n1iacpDaFf6IOlhI+6ImrT15llTgSk/nu9GNIRFDwOjVCuGy5aDQBtWuRFiVNggp vkZWFSl594Jn5H9/s6MpMXygSl36NMKgM/ZKvUsEAe6mF0Kb9pZRB7b/aV+ajkCQ rkQCe0KKSF6+D3wu3SmMe0NTc3/GkgxZN0lTnqUaB5PSRqwvVwurXugnAKr7arhj JSu9/QSeOxNI5ytDF1Nf9/RN0DT+L1w0vun083DupyJkG1hrjzm9kI0lACQTr/QX TxAWXGjiTsUOeM4pfNzqaJE4fNUc0TIc41jgWMx9qXzbKjhijgKEPtmyDMz93GVY hFXyRAMsWUOsQGP5tiLFYG0PkNsmCDIwca+yg47EicBQGTpEsGLYUBRvIILYNBKI ULl0yMLZWekl1rzthDdB =35xQ -----END PGP SIGNATURE----- Merge tag 'powerpc-4.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull one more powerpc fix from Michael Ellerman: "powernv/pci: Fix m64 checks for SR-IOV and window alignment from Russell Currey" * tag 'powerpc-4.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/powernv/pci: Fix m64 checks for SR-IOV and window alignment
This commit is contained in:
commit
751b9a5d16
1 changed files with 9 additions and 2 deletions
|
@ -124,6 +124,13 @@ static inline bool pnv_pci_is_m64(struct pnv_phb *phb, struct resource *r)
|
||||||
r->start < (phb->ioda.m64_base + phb->ioda.m64_size));
|
r->start < (phb->ioda.m64_base + phb->ioda.m64_size));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool pnv_pci_is_m64_flags(unsigned long resource_flags)
|
||||||
|
{
|
||||||
|
unsigned long flags = (IORESOURCE_MEM_64 | IORESOURCE_PREFETCH);
|
||||||
|
|
||||||
|
return (resource_flags & flags) == flags;
|
||||||
|
}
|
||||||
|
|
||||||
static struct pnv_ioda_pe *pnv_ioda_init_pe(struct pnv_phb *phb, int pe_no)
|
static struct pnv_ioda_pe *pnv_ioda_init_pe(struct pnv_phb *phb, int pe_no)
|
||||||
{
|
{
|
||||||
phb->ioda.pe_array[pe_no].phb = phb;
|
phb->ioda.pe_array[pe_no].phb = phb;
|
||||||
|
@ -2871,7 +2878,7 @@ static void pnv_pci_ioda_fixup_iov_resources(struct pci_dev *pdev)
|
||||||
res = &pdev->resource[i + PCI_IOV_RESOURCES];
|
res = &pdev->resource[i + PCI_IOV_RESOURCES];
|
||||||
if (!res->flags || res->parent)
|
if (!res->flags || res->parent)
|
||||||
continue;
|
continue;
|
||||||
if (!pnv_pci_is_m64(phb, res)) {
|
if (!pnv_pci_is_m64_flags(res->flags)) {
|
||||||
dev_warn(&pdev->dev, "Don't support SR-IOV with"
|
dev_warn(&pdev->dev, "Don't support SR-IOV with"
|
||||||
" non M64 VF BAR%d: %pR. \n",
|
" non M64 VF BAR%d: %pR. \n",
|
||||||
i, res);
|
i, res);
|
||||||
|
@ -3096,7 +3103,7 @@ static resource_size_t pnv_pci_window_alignment(struct pci_bus *bus,
|
||||||
* alignment for any 64-bit resource, PCIe doesn't care and
|
* alignment for any 64-bit resource, PCIe doesn't care and
|
||||||
* bridges only do 64-bit prefetchable anyway.
|
* bridges only do 64-bit prefetchable anyway.
|
||||||
*/
|
*/
|
||||||
if (phb->ioda.m64_segsize && (type & IORESOURCE_MEM_64))
|
if (phb->ioda.m64_segsize && pnv_pci_is_m64_flags(type))
|
||||||
return phb->ioda.m64_segsize;
|
return phb->ioda.m64_segsize;
|
||||||
if (type & IORESOURCE_MEM)
|
if (type & IORESOURCE_MEM)
|
||||||
return phb->ioda.m32_segsize;
|
return phb->ioda.m32_segsize;
|
||||||
|
|
Loading…
Reference in a new issue