aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/dma-mapping.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-07-23 11:33:12 +0200
committerChristoph Hellwig <hch@lst.de>2019-07-24 17:29:01 +0200
commitad3c7b18c5b362be5dbd0f2c0bcf1fd5fd659315 (patch)
tree047eca0078eb5dc66bedf61319e3cea0b071870d /arch/arm/include/asm/dma-mapping.h
parentdma-mapping: check pfn validity in dma_common_{mmap,get_sgtable} (diff)
downloadlinux-dev-ad3c7b18c5b362be5dbd0f2c0bcf1fd5fd659315.tar.xz
linux-dev-ad3c7b18c5b362be5dbd0f2c0bcf1fd5fd659315.zip
arm: use swiotlb for bounce buffering on LPAE configs
The DMA API requires that 32-bit DMA masks are always supported, but on arm LPAE configs they do not currently work when memory is present above 4GB. Wire up the swiotlb code like for all other architectures to provide the bounce buffering in that case. Fixes: 21e07dba9fb11 ("scsi: reduce use of block bounce buffers"). Reported-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Vignesh Raghavendra <vigneshr@ti.com>
Diffstat (limited to 'arch/arm/include/asm/dma-mapping.h')
-rw-r--r--arch/arm/include/asm/dma-mapping.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index 7e0486ad1318..dba9355e2484 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -18,7 +18,9 @@ extern const struct dma_map_ops arm_coherent_dma_ops;
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
{
- return IS_ENABLED(CONFIG_MMU) ? &arm_dma_ops : NULL;
+ if (IS_ENABLED(CONFIG_MMU) && !IS_ENABLED(CONFIG_ARM_LPAE))
+ return &arm_dma_ops;
+ return NULL;
}
#ifdef __arch_page_to_dma