diff options
author | Dennis Dalessandro <dennis.dalessandro@intel.com> | 2016-01-06 19:04:57 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-11 02:37:15 +0100 |
commit | 822514d75a9647662fff39d728c1f4636b75d904 (patch) | |
tree | b501a4acfe567e77a9ea3a4471708f7bed8f4af2 /include/rdma | |
parent | IB/rdmavt: Initialize and teardown of qpn table (diff) | |
download | linux-822514d75a9647662fff39d728c1f4636b75d904.tar.xz linux-822514d75a9647662fff39d728c1f4636b75d904.zip |
IB/rdmavt: Add mmap related functions
The mmap data structure was moved in a previous commit. This patch now
pulls in the related functions.
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/rdma_vt.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h index 950c2910e3f4..fd25d2309ee3 100644 --- a/include/rdma/rdma_vt.h +++ b/include/rdma/rdma_vt.h @@ -254,6 +254,12 @@ struct rvt_dev_info { struct rvt_ibport **ports; struct rvt_qp_ibdev *qp_dev; + + /* memory maps */ + struct list_head pending_mmaps; + spinlock_t mmap_offset_lock; /* protect mmap_offset */ + u32 mmap_offset; + spinlock_t pending_lock; /* protect pending mmap list */ }; static inline struct rvt_pd *ibpd_to_rvtpd(struct ib_pd *ibpd) @@ -285,4 +291,13 @@ int rvt_rkey_ok(struct rvt_qp *qp, struct rvt_sge *sge, u32 len, u64 vaddr, u32 rkey, int acc); int rvt_lkey_ok(struct rvt_lkey_table *rkt, struct rvt_pd *pd, struct rvt_sge *isge, struct ib_sge *sge, int acc); +int rvt_mmap(struct ib_ucontext *context, struct vm_area_struct *vma); +void rvt_release_mmap_info(struct kref *ref); +struct rvt_mmap_info *rvt_create_mmap_info(struct rvt_dev_info *rdi, + u32 size, + struct ib_ucontext *context, + void *obj); +void rvt_update_mmap_info(struct rvt_dev_info *rdi, struct rvt_mmap_info *ip, + u32 size, void *obj); + #endif /* DEF_RDMA_VT_H */ |