diff options
author | Chengchang Tang <tangchengchang@huawei.com> | 2021-10-28 18:56:40 +0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-10-29 14:07:31 -0300 |
commit | 6d202d9f70a33560ab62b81da2b062c936437e54 (patch) | |
tree | 80a83b856239960ac9dcbc09cb1cfb55d28bd64f /include/rdma | |
parent | 4892298c3a33d965cd0d34ffd66b79b45abdf9b7 (diff) | |
download | linux-6d202d9f70a33560ab62b81da2b062c936437e54.tar.gz linux-6d202d9f70a33560ab62b81da2b062c936437e54.tar.bz2 linux-6d202d9f70a33560ab62b81da2b062c936437e54.zip |
RDMA/hns: Use the core code to manage the fixed mmap entries
Add a new implementation for mmap by using the new mmap entry API. This
makes way for further use of the dynamic mmap allocator in this driver.
Link: https://lore.kernel.org/r/20211028105640.1056-1-liangwenpeng@huawei.com
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/ib_verbs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 61c73adccbbd..6e9ad656ecb7 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -2914,6 +2914,15 @@ int rdma_user_mmap_entry_insert_range(struct ib_ucontext *ucontext, size_t length, u32 min_pgoff, u32 max_pgoff); +static inline int +rdma_user_mmap_entry_insert_exact(struct ib_ucontext *ucontext, + struct rdma_user_mmap_entry *entry, + size_t length, u32 pgoff) +{ + return rdma_user_mmap_entry_insert_range(ucontext, entry, length, pgoff, + pgoff); +} + struct rdma_user_mmap_entry * rdma_user_mmap_entry_get_pgoff(struct ib_ucontext *ucontext, unsigned long pgoff); |