1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44#ifndef __HCP_IF_H__
45#define __HCP_IF_H__
46
47#include "ehca_classes.h"
48#include "ehca_tools.h"
49#include "hipz_hw.h"
50
51
52
53
54
55u64 hipz_h_alloc_resource_eq(const struct ipz_adapter_handle adapter_handle,
56 struct ehca_pfeq *pfeq,
57 const u32 neq_control,
58 const u32 number_of_entries,
59 struct ipz_eq_handle *eq_handle,
60 u32 * act_nr_of_entries,
61 u32 * act_pages,
62 u32 * eq_ist);
63
64u64 hipz_h_reset_event(const struct ipz_adapter_handle adapter_handle,
65 struct ipz_eq_handle eq_handle,
66 const u64 event_mask);
67
68
69
70
71u64 hipz_h_alloc_resource_cq(const struct ipz_adapter_handle adapter_handle,
72 struct ehca_cq *cq,
73 struct ehca_alloc_cq_parms *param);
74
75
76
77
78
79
80u64 hipz_h_alloc_resource_qp(const struct ipz_adapter_handle adapter_handle,
81 struct ehca_alloc_qp_parms *parms, int is_user);
82
83u64 hipz_h_query_port(const struct ipz_adapter_handle adapter_handle,
84 const u8 port_id,
85 struct hipz_query_port *query_port_response_block);
86
87u64 hipz_h_modify_port(const struct ipz_adapter_handle adapter_handle,
88 const u8 port_id, const u32 port_cap,
89 const u8 init_type, const int modify_mask);
90
91u64 hipz_h_query_hca(const struct ipz_adapter_handle adapter_handle,
92 struct hipz_query_hca *query_hca_rblock);
93
94
95
96
97
98u64 hipz_h_register_rpage(const struct ipz_adapter_handle adapter_handle,
99 const u8 pagesize,
100 const u8 queue_type,
101 const u64 resource_handle,
102 const u64 logical_address_of_page,
103 u64 count);
104
105u64 hipz_h_register_rpage_eq(const struct ipz_adapter_handle adapter_handle,
106 const struct ipz_eq_handle eq_handle,
107 struct ehca_pfeq *pfeq,
108 const u8 pagesize,
109 const u8 queue_type,
110 const u64 logical_address_of_page,
111 const u64 count);
112
113u64 hipz_h_query_int_state(const struct ipz_adapter_handle
114 hcp_adapter_handle,
115 u32 ist);
116
117u64 hipz_h_register_rpage_cq(const struct ipz_adapter_handle adapter_handle,
118 const struct ipz_cq_handle cq_handle,
119 struct ehca_pfcq *pfcq,
120 const u8 pagesize,
121 const u8 queue_type,
122 const u64 logical_address_of_page,
123 const u64 count,
124 const struct h_galpa gal);
125
126u64 hipz_h_register_rpage_qp(const struct ipz_adapter_handle adapter_handle,
127 const struct ipz_qp_handle qp_handle,
128 struct ehca_pfqp *pfqp,
129 const u8 pagesize,
130 const u8 queue_type,
131 const u64 logical_address_of_page,
132 const u64 count,
133 const struct h_galpa galpa);
134
135u64 hipz_h_disable_and_get_wqe(const struct ipz_adapter_handle adapter_handle,
136 const struct ipz_qp_handle qp_handle,
137 struct ehca_pfqp *pfqp,
138 void **log_addr_next_sq_wqe_tb_processed,
139 void **log_addr_next_rq_wqe_tb_processed,
140 int dis_and_get_function_code);
141enum hcall_sigt {
142 HCALL_SIGT_NO_CQE = 0,
143 HCALL_SIGT_BY_WQE = 1,
144 HCALL_SIGT_EVERY = 2
145};
146
147u64 hipz_h_modify_qp(const struct ipz_adapter_handle adapter_handle,
148 const struct ipz_qp_handle qp_handle,
149 struct ehca_pfqp *pfqp,
150 const u64 update_mask,
151 struct hcp_modify_qp_control_block *mqpcb,
152 struct h_galpa gal);
153
154u64 hipz_h_query_qp(const struct ipz_adapter_handle adapter_handle,
155 const struct ipz_qp_handle qp_handle,
156 struct ehca_pfqp *pfqp,
157 struct hcp_modify_qp_control_block *qqpcb,
158 struct h_galpa gal);
159
160u64 hipz_h_destroy_qp(const struct ipz_adapter_handle adapter_handle,
161 struct ehca_qp *qp);
162
163u64 hipz_h_define_aqp0(const struct ipz_adapter_handle adapter_handle,
164 const struct ipz_qp_handle qp_handle,
165 struct h_galpa gal,
166 u32 port);
167
168u64 hipz_h_define_aqp1(const struct ipz_adapter_handle adapter_handle,
169 const struct ipz_qp_handle qp_handle,
170 struct h_galpa gal,
171 u32 port, u32 * pma_qp_nr,
172 u32 * bma_qp_nr);
173
174u64 hipz_h_attach_mcqp(const struct ipz_adapter_handle adapter_handle,
175 const struct ipz_qp_handle qp_handle,
176 struct h_galpa gal,
177 u16 mcg_dlid,
178 u64 subnet_prefix, u64 interface_id);
179
180u64 hipz_h_detach_mcqp(const struct ipz_adapter_handle adapter_handle,
181 const struct ipz_qp_handle qp_handle,
182 struct h_galpa gal,
183 u16 mcg_dlid,
184 u64 subnet_prefix, u64 interface_id);
185
186u64 hipz_h_destroy_cq(const struct ipz_adapter_handle adapter_handle,
187 struct ehca_cq *cq,
188 u8 force_flag);
189
190u64 hipz_h_destroy_eq(const struct ipz_adapter_handle adapter_handle,
191 struct ehca_eq *eq);
192
193
194
195
196
197u64 hipz_h_alloc_resource_mr(const struct ipz_adapter_handle adapter_handle,
198 const struct ehca_mr *mr,
199 const u64 vaddr,
200 const u64 length,
201 const u32 access_ctrl,
202 const struct ipz_pd pd,
203 struct ehca_mr_hipzout_parms *outparms);
204
205
206u64 hipz_h_register_rpage_mr(const struct ipz_adapter_handle adapter_handle,
207 const struct ehca_mr *mr,
208 const u8 pagesize,
209 const u8 queue_type,
210 const u64 logical_address_of_page,
211 const u64 count);
212
213
214u64 hipz_h_query_mr(const struct ipz_adapter_handle adapter_handle,
215 const struct ehca_mr *mr,
216 struct ehca_mr_hipzout_parms *outparms);
217
218
219u64 hipz_h_free_resource_mr(const struct ipz_adapter_handle adapter_handle,
220 const struct ehca_mr *mr);
221
222
223u64 hipz_h_reregister_pmr(const struct ipz_adapter_handle adapter_handle,
224 const struct ehca_mr *mr,
225 const u64 vaddr_in,
226 const u64 length,
227 const u32 access_ctrl,
228 const struct ipz_pd pd,
229 const u64 mr_addr_cb,
230 struct ehca_mr_hipzout_parms *outparms);
231
232
233u64 hipz_h_register_smr(const struct ipz_adapter_handle adapter_handle,
234 const struct ehca_mr *mr,
235 const struct ehca_mr *orig_mr,
236 const u64 vaddr_in,
237 const u32 access_ctrl,
238 const struct ipz_pd pd,
239 struct ehca_mr_hipzout_parms *outparms);
240
241
242
243
244
245u64 hipz_h_alloc_resource_mw(const struct ipz_adapter_handle adapter_handle,
246 const struct ehca_mw *mw,
247 const struct ipz_pd pd,
248 struct ehca_mw_hipzout_parms *outparms);
249
250
251u64 hipz_h_query_mw(const struct ipz_adapter_handle adapter_handle,
252 const struct ehca_mw *mw,
253 struct ehca_mw_hipzout_parms *outparms);
254
255
256u64 hipz_h_free_resource_mw(const struct ipz_adapter_handle adapter_handle,
257 const struct ehca_mw *mw);
258
259u64 hipz_h_error_data(const struct ipz_adapter_handle adapter_handle,
260 const u64 ressource_handle,
261 void *rblock,
262 unsigned long *byte_count);
263u64 hipz_h_eoi(int irq);
264
265#endif
266