alistair23-linux/arch/powerpc/sysdev
Kumar Gala 96ea3b4a70 powerpc/fsl-pci: Allow 64-bit PCIe devices to DMA to any memory address
There is an issue on FSL-BookE 64-bit devices (P5020) in which PCIe
devices that are capable of doing 64-bit DMAs (like an Intel e1000) do
not function and crash the kernel if we have >4G of memory in the system.

The reason is that the existing code only sets up one inbound window for
access to system memory across PCIe.  That window is limited to a 32-bit
address space.  So on systems we'll end up utilizing SWIOTLB for dma
mappings.  However SWIOTLB dma ops implement dma_alloc_coherent() as
dma_direct_alloc_coherent().  Thus we can end up with dma addresses that
are not accessible because of the inbound window limitation.

We could possibly set the SWIOTLB alloc_coherent op to
swiotlb_alloc_coherent() however that does not address the issue since
the swiotlb_alloc_coherent() will behave almost identical to
dma_direct_alloc_coherent() since the devices coherent_dma_mask will be
greater than any address allocated by swiotlb_alloc_coherent() and thus
we'll never bounce buffer it into a range that would be dma-able.

The easiest and best solution is to just make it so that a 64-bit
capable device is able to DMA to any internal system address.

We accomplish this by opening up a second inbound window that maps all
of memory above the internal SoC address width so we can set it up to
access all of the internal SoC address space if needed.

We than fixup the dma_ops and dma_offset for PCIe devices with a dma
mask greater than the maximum internal SoC address.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2012-01-04 15:27:58 -06:00
..
bestcomm powerpc: various straight conversions from module.h --> export.h 2011-10-31 19:30:44 -04:00
qe_lib powerpc/qe: Fixup QE_General4 errata 2011-11-24 01:28:42 -06:00
xics powerpc/xics: Reset the CPPR if H_EOI fails 2011-12-08 14:02:23 +11:00
6xx-suspend.S
axonram.c block: remove support for bio remapping from ->make_request 2011-09-12 12:12:01 +02:00
cpm1.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
cpm2.c
cpm2_pic.c
cpm2_pic.h
cpm_common.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
dart.h
dart_iommu.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
dcr-low.S
dcr.c powerpc: add export.h to files making use of EXPORT_SYMBOL 2011-10-31 19:30:37 -04:00
ehv_pic.c arch/powerpc/sysdev/ehv_pic.c: add missing kfree 2011-11-24 02:01:24 -06:00
fsl_85xx_cache_ctlr.h
fsl_85xx_cache_sram.c powerpc: Remove ioremap_flags 2011-05-19 14:30:43 +10:00
fsl_85xx_l2ctlr.c
fsl_gtm.c powerpc: add export.h to files making use of EXPORT_SYMBOL 2011-10-31 19:30:37 -04:00
fsl_lbc.c powerpc/85xx: Add lbc suspend support for PM 2011-11-24 02:01:40 -06:00
fsl_msi.c powerpc/fsl_msi: add support for the fsl, msi property in PCI nodes 2011-11-24 02:01:41 -06:00
fsl_msi.h powerpc/fsl_msi: add support for the fsl, msi property in PCI nodes 2011-11-24 02:01:41 -06:00
fsl_pci.c powerpc/fsl-pci: Allow 64-bit PCIe devices to DMA to any memory address 2012-01-04 15:27:58 -06:00
fsl_pci.h
fsl_pmc.c powerpc: add export.h to files making use of EXPORT_SYMBOL 2011-10-31 19:30:37 -04:00
fsl_rio.c fsl-rio: Add two ports and rapidio message units support 2011-11-24 02:01:34 -06:00
fsl_rio.h fsl-rio: Add two ports and rapidio message units support 2011-11-24 02:01:34 -06:00
fsl_rmu.c fsl-rio: Add two ports and rapidio message units support 2011-11-24 02:01:34 -06:00
fsl_soc.c powerpc: various straight conversions from module.h --> export.h 2011-10-31 19:30:44 -04:00
fsl_soc.h Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-3.x into fbdev-next 2011-08-29 09:14:30 +00:00
grackle.c powerpc: rename ppc_pci_*_flags to pci_*_flags 2011-07-12 09:28:04 -05:00
i8259.c powerpc: Remove i8259 irq_host_ops->unmap 2011-05-19 15:31:41 +10:00
indirect_pci.c
ipic.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
ipic.h
Kconfig powerpc/4xx: Adding PCIe MSI support 2011-05-26 15:00:37 +10:00
Makefile fsl-rio: Split rio driver into two parts, RapidIO endpoint and message unit 2011-11-24 02:01:34 -06:00
micropatch.c
mmio_nvram.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
mpc5xxx_clocks.c powerpc: add export.h to files making use of EXPORT_SYMBOL 2011-10-31 19:30:37 -04:00
mpc8xx_pic.c powerpc: remove non-required uses of include <linux/module.h> 2011-10-31 19:30:44 -04:00
mpc8xx_pic.h
mpic.c powerpc/mpic: Add in-core support for cascaded MPICs 2011-12-07 13:43:09 +11:00
mpic.h
mpic_msi.c
mpic_pasemi_msi.c
mpic_u3msi.c
msi_bitmap.c
mv64x60.h
mv64x60_dev.c
mv64x60_pci.c powerpc: Fix up implicit stat.h users 2011-10-31 19:30:39 -04:00
mv64x60_pic.c
mv64x60_udbg.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
of_rtc.c
pmi.c powerpc: Fix up modules that should be including module.h 2011-10-31 19:30:38 -04:00
ppc4xx_cpm.c
ppc4xx_gpio.c
ppc4xx_msi.c powerpc: include export.h for files using EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:30:38 -04:00
ppc4xx_pci.c powerpc/476fpe: Add 476fpe SoC code 2011-12-09 07:51:02 -05:00
ppc4xx_pci.h powerpc/476fpe: Add 476fpe SoC code 2011-12-09 07:51:02 -05:00
ppc4xx_soc.c powerpc/irq: Remove IRQF_DISABLED 2011-11-08 14:51:46 +11:00
rtc_cmos_setup.c powerpc: Fix up modules that should be including module.h 2011-10-31 19:30:38 -04:00
scom.c powerpc: add export.h to files making use of EXPORT_SYMBOL 2011-10-31 19:30:37 -04:00
simple_gpio.c powerpc: remove non-required uses of include <linux/module.h> 2011-10-31 19:30:44 -04:00
simple_gpio.h
tsi108_dev.c powerpc: various straight conversions from module.h --> export.h 2011-10-31 19:30:44 -04:00
tsi108_pci.c
uic.c locking, powerpc: Annotate uic->lock as raw 2011-09-13 11:12:10 +02:00
xilinx_intc.c
xilinx_pci.c