]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv/pci: Register iommu group at PE DMA setup
authorOliver O'Halloran <oohall@gmail.com>
Mon, 6 Apr 2020 03:07:41 +0000 (13:07 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 28 May 2020 13:24:37 +0000 (23:24 +1000)
commit45e1291ad06df9164f3f273f97e77e19f9335b17
tree234d680137ef4447bd3ebfc84f6506455ca1e335
parent29adab208a3ae22b1b3fcde2267c313b5b434633
powerpc/powernv/pci: Register iommu group at PE DMA setup

Move the registration of IOMMU groups out of the post-phb init fixup and
into when we configure DMA for a PE. For most devices this doesn't
result in any functional changes, but for NVLink attached GPUs it
requires a bit of care. When the GPU is probed an IOMMU group would be
created for the PE that contains it. We need to ensure that group is
removed before we add the PE to the compound group that's used to keep
the translations see by the PCIe and NVLink buses the same.

No functional changes. Probably.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200406030745.24595-4-oohall@gmail.com
arch/powerpc/platforms/powernv/npu-dma.c
arch/powerpc/platforms/powernv/pci-ioda.c