Commit e9bc03fe2274bfdac8870025f81571ebfbc92c78
Committed by
Benjamin Herrenschmidt
1 parent
65fd766b99
powerpc/powernv: Don't use pe->pbus to get the domain number
If the PE contains single PCI function, "pe->pbus" would be NULL. It's not reliable to be used by pci_domain_nr(). We just grab the PCI domain number from the PCI host controller (struct pci_controller) instance. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
arch/powerpc/platforms/powernv/pci-ioda.c
... | ... | @@ -672,7 +672,7 @@ |
672 | 672 | TCE_PCI_SWINV_PAIR); |
673 | 673 | } |
674 | 674 | iommu_init_table(tbl, phb->hose->node); |
675 | - iommu_register_group(tbl, pci_domain_nr(pe->pbus), pe->pe_number); | |
675 | + iommu_register_group(tbl, phb->hose->global_number, pe->pe_number); | |
676 | 676 | |
677 | 677 | if (pe->pdev) |
678 | 678 | set_iommu_table_base_and_group(&pe->pdev->dev, tbl); |
... | ... | @@ -800,7 +800,7 @@ |
800 | 800 | tbl->it_type |= (TCE_PCI_SWINV_CREATE | TCE_PCI_SWINV_FREE); |
801 | 801 | } |
802 | 802 | iommu_init_table(tbl, phb->hose->node); |
803 | - iommu_register_group(tbl, pci_domain_nr(pe->pbus), pe->pe_number); | |
803 | + iommu_register_group(tbl, phb->hose->global_number, pe->pe_number); | |
804 | 804 | |
805 | 805 | if (pe->pdev) |
806 | 806 | set_iommu_table_base_and_group(&pe->pdev->dev, tbl); |