Re: [PATCH v2] lib/scatterlist: Provide a DMA page iterator

2019-02-11 Thread Jason Gunthorpe
On Thu, Feb 07, 2019 at 10:26:52PM +, Jason Gunthorpe wrote: > Commit 2db76d7c3c6d ("lib/scatterlist: sg_page_iter: support sg lists w/o > backing pages") introduced the sg_page_iter_dma_address() function without > providing a way to use it in the general case. If the sg_dma_len() is not >

Re: [PATCH v2] lib/scatterlist: Provide a DMA page iterator

2019-02-08 Thread Jason Gunthorpe
On Thu, Feb 07, 2019 at 03:26:47PM -0700, Jason Gunthorpe wrote: > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c > b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c > index 31786b200afc47..e84f6aaee778f0 100644 > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c > @@ -311,7 +311,13 @@ static

Re: [PATCH v2] lib/scatterlist: Provide a DMA page iterator

2019-02-07 Thread Thomas Hellstrom
On Thu, 2019-02-07 at 22:26 +, Jason Gunthorpe wrote: > Commit 2db76d7c3c6d ("lib/scatterlist: sg_page_iter: support sg lists > w/o > backing pages") introduced the sg_page_iter_dma_address() function > without > providing a way to use it in the general case. If the sg_dma_len() is > not >

Re: [PATCH v2] lib/scatterlist: Provide a DMA page iterator

2019-02-07 Thread Miguel Ojeda
On Thu, Feb 7, 2019 at 11:28 PM Jason Gunthorpe wrote: > > Commit 2db76d7c3c6d ("lib/scatterlist: sg_page_iter: support sg lists w/o > backing pages") introduced the sg_page_iter_dma_address() function without > providing a way to use it in the general case. If the sg_dma_len() is not > equal to

[PATCH v2] lib/scatterlist: Provide a DMA page iterator

2019-02-07 Thread Jason Gunthorpe
Commit 2db76d7c3c6d ("lib/scatterlist: sg_page_iter: support sg lists w/o backing pages") introduced the sg_page_iter_dma_address() function without providing a way to use it in the general case. If the sg_dma_len() is not equal to the sg length callers cannot safely use the