Skip to content

Commit e9bc03f

Browse files
Gavin Shanozbenh
authored andcommitted
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>
1 parent 65fd766 commit e9bc03f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/powerpc/platforms/powernv/pci-ioda.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ static void pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb,
672672
TCE_PCI_SWINV_PAIR);
673673
}
674674
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);
676676

677677
if (pe->pdev)
678678
set_iommu_table_base_and_group(&pe->pdev->dev, tbl);
@@ -800,7 +800,7 @@ static void pnv_pci_ioda2_setup_dma_pe(struct pnv_phb *phb,
800800
tbl->it_type |= (TCE_PCI_SWINV_CREATE | TCE_PCI_SWINV_FREE);
801801
}
802802
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);
804804

805805
if (pe->pdev)
806806
set_iommu_table_base_and_group(&pe->pdev->dev, tbl);

0 commit comments

Comments
 (0)