diff options
author | Harish Chegondi <harish.chegondi@intel.com> | 2017-08-21 18:26:51 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-08-28 19:12:19 -0400 |
commit | 9dc117095570e7a230f8f9229a70713c335d9e2a (patch) | |
tree | d29e03c25064a9dc02b3114d4b95de31ceb1fd91 /drivers/infiniband/hw/hfi1/user_exp_rcv.h | |
parent | 7956371ea48bd00956219a82fd3af655dd216073 (diff) | |
download | op-kernel-dev-9dc117095570e7a230f8f9229a70713c335d9e2a.zip op-kernel-dev-9dc117095570e7a230f8f9229a70713c335d9e2a.tar.gz |
IB/hfi1: Clean up hfi1_user_exp_rcv_setup function
Clean up hfi1_user_exp_rcv_setup function by moving page pinning and
unpinning related code to separate functions. In order to reduce the
number of parameters passed between functions, a new data structure
struct tid_user_buf is defined and used.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/user_exp_rcv.h')
-rw-r--r-- | drivers/infiniband/hw/hfi1/user_exp_rcv.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/user_exp_rcv.h b/drivers/infiniband/hw/hfi1/user_exp_rcv.h index 6cbaa4c..8c4eb5d 100644 --- a/drivers/infiniband/hw/hfi1/user_exp_rcv.h +++ b/drivers/infiniband/hw/hfi1/user_exp_rcv.h @@ -51,6 +51,15 @@ #include "exp_rcv.h" +struct tid_user_buf { + unsigned long vaddr; + unsigned long length; + unsigned int npages; + struct page **pages; + struct tid_pageset *psets; + unsigned int n_psets; +}; + int hfi1_user_exp_rcv_init(struct hfi1_filedata *fd, struct hfi1_ctxtdata *uctxt); void hfi1_user_exp_rcv_free(struct hfi1_filedata *fd); |