diff options
author | Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com> | 2007-01-23 18:13:35 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-02-04 17:11:57 -0500 |
commit | 4c34bdf58c0a3b305ebd9b5e74011ca1fd6d964d (patch) | |
tree | 6e0a9639148b5bdb6b344ac048a4bc4453d5550f /drivers/infiniband/hw/ehca/ehca_classes.h | |
parent | 1f12667021c542236b1f10eb5d8b2d8f3a79ab48 (diff) |
IB/ehca: Remove use of do_mmap()
This patch removes do_mmap() from ehca:
- Call remap_pfn_range() for hardware register block
- Use vm_insert_page() to register memory allocated for completion
queues and queue pairs
- The actual mmap() call/trigger is now controlled by user space,
ie. libehca
Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_classes.h')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_classes.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h index 1c722032319c..c3580bfb3c58 100644 --- a/drivers/infiniband/hw/ehca/ehca_classes.h +++ b/drivers/infiniband/hw/ehca/ehca_classes.h | |||
@@ -119,13 +119,14 @@ struct ehca_qp { | |||
119 | struct ipz_qp_handle ipz_qp_handle; | 119 | struct ipz_qp_handle ipz_qp_handle; |
120 | struct ehca_pfqp pf; | 120 | struct ehca_pfqp pf; |
121 | struct ib_qp_init_attr init_attr; | 121 | struct ib_qp_init_attr init_attr; |
122 | u64 uspace_squeue; | ||
123 | u64 uspace_rqueue; | ||
124 | u64 uspace_fwh; | ||
125 | struct ehca_cq *send_cq; | 122 | struct ehca_cq *send_cq; |
126 | struct ehca_cq *recv_cq; | 123 | struct ehca_cq *recv_cq; |
127 | unsigned int sqerr_purgeflag; | 124 | unsigned int sqerr_purgeflag; |
128 | struct hlist_node list_entries; | 125 | struct hlist_node list_entries; |
126 | /* mmap counter for resources mapped into user space */ | ||
127 | u32 mm_count_squeue; | ||
128 | u32 mm_count_rqueue; | ||
129 | u32 mm_count_galpa; | ||
129 | }; | 130 | }; |
130 | 131 | ||
131 | /* must be power of 2 */ | 132 | /* must be power of 2 */ |
@@ -142,13 +143,14 @@ struct ehca_cq { | |||
142 | struct ipz_cq_handle ipz_cq_handle; | 143 | struct ipz_cq_handle ipz_cq_handle; |
143 | struct ehca_pfcq pf; | 144 | struct ehca_pfcq pf; |
144 | spinlock_t cb_lock; | 145 | spinlock_t cb_lock; |
145 | u64 uspace_queue; | ||
146 | u64 uspace_fwh; | ||
147 | struct hlist_head qp_hashtab[QP_HASHTAB_LEN]; | 146 | struct hlist_head qp_hashtab[QP_HASHTAB_LEN]; |
148 | struct list_head entry; | 147 | struct list_head entry; |
149 | u32 nr_callbacks; | 148 | u32 nr_callbacks; |
150 | spinlock_t task_lock; | 149 | spinlock_t task_lock; |
151 | u32 ownpid; | 150 | u32 ownpid; |
151 | /* mmap counter for resources mapped into user space */ | ||
152 | u32 mm_count_queue; | ||
153 | u32 mm_count_galpa; | ||
152 | }; | 154 | }; |
153 | 155 | ||
154 | enum ehca_mr_flag { | 156 | enum ehca_mr_flag { |
@@ -283,7 +285,6 @@ extern int ehca_port_act_time; | |||
283 | extern int ehca_use_hp_mr; | 285 | extern int ehca_use_hp_mr; |
284 | 286 | ||
285 | struct ipzu_queue_resp { | 287 | struct ipzu_queue_resp { |
286 | u64 queue; /* points to first queue entry */ | ||
287 | u32 qe_size; /* queue entry size */ | 288 | u32 qe_size; /* queue entry size */ |
288 | u32 act_nr_of_sg; | 289 | u32 act_nr_of_sg; |
289 | u32 queue_length; /* queue length allocated in bytes */ | 290 | u32 queue_length; /* queue length allocated in bytes */ |
@@ -296,7 +297,6 @@ struct ehca_create_cq_resp { | |||
296 | u32 cq_number; | 297 | u32 cq_number; |
297 | u32 token; | 298 | u32 token; |
298 | struct ipzu_queue_resp ipz_queue; | 299 | struct ipzu_queue_resp ipz_queue; |
299 | struct h_galpas galpas; | ||
300 | }; | 300 | }; |
301 | 301 | ||
302 | struct ehca_create_qp_resp { | 302 | struct ehca_create_qp_resp { |
@@ -309,7 +309,6 @@ struct ehca_create_qp_resp { | |||
309 | u32 dummy; /* padding for 8 byte alignment */ | 309 | u32 dummy; /* padding for 8 byte alignment */ |
310 | struct ipzu_queue_resp ipz_squeue; | 310 | struct ipzu_queue_resp ipz_squeue; |
311 | struct ipzu_queue_resp ipz_rqueue; | 311 | struct ipzu_queue_resp ipz_rqueue; |
312 | struct h_galpas galpas; | ||
313 | }; | 312 | }; |
314 | 313 | ||
315 | struct ehca_alloc_cq_parms { | 314 | struct ehca_alloc_cq_parms { |