Re: [PATCH 1/2] kernel/dma/direct: take DMA offset into account in dma_direct_supported

2018-08-29 Thread Christoph Hellwig
On Fri, Aug 24, 2018 at 12:11:23PM +0100, Robin Murphy wrote: > On 24/08/18 07:53, Christoph Hellwig wrote: >> 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. > > The "phys_to_dma(...,

Re: [PATCH 1/2] kernel/dma/direct: take DMA offset into account in dma_direct_supported

2018-08-24 Thread Robin Murphy
On 24/08/18 07:53, Christoph Hellwig wrote: 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. The "phys_to_dma(..., DMA_BIT_MASK(...))" idiom always looks like a glaring error at first glance,

[PATCH 1/2] kernel/dma/direct: take DMA offset into account in dma_direct_supported

2018-08-24 Thread Christoph Hellwig
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 Reviewed-by: Benjamin Herrenschmidt --- kernel/dma/direct.c | 4 ++-- 1 file changed, 2 insertions(+), 2