linux/arch/powerpc/platforms
Alexey Kardashevskiy 0bd971676e powerpc/powernv/npu: Add compound IOMMU groups
At the moment the powernv platform registers an IOMMU group for each
PE. There is an exception though: an NVLink bridge which is attached
to the corresponding GPU's IOMMU group making it a master.

Now we have POWER9 systems with GPUs connected to each other directly
bypassing PCI. At the moment we do not control state of these links so
we have to put such interconnected GPUs to one IOMMU group which means
that the old scheme with one GPU as a master won't work - there will
be up to 3 GPUs in such group.

This introduces a npu_comp struct which represents a compound IOMMU
group made of multiple PEs - PCI PEs (for GPUs) and NPU PEs (for
NVLink bridges). This converts the existing NVLink1 code to use the
new scheme. >From now on, each PE must have a valid
iommu_table_group_ops which will either be called directly (for a
single PE group) or indirectly from a compound group handlers.

This moves IOMMU group registration for NVLink-connected GPUs to
npu-dma.c. For POWER8, this stores a new compound group pointer in the
PE (so a GPU is still a master); for POWER9 the new group pointer is
stored in an NPU (which is allocated per a PCI host controller).

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
[mpe: Initialise npdev to NULL in pnv_try_setup_npu_table_group()]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-12-21 16:20:46 +11:00
..
4xx powerpc/4xx: Delete an unnecessary return statement in two functions 2018-12-21 11:32:49 +11:00
8xx powerpc updates for 4.20 2018-10-26 14:36:21 -07:00
40x powerpc: PCI_MSI needs PCI 2018-11-02 00:15:25 +09:00
44x powerpc/dma: split the two __dma_alloc_coherent implementations 2018-12-20 22:21:20 +11:00
52xx powerpc/kconfig: remove CONFIG_6xx 2018-11-26 22:33:37 +11:00
82xx powerpc/kconfig: remove CONFIG_6xx 2018-11-26 22:33:37 +11:00
83xx powerpc/kconfig: remove CONFIG_6xx 2018-11-26 22:33:37 +11:00
85xx powerpc: use mm zones more sensibly 2018-12-20 22:21:20 +11:00
86xx powerpc/smp: Use code patching to restore reset vector 2018-12-19 18:56:32 +11:00
512x powerpc/kconfig: remove CONFIG_6xx 2018-11-26 22:33:37 +11:00
amigaone powerpc/kconfig: remove CONFIG_6xx 2018-11-26 22:33:37 +11:00
cell powerpc: generate uapi header and system call table files 2018-12-21 14:46:50 +11:00
chrp powerpc/kconfig: remove CONFIG_6xx 2018-11-26 22:33:37 +11:00
embedded6xx powerpc/kconfig: remove CONFIG_6xx 2018-11-26 22:33:37 +11:00
maple powerpc: Use device_type helpers to access the node type 2018-11-26 22:33:37 +11:00
pasemi powerpc/pasemi: Add Nemo board IRQ initroutine 2018-12-20 22:21:20 +11:00
powermac powerpc/smp: Use code patching to restore reset vector 2018-12-19 18:56:32 +11:00
powernv powerpc/powernv/npu: Add compound IOMMU groups 2018-12-21 16:20:46 +11:00
ps3 mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
pseries powerpc/powernv/pseries: Rework device adding to IOMMU groups 2018-12-21 16:20:46 +11:00
fsl_uli1575.c
Kconfig powerpc/kconfig: remove CONFIG_6xx 2018-11-26 22:33:37 +11:00
Kconfig.cputype powerpc: allow NOT_COHERENT_CACHE for amigaone 2018-12-20 22:21:20 +11:00
Makefile powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00