diff options
author | Christoph Hellwig <hch@lst.de> | 2019-11-19 19:35:36 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-11-20 22:31:41 +0300 |
commit | 4268ac6ae5870af10a7417b22990d615f72f77e2 (patch) | |
tree | 4f50419289b7d2e946c5ad499d040a5a9ae27449 /kernel/dma/direct.c | |
parent | 50f579a2399dee0ad1c86ea8159ab8657b74f95b (diff) | |
download | linux-4268ac6ae5870af10a7417b22990d615f72f77e2.tar.xz |
dma-direct: don't check swiotlb=force in dma_direct_map_resource
When mapping resources we can't just use swiotlb ram for bounce
buffering. Switch to a direct dma_capable check instead.
Fixes: cfced786969c ("dma-mapping: remove the default map_resource implementation")
Reported-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'kernel/dma/direct.c')
-rw-r--r-- | kernel/dma/direct.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index 077876ae5c74..a479bd2d1e8b 100644 --- a/kernel/dma/direct.c +++ b/kernel/dma/direct.c @@ -412,7 +412,7 @@ dma_addr_t dma_direct_map_resource(struct device *dev, phys_addr_t paddr, { dma_addr_t dma_addr = paddr; - if (unlikely(!dma_direct_possible(dev, dma_addr, size))) { + if (unlikely(!dma_capable(dev, dma_addr, size))) { report_addr(dev, dma_addr, size); return DMA_MAPPING_ERROR; } |