Skip to content

Commit c409c63

Browse files
aikmpe
authored andcommitted
powerpc/pseries: Remove IOMMU API support for non-LPAR systems
The pci_dma_bus_setup_pSeries and pci_dma_dev_setup_pSeries hooks are registered for the pseries platform which does not have FW_FEATURE_LPAR; these would be pre-powernv platforms which we never supported PCI pass through for anyway so remove it. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 3be2df0 commit c409c63

File tree

1 file changed

+2
-7
lines changed
  • arch/powerpc/platforms/pseries

1 file changed

+2
-7
lines changed

arch/powerpc/platforms/pseries/iommu.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,6 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus)
645645
iommu_table_setparms(pci->phb, dn, tbl);
646646
tbl->it_ops = &iommu_table_pseries_ops;
647647
iommu_init_table(tbl, pci->phb->node);
648-
iommu_register_group(pci->table_group, pci_domain_nr(bus), 0);
649648

650649
/* Divide the rest (1.75GB) among the children */
651650
pci->phb->dma_window_size = 0x80000000ul;
@@ -756,10 +755,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
756755
iommu_table_setparms(phb, dn, tbl);
757756
tbl->it_ops = &iommu_table_pseries_ops;
758757
iommu_init_table(tbl, phb->node);
759-
iommu_register_group(PCI_DN(dn)->table_group,
760-
pci_domain_nr(phb->bus), 0);
761758
set_iommu_table_base(&dev->dev, tbl);
762-
iommu_add_device(&dev->dev);
763759
return;
764760
}
765761

@@ -770,11 +766,10 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
770766
while (dn && PCI_DN(dn) && PCI_DN(dn)->table_group == NULL)
771767
dn = dn->parent;
772768

773-
if (dn && PCI_DN(dn)) {
769+
if (dn && PCI_DN(dn))
774770
set_iommu_table_base(&dev->dev,
775771
PCI_DN(dn)->table_group->tables[0]);
776-
iommu_add_device(&dev->dev);
777-
} else
772+
else
778773
printk(KERN_WARNING "iommu: Device %s has no iommu table\n",
779774
pci_name(dev));
780775
}

0 commit comments

Comments
 (0)