Jason Gunthorpe
a665aca89a
RDMA/umem: Split ib_umem_num_pages() into ib_umem_num_dma_blocks()
...
ib_umem_num_pages() should only be used by things working with the SGL in
CPU pages directly.
Drivers building DMA lists should use the new ib_num_dma_blocks() which
returns the number of blocks rdma_umem_for_each_block() will return.
To make this general for DMA drivers requires a different implementation.
Computing DMA block count based on umem->address only works if the
requested page size is < PAGE_SIZE and/or the IOVA == umem->address.
Instead the number of DMA pages should be computed in the IOVA address
space, not umem->address. Thus the IOVA has to be stored inside the umem
so it can be used for these calculations.
For now set it to umem->address by default and fix it up if
ib_umem_find_best_pgsz() was called. This allows drivers to be converted
to ib_umem_num_dma_blocks() safely.
Link: https://lore.kernel.org/r/6-v2-270386b7e60b+28f4-umem_1_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2020-09-11 10:24:53 -03:00
..
2020-08-26 10:50:50 -07:00
2020-08-28 21:17:56 +02:00
2020-07-29 17:05:44 +02:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-28 13:23:31 -07:00
2020-08-02 18:26:51 +03:00
2020-08-28 16:38:29 -07:00
2020-07-31 15:11:52 -07:00
2020-08-23 17:36:59 -05:00
2020-08-30 15:53:44 -07:00
2020-08-15 08:18:22 -07:00
2020-08-23 17:36:59 -05:00
2020-08-28 13:12:09 -07:00
2020-08-26 12:41:53 +02:00
2020-08-30 15:53:44 -07:00
2020-08-20 11:43:18 -06:00
2020-07-30 17:22:58 +09:00
2020-08-29 13:50:56 -07:00
2020-08-10 19:07:44 -07:00
2020-08-30 10:47:23 -07:00
2020-08-23 17:36:59 -05:00
2020-08-30 11:56:54 -07:00
2020-07-27 11:49:37 +02:00
2020-08-23 17:36:59 -05:00
2020-08-28 09:46:48 -07:00
2020-07-29 16:58:08 +02:00
2020-08-25 11:13:29 -07:00
2020-08-23 17:36:59 -05:00
2020-08-26 10:44:15 -07:00
2020-08-29 12:37:00 -07:00
2020-08-23 17:36:59 -05:00
2020-08-29 13:13:44 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-26 12:41:53 +02:00
2020-08-26 14:02:24 -05:00
2020-09-11 10:24:53 -03:00
2020-08-23 17:36:59 -05:00
2020-08-05 11:43:47 -07:00
2020-08-23 17:36:59 -05:00
2020-08-30 11:56:54 -07:00
2020-08-23 17:36:59 -05:00
2020-08-05 19:24:27 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-14 19:56:57 -07:00
2020-08-28 16:38:29 -07:00
2020-08-27 15:36:28 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-28 10:15:33 -07:00
2020-08-26 10:50:50 -07:00
2020-08-23 17:36:59 -05:00
2020-07-31 14:38:12 +02:00
2020-08-10 18:20:04 -07:00
2020-08-23 17:36:59 -05:00
2020-09-02 15:42:36 -03:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-17 14:47:38 -06:00
2020-08-24 11:53:15 -07:00
2020-07-29 17:12:09 +02:00
2020-08-19 16:30:57 -06:00
2020-08-20 11:30:22 +05:30
2020-08-12 12:41:15 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-09 12:52:28 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-06 11:55:43 -07:00
2020-08-23 17:36:59 -05:00
2020-08-19 16:23:22 -07:00
2020-08-14 16:00:09 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-14 19:56:57 -07:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-08-26 10:58:20 -07:00
2020-08-30 10:51:03 -07:00
2020-08-26 08:13:59 -04:00
2020-08-23 17:36:59 -05:00
2020-08-26 08:13:59 -04:00
2020-08-30 10:56:12 -07:00
2020-08-14 19:56:57 -07:00
2020-08-23 17:36:59 -05:00
2020-08-29 12:44:30 -07:00