Files
kernel_arpi/include/linux
Jason Gunthorpe d901b2760d lib/scatterlist: Provide a DMA page iterator
Commit 2db76d7c3c ("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
for_each_sg_page/sg_page_iter_dma_address combination.

Resolve this API mistake by providing a DMA specific iterator,
for_each_sg_dma_page(), that uses the right length so
sg_page_iter_dma_address() works as expected with all sglists.

A new iterator type is introduced to provide compile-time safety against
wrongly mixing accessors and iterators.

Acked-by: Christoph Hellwig <hch@lst.de> (for scatterlist)
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> (ipu3-cio2)
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-02-11 15:02:33 -07:00
..
2019-01-25 15:32:28 -08:00
2019-01-24 11:11:45 -07:00
2018-12-19 10:42:08 +01:00
2018-12-28 12:11:52 -08:00
2019-01-04 13:13:48 -08:00
2019-01-04 13:13:48 -08:00
2019-01-07 16:38:26 +01:00
2018-12-21 11:50:02 -05:00
2019-01-18 14:05:14 -08:00
2019-01-11 18:05:40 -08:00
2018-12-22 12:15:29 +01:00