summaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorDennis Dalessandro <dennis.dalessandro@intel.com>2016-01-06 10:04:57 -0800
committerDoug Ledford <dledford@redhat.com>2016-03-10 20:37:15 -0500
commit822514d75a9647662fff39d728c1f4636b75d904 (patch)
treeb501a4acfe567e77a9ea3a4471708f7bed8f4af2 /include/rdma
parent0acb0cc7ecc1e4860b056368566c0c2c254ae281 (diff)
downloadlinux-822514d75a9647662fff39d728c1f4636b75d904.tar.bz2
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.h15
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 */