]> git.baikalelectronics.ru Git - kernel.git/commit
dma-direct: only limit the mapping size if swiotlb could be used
authorChristoph Hellwig <hch@lst.de>
Tue, 16 Jul 2019 20:00:54 +0000 (22:00 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 17 Jul 2019 06:25:45 +0000 (08:25 +0200)
commit8f22fe8da9b309948d3839e813c2cf74b6cd4f5b
tree50f36841635531cb81255bc1ffad56b3e229512e
parent02418ae663598724bbd54fa020b30036c2f3e295
dma-direct: only limit the mapping size if swiotlb could be used

Don't just check for a swiotlb buffer, but also if buffering might
be required for this particular device.

Fixes: 9aaa22ffa0f1 ("dma: Introduce dma_max_mapping_size()")
Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
kernel/dma/direct.c