linux-stable/arch/powerpc
Oliver O'Halloran 84d8cc0767 powerpc/powernv/pci: Add device to iommu group during dma_dev_setup()
Historically adding devices to their respective iommu group has been
handled by the post-init phb fixup for most devices. This was done
because:

1) The IOMMU group is tied to the PE (usually) so we can only setup the
   iommu groups after we've done resource allocation since BAR location
   determines the device's PE, and:
2) The sysfs directory for the pci_dev needs to be available since
   iommu_add_device() wants to add an attribute for the iommu group.

However, since commit 30d87ef8b3 ("powerpc/pci: Fix
pcibios_setup_device() ordering") both conditions are met when
hose->ops->dma_dev_setup() is called so there's no real need to do
this in the fixup.

Moving the call to iommu_add_device() into pnv_pci_ioda_dma_setup_dev()
is a nice cleanup since it puts all the per-device IOMMU setup into one
place. It also results in all (non-nvlink) devices getting their iommu
group via a common path rather than relying on the bus notifier hack
in pnv_tce_iommu_bus_notifier() to handle the adding VFs and
hotplugged devices to their group.

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-5-oohall@gmail.com
2020-05-28 23:24:38 +10:00
..
boot powerpc/40x: Remove EP405 2020-05-28 23:24:35 +10:00
configs powerpc/40x: Remove EP405 2020-05-28 23:24:35 +10:00
crypto crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
include powerpc/64s/kuap: Conditionally restore AMR in kuap_restore_amr asm 2020-05-28 23:24:37 +10:00
kernel powerpc/64s/kuap: Conditionally restore AMR in kuap_restore_amr asm 2020-05-28 23:24:37 +10:00
kexec powerpc updates for 5.7 2020-04-05 11:12:59 -07:00
kvm Merge branch 'topic/ppc-kvm' into next 2020-05-20 23:38:13 +10:00
lib powerpc: Add ppc_inst_as_u64() 2020-05-26 23:36:57 +10:00
math-emu
mm powerpc/40x: Rework 40x PTE access and TLB miss 2020-05-28 23:24:34 +10:00
net treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
oprofile powerpc updates for 5.6 2020-02-04 13:06:46 +00:00
perf powerpc/8xx: Remove now unused TLB miss functions 2020-05-26 22:22:22 +10:00
platforms powerpc/powernv/pci: Add device to iommu group during dma_dev_setup() 2020-05-28 23:24:38 +10:00
purgatory .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
sysdev powerpc: Remove Xilinx PPC405/PPC440 support 2020-05-28 23:24:34 +10:00
tools powerpc/head_check: Avoid broken pipe 2020-05-19 00:10:35 +10:00
xmon powerpc: Add ppc_inst_next() 2020-05-26 23:36:51 +10:00
Kbuild
Kconfig Merge branch 'fixes' into next 2020-05-26 22:56:03 +10:00
Kconfig.debug powerpc: Remove Xilinx PPC405/PPC440 support 2020-05-28 23:24:34 +10:00
Makefile powerpc: Suppress .eh_frame generation 2020-04-01 14:30:51 +11:00
Makefile.postlink powerpc: Do not consider weak unresolved symbol relocations as bad 2020-01-31 20:17:22 +11:00