summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorRussell Currey <ruscur@russell.cc>2018-04-09 17:34:37 +1000
committerTimothy Pearson <tpearson@raptorengineering.com>2018-06-22 01:05:17 -0500
commit23556da90284f603bbb1de3f8ff624104a2c16f7 (patch)
tree13869fc8b0516cba7f8deb18f0dcfaadf78b62cc /arch/powerpc/include
parent1fe038d34e28b2e61927bf1f506ba2e12d9c8ccb (diff)
downloadop-kernel-dev-23556da90284f603bbb1de3f8ff624104a2c16f7.zip
op-kernel-dev-23556da90284f603bbb1de3f8ff624104a2c16f7.tar.gz
powerpc/powernv: DMA operations for discontiguous allocation
Cognitive DMA is a new set of DMA operations that solve some issues for devices that want to address more than 32 bits but can't address the 59 bits required to enable direct DMA. The previous implementation for POWER8/PHB3 worked around this by configuring a bypass from the default 32-bit address space into 64-bit address space. This approach does not work for POWER9/PHB4 because regions of memory are discontiguous and many devices will be unable to address memory beyond the first node. Instead, implement a new set of DMA operations that allocate TCEs as DMA mappings are requested so that all memory is addressable even when a one-to-one mapping between real addresses and DMA addresses isn't possible. These TCEs are the maximum size available on the platform, which is 256M on PHB3 and 1G on PHB4. Devices can now map any region of memory up to the maximum amount they can address according to the DMA mask set, in chunks of the largest available TCE size. This implementation replaces the need for the existing PHB3 solution and should be compatible with future PHB versions. Signed-off-by: Russell Currey <ruscur@russell.cc>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/dma-mapping.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
index 8fa3945..354f435 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -74,6 +74,7 @@ static inline unsigned long device_to_mask(struct device *dev)
extern struct dma_map_ops dma_iommu_ops;
#endif
extern const struct dma_map_ops dma_nommu_ops;
+extern const struct dma_map_ops dma_pseudo_bypass_ops;
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
{
OpenPOWER on IntegriCloud