UBUNTU: SAUCE: IB/mlx5: Use peer client page_shift
Use peer client page_shift as part of mlx5_ib_cont_pages(), this was
part of OFED 5.0 and solved the break that was introduced when working
with nv_peer_mem with 5.1.
The peer_memory_client scheme allows a driver to register with the ib_umem
system that it has the ability to understand user virtual address ranges
that are not compatible with get_user_pages(). For instance VMAs created
with io_remap_pfn_range(), or other driver special VMA.
For ranges the interface understands it can provide a DMA mapped sg_table
for use by the ib_umem, allowing user virtual ranges that cannot be
supported by get_user_pages() to be used as umems for RDMA.
This is designed to preserve the kABI, no functions or structures are
changed, only new symbols are added:
NOTES (remote before sending):
- The exact locking semantics from the GPU side during invalidation
are confusing. I've made it sane but perhaps this will hit locking
problems. Test with lockdep and test invalidation.
The main difference here is that get_pages and dma_map are called
from a context that will block progress of invalidation.
The old design blocked progress of invalidation using a completion for
unmap and unpin, so those should be proven safe now.
Since the old design used a completion it doesn't work with lockdep,
even though it has basically the same blocking semantics.
- The API exported to the GPU side is crufty and makes very little
sense. Functionally it should be the same still, but many useless
things were dropped off
- I rewrote all the comments please check spelling/grammar
- Compile tested only
Change-Id: I1d77f52d56aec2c79e6b9d9ec1096e83a95155cd
Signed-off-by: Yishai Hadas <email address hidden>
Signed-off-by: Feras Daoud <email address hidden>
Signed-off-by: Jason Gunthorpe <email address hidden>
[dannf: Forwarded ported to v5.8 by adjusting ib_umem_get() API and
replacing mr.c:unreg_umr() call w/ mlx5_mr_cache_invalidate()]
Add CONFIG_INFINIBAND_VIRT_DMA, introduced after rebasing to 5.10-rc5.
NOTE: this config option can only be enabled if CONFIG_HIGHMEM is not
set and that is false in armhf, so it needs to be disabled in this
specific architecture.
As a consequence the following dependent config options are also
disabled (on armhf only):
- CONFIG_RDMA_RXE
- CONFIG_RDMA_SIW
This shouldn't be a problem, since these options are used by infiniband,
that is unlikely to be used with armhf.
Signed-off-by: Andrea Righi <email address hidden>