linux-stable/arch/powerpc
Alexey Kardashevskiy b348aa6529 powerpc/spapr: vfio: Replace iommu_table with iommu_table_group
Modern IBM POWERPC systems support multiple (currently two) TCE tables
per IOMMU group (a.k.a. PE). This adds a iommu_table_group container
for TCE tables. Right now just one table is supported.

This defines iommu_table_group struct which stores pointers to
iommu_group and iommu_table(s). This replaces iommu_table with
iommu_table_group where iommu_table was used to identify a group:
- iommu_register_group();
- iommudata of generic iommu_group;

This removes @data from iommu_table as it_table_group provides
same access to pnv_ioda_pe.

For IODA, instead of embedding iommu_table, the new iommu_table_group
keeps pointers to those. The iommu_table structs are allocated
dynamically.

For P5IOC2, both iommu_table_group and iommu_table are embedded into
PE struct. As there is no EEH and SRIOV support for P5IOC2,
iommu_free_table() should not be called on iommu_table struct pointers
so we can keep it embedded in pnv_phb::p5ioc2.

For pSeries, this replaces multiple calls of kzalloc_node() with a new
iommu_pseries_alloc_group() helper and stores the table group struct
pointer into the pci_dn struct. For release, a iommu_table_free_group()
helper is added.

This moves iommu_table struct allocation from SR-IOV code to
the generic DMA initialization code in pnv_pci_ioda_setup_dma_pe and
pnv_pci_ioda2_setup_dma_pe as this is where DMA is actually initialized.
This change is here because those lines had to be changed anyway.

This should cause no behavioural change.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
[aw: for the vfio related changes]
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-06-11 15:14:57 +10:00
..
boot powerpc: Remove the celleb support 2015-04-07 17:15:13 +10:00
configs powerpc/config: Enable bnx2x on ppc64 and pseries defconfigs 2015-06-04 22:33:27 +10:00
crypto crypto: powerpc - move files to fix build error 2015-03-09 21:06:19 +11:00
include powerpc/spapr: vfio: Replace iommu_table with iommu_table_group 2015-06-11 15:14:57 +10:00
kernel powerpc/spapr: vfio: Replace iommu_table with iommu_table_group 2015-06-11 15:14:57 +10:00
kvm powerpc/kernel: Rename PACA_DSCR to PACA_DSCR_DEFAULT 2015-06-07 19:29:00 +10:00
lib powerpc: Export __spin_yield 2015-04-21 15:21:28 +02:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc/mm: Add trace point for tracking hash pte fault 2015-06-10 14:06:29 +10:00
net ppc: bpf: Add SKF_AD_CPU for ppc32 2015-02-20 15:19:43 -05:00
oprofile powerpc/oprofile: reduce mmap_sem hold for exe_file 2015-04-17 09:04:11 -04:00
perf powerpc/perf: Fix book3s kernel to userspace backtraces 2015-06-02 13:26:38 +10:00
platforms powerpc/spapr: vfio: Replace iommu_table with iommu_table_group 2015-06-11 15:14:57 +10:00
sysdev powerpc/iommu: Move tce_xxx callbacks from ppc_md to iommu_table 2015-06-11 15:14:56 +10:00
xmon powerpc updates for 3.20 2015-02-11 18:15:38 -08:00
Kconfig powerpc updates for 4.1 2015-04-16 13:53:32 -05:00
Kconfig.debug powerpc: Make STRICT_MM_TYPECHECKS a config option 2015-05-11 19:53:59 +10:00
Makefile powerpc/configs: Replace pseries_le_defconfig with a Makefile target using merge_config 2015-06-02 16:54:49 +10:00
relocs_check.sh powerpc: Convert relocs_check to a shell script using grep 2015-03-23 14:47:39 +11:00