powerpc/powernv/pci: Always tear down DMA windows on PE release
authorOliver O'Halloran <oohall@gmail.com>
Wed, 22 Jul 2020 06:57:01 +0000 (16:57 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 26 Jul 2020 13:34:21 +0000 (23:34 +1000)
commit7a52ffabe867c0d93e47af113e5107340974047a
treef79a314ef6297966c655e76f2d5b5efd94184098
parent5609ffddd19dd52019d78b197e86b0331aeef8ae
powerpc/powernv/pci: Always tear down DMA windows on PE release

Currently we have these two functions:

pnv_pci_ioda2_release_dma_pe(), and
pnv_pci_ioda2_release_pe_dma()

The first is used when tearing down VF PEs and the other is used for normal
devices. There's very little difference between the two though. The latter
(non-VF) will skip a call to pnv_pci_ioda2_unset_window() unless
CONFIG_IOMMU_API=y is set. There's no real point in doing this so fold the
two together.

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/20200722065715.1432738-2-oohall@gmail.com
arch/powerpc/platforms/powernv/pci-ioda.c