powerpc/eeh/ioda2: Use device::iommu_group to check IOMMU group
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Fri, 5 Jun 2015 06:34:53 +0000 (16:34 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 11 Jun 2015 05:14:54 +0000 (15:14 +1000)
commitea30e99e8eccb684490f40d011ea534ecd937e98
tree4d578185e3d2f964fc516918f6c588be7ec6a70e
parent1cbb4a1c433a1ca054ef5363f4e6597b43d208cc
powerpc/eeh/ioda2: Use device::iommu_group to check IOMMU group

This relies on the fact that a PCI device always has an IOMMU table
which may not be the case when we get dynamic DMA windows so
let's use more reliable check for IOMMU group here.

As we do not rely on the table presence here, remove the workaround
from pnv_pci_ioda2_set_bypass(); also remove the @add_to_iommu_group
parameter from pnv_ioda_setup_bus_dma().

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/eeh.c
arch/powerpc/platforms/powernv/pci-ioda.c