kernel/dma/direct: take DMA offset into account in dma_direct_supported
authorChristoph Hellwig <hch@lst.de>
Fri, 24 Aug 2018 06:07:52 +0000 (08:07 +0200)
committerChristoph Hellwig <hch@lst.de>
Sat, 1 Sep 2018 13:42:28 +0000 (15:42 +0200)
commitc1d0af1a1d5dfde880f588eceb4c00710e0f60ff
treef4204c8cb840ebc8c6771f1cbba6247b43c76b48
parent5b394b2ddf0347bef56e50c69a58773c94343ff3
kernel/dma/direct: take DMA offset into account in dma_direct_supported

When a device has a DMA offset the dma capable result will change due
to the difference between the physical and DMA address.  Take that into
account.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
kernel/dma/direct.c