Jason Gunthorpe
d901b2760d
lib/scatterlist: Provide a DMA page iterator
...
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
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-21 15:01:43 -05:00
2018-11-24 22:12:54 +01:00
2018-11-02 09:57:27 +00:00
2019-01-03 18:57:57 -08:00
2018-12-25 11:48:26 -08:00
2018-11-01 15:24:22 +01:00
2018-11-19 11:07:52 +10:00
2019-01-09 10:49:31 +01:00
2018-11-22 12:54:38 +10:00
2019-01-03 18:57:57 -08:00
2018-12-14 15:46:15 +09:00
2018-11-01 15:23:58 +01:00
2018-11-05 14:21:21 -05:00
2018-10-04 10:32:14 +10:00
2019-01-24 10:41:34 +02:00
2018-11-05 14:56:04 +01:00
2018-12-03 11:08:22 +08:00
2019-01-15 13:21:32 +01:00
2018-11-05 14:21:21 -05:00
2019-01-25 07:45:00 +10:00
2018-11-24 22:12:54 +01:00
2019-01-18 15:38:18 +10:00
2018-12-03 14:46:30 +02:00
2018-12-03 17:04:48 +01:00
2018-11-28 09:31:07 -08:00
2019-01-14 08:16:18 +01:00
2018-12-28 12:11:50 -08:00
2018-12-25 11:48:26 -08:00
2019-01-13 19:20:45 +01:00
2018-12-05 17:56:16 -05:00
2018-12-11 15:19:42 +01:00
2018-11-24 22:12:54 +01:00
2018-11-13 12:07:18 +01:00
2018-10-25 17:00:28 +02:00
2019-01-22 10:16:22 +01:00
2018-12-06 18:58:32 +01:00
2018-11-01 15:25:41 +01:00
2018-12-04 15:57:42 +01:00
2018-12-21 15:27:58 -05:00
2018-11-24 22:12:54 +01:00
2018-10-23 15:59:01 +02:00
2018-12-07 11:23:05 +10:00
2018-12-05 11:01:11 +01:00
2018-11-05 15:31:51 +00:00
2019-01-14 08:16:19 +01:00
2018-12-04 11:47:27 +01:00
2019-02-11 15:02:33 -07:00
2018-12-18 12:16:13 -05:00
2018-10-05 18:04:10 +02:00
2018-12-07 11:23:05 +10:00
2018-12-24 11:53:50 +01:00
2019-01-10 11:31:58 +01:00
2018-12-05 10:00:35 +01:00
2018-11-26 16:14:27 -05:00
2018-09-11 11:21:30 +01:00
2018-09-13 11:28:12 +02:00
2018-10-17 09:17:33 +02:00
2018-11-20 14:56:18 +01:00
2018-11-29 10:48:31 -05:00
2018-12-06 13:29:09 +10:00
2018-09-14 17:29:47 +01:00
2018-10-05 18:04:10 +02:00
2018-09-10 07:10:36 +02:00
2018-12-07 11:23:05 +10:00
2018-12-24 11:52:43 +01:00
2018-11-22 09:52:27 +01:00
2018-10-11 10:52:35 +02:00
2019-01-10 15:09:35 +02:00
2018-11-28 16:22:17 -05:00
2018-11-29 10:28:49 +10:00
2018-11-27 18:35:17 -08:00
2018-11-02 10:58:20 -07:00
2018-09-14 17:29:47 +01:00
2018-11-19 10:40:33 +10:00
2019-01-10 08:25:36 +01:00
2019-01-03 18:57:57 -08:00
2018-11-20 16:20:13 +02:00
2018-11-02 09:58:10 +00:00
2018-11-20 14:57:25 +01:00
2018-11-02 09:55:27 +00:00
2018-11-20 14:56:18 +01:00
2018-12-25 11:48:26 -08:00
2018-12-20 08:13:29 +01:00
2018-09-14 17:29:47 +01:00
2018-12-25 11:48:26 -08:00
2018-09-14 17:29:47 +01:00
2018-10-16 14:39:25 +02:00
2018-12-06 13:43:56 +10:00
2019-01-10 11:31:58 +01:00
2018-10-01 10:16:39 +02:00
2018-10-05 18:06:49 +02:00
2018-11-29 10:48:31 -05:00
2018-11-15 10:55:30 +01:00
2018-10-04 11:03:34 +10:00
2019-01-08 07:58:37 -05:00
2018-10-05 22:45:19 +02:00
2018-11-29 10:48:31 -05:00
2018-11-22 15:44:05 +01:00
2018-09-14 17:29:47 +01:00
2018-09-14 17:29:47 +01:00
2018-10-30 13:01:50 -07:00
2018-12-05 11:01:11 +01:00
2018-11-30 10:57:18 +01:00
2018-09-14 17:29:47 +01:00
2018-09-04 19:00:32 +01:00
2018-10-03 21:08:21 +02:00
2018-12-06 13:43:56 +10:00