linux-stable/arch/powerpc/platforms/powernv
Wei Yang 9e8d4a19ab powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically
Previously the iommu_table had the same lifetime as a struct pnv_ioda_pe
and was embedded in it. The pnv_ioda_pe was assigned to a PE on the bootup
stage. Since PEs are based on the hardware layout which is static in the
system, they will never get released. This means the iommu_table in the
pnv_ioda_pe will never get released either.

This no longer works for VF PE. VF PEs are created and released dynamically
when VFs are created and released. So we need to assign pnv_ioda_pe to VF
PEs respectively when VFs are enabled and clean up those resources for VF
PE when VFs are disabled. And iommu_table is one of the resources we need
to handle dynamically.

Current iommu_table is a static field in pnv_ioda_pe, which will face a
problem when freeing it. During the disabling of a VF,
pnv_pci_ioda2_release_dma_pe will call iommu_free_table to release the
iommu_table for this PE. A static iommu_table will fail in
iommu_free_table.

According to these requirement, this patch allocates iommu_table
dynamically.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2015-03-31 13:02:37 +11:00
..
eeh-powernv.c powerpc/eeh: Replace device_node with pci_dn in eeh_ops 2015-03-24 13:15:52 +11:00
Kconfig
Makefile powerpc/powernv: Remove unused file 2015-03-17 10:31:20 +11:00
opal-async.c rtc/tpo: Driver to support rtc and wakeup on PowerNV platform 2014-11-17 18:04:01 +11:00
opal-dump.c
opal-elog.c
opal-flash.c
opal-hmi.c powerpc/powernv: Fix the hmi event version check. 2014-11-27 09:32:52 +11:00
opal-lpc.c powerpc/powernv: Properly fix LPC debugfs endianness 2014-10-31 17:09:04 +11:00
opal-memory-errors.c
opal-msglog.c
opal-nvram.c
opal-power.c powerpc/powernv: Add OPAL soft-poweroff routine 2015-02-04 13:08:25 +11:00
opal-rtc.c rtc/tpo: Driver to support rtc and wakeup on PowerNV platform 2014-11-17 18:04:01 +11:00
opal-sensor.c hwmon: (ibmpowernv) Use platform 'id_table' to probe the device 2014-11-30 20:13:13 -08:00
opal-sysparam.c
opal-tracepoints.c powerpc: Replace __get_cpu_var uses 2014-11-03 12:12:32 +11:00
opal-wrappers.S powernv: Fix OPAL tracepoint code 2015-01-12 16:40:02 +11:00
opal-xscom.c
opal.c powerpc/powernv: Don't alloc IRQ map if necessary 2015-01-28 15:28:10 +11:00
pci-ioda.c powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically 2015-03-31 13:02:37 +11:00
pci-p5ioc2.c powerpc: Remove more traces of bootmem 2014-11-19 21:41:51 +11:00
pci.c powerpc/powernv: Use pci_dn, not device_node, in PCI config accessor 2015-03-24 13:15:50 +11:00
pci.h powerpc/powernv: Allocate struct pnv_ioda_pe iommu_table dynamically 2015-03-31 13:02:37 +11:00
powernv.h powerpc/powernv: Enable Offline CPUs to enter deep idle states 2014-12-15 10:46:40 +11:00
rng.c
setup.c powerpc/powernv: Restore LPCR with LPCR_PECE1 cleared 2015-01-22 17:22:57 +11:00
smp.c powerpc/powernv: Ignore smt-enabled on Power8 and later 2014-12-18 19:59:21 +11:00
subcore-asm.S
subcore.c powernv/powerpc: Add winkle support for offline cpus 2014-12-15 10:46:41 +11:00
subcore.h powernv/powerpc: Add winkle support for offline cpus 2014-12-15 10:46:41 +11:00