summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorFugang Duan <fugang.duan@nxp.com>2019-07-19 17:26:48 +0800
committerChristoph Hellwig <hch@lst.de>2019-07-19 14:09:40 +0200
commit449fa54d6815be8c2c1f68fa9dbbae9384a7c03e (patch)
treeb1d2c2c29c8725f8e634a284e2e23c391ed0e059 /arch
parenta5008b59cd9d8de12ab623cb5052bb4735330e5c (diff)
downloadlinux-449fa54d6815be8c2c1f68fa9dbbae9384a7c03e.tar.bz2
dma-direct: correct the physical addr in dma_direct_sync_sg_for_cpu/device
dma_map_sg() may use swiotlb buffer when the kernel command line includes "swiotlb=force" or the dma_addr is out of dev->dma_mask range. After DMA complete the memory moving from device to memory, then user call dma_sync_sg_for_cpu() to sync with DMA buffer, and copy the original virtual buffer to other space. So dma_direct_sync_sg_for_cpu() should use swiotlb physical addr, not the original physical addr from sg_phys(sg). dma_direct_sync_sg_for_device() also has the same issue, correct it as well. Fixes: 55897af63091("dma-direct: merge swiotlb_dma_ops into the dma_direct code") Signed-off-by: Fugang Duan <fugang.duan@nxp.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions