aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/hvcall.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc/hvcall.h')
-rw-r--r--include/asm-powerpc/hvcall.h121
1 files changed, 42 insertions, 79 deletions
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h
index 0d3c4e85711a..257d1cecb8c9 100644
--- a/include/asm-powerpc/hvcall.h
+++ b/include/asm-powerpc/hvcall.h
@@ -164,9 +164,15 @@
164#define H_VIO_SIGNAL 0x104 164#define H_VIO_SIGNAL 0x104
165#define H_SEND_CRQ 0x108 165#define H_SEND_CRQ 0x108
166#define H_COPY_RDMA 0x110 166#define H_COPY_RDMA 0x110
167#define H_REGISTER_LOGICAL_LAN 0x114
168#define H_FREE_LOGICAL_LAN 0x118
169#define H_ADD_LOGICAL_LAN_BUFFER 0x11C
170#define H_SEND_LOGICAL_LAN 0x120
171#define H_MULTICAST_CTRL 0x130
167#define H_SET_XDABR 0x134 172#define H_SET_XDABR 0x134
168#define H_STUFF_TCE 0x138 173#define H_STUFF_TCE 0x138
169#define H_PUT_TCE_INDIRECT 0x13C 174#define H_PUT_TCE_INDIRECT 0x13C
175#define H_CHANGE_LOGICAL_LAN_MAC 0x14C
170#define H_VTERM_PARTNER_INFO 0x150 176#define H_VTERM_PARTNER_INFO 0x150
171#define H_REGISTER_VTERM 0x154 177#define H_REGISTER_VTERM 0x154
172#define H_FREE_VTERM 0x158 178#define H_FREE_VTERM 0x158
@@ -196,102 +202,59 @@
196#define H_GET_HCA_INFO 0x1B8 202#define H_GET_HCA_INFO 0x1B8
197#define H_GET_PERF_COUNT 0x1BC 203#define H_GET_PERF_COUNT 0x1BC
198#define H_MANAGE_TRACE 0x1C0 204#define H_MANAGE_TRACE 0x1C0
205#define H_FREE_LOGICAL_LAN_BUFFER 0x1D4
199#define H_QUERY_INT_STATE 0x1E4 206#define H_QUERY_INT_STATE 0x1E4
200#define H_POLL_PENDING 0x1D8 207#define H_POLL_PENDING 0x1D8
201#define H_JOIN 0x298 208#define H_JOIN 0x298
202#define H_VASI_STATE 0x2A4 209#define H_VASI_STATE 0x2A4
203#define H_ENABLE_CRQ 0x2B0 210#define H_ENABLE_CRQ 0x2B0
211#define MAX_HCALL_OPCODE H_ENABLE_CRQ
204 212
205#ifndef __ASSEMBLY__ 213#ifndef __ASSEMBLY__
206 214
207/* plpar_hcall() -- Generic call interface using above opcodes 215/**
216 * plpar_hcall_norets: - Make a pseries hypervisor call with no return arguments
217 * @opcode: The hypervisor call to make.
208 * 218 *
209 * The actual call interface is a hypervisor call instruction with 219 * This call supports up to 7 arguments and only returns the status of
210 * the opcode in R3 and input args in R4-R7. 220 * the hcall. Use this version where possible, its slightly faster than
211 * Status is returned in R3 with variable output values in R4-R11. 221 * the other plpar_hcalls.
212 * Only H_PTE_READ with H_READ_4 uses R6-R11 so we ignore it for now
213 * and return only two out args which MUST ALWAYS BE PROVIDED.
214 */
215long plpar_hcall(unsigned long opcode,
216 unsigned long arg1,
217 unsigned long arg2,
218 unsigned long arg3,
219 unsigned long arg4,
220 unsigned long *out1,
221 unsigned long *out2,
222 unsigned long *out3);
223
224/* Same as plpar_hcall but for those opcodes that return no values
225 * other than status. Slightly more efficient.
226 */ 222 */
227long plpar_hcall_norets(unsigned long opcode, ...); 223long plpar_hcall_norets(unsigned long opcode, ...);
228 224
229/* 225/**
230 * Special hcall interface for ibmveth support. 226 * plpar_hcall: - Make a pseries hypervisor call
231 * Takes 8 input parms. Returns a rc and stores the 227 * @opcode: The hypervisor call to make.
232 * R4 return value in *out1. 228 * @retbuf: Buffer to store up to 4 return arguments in.
233 */
234long plpar_hcall_8arg_2ret(unsigned long opcode,
235 unsigned long arg1,
236 unsigned long arg2,
237 unsigned long arg3,
238 unsigned long arg4,
239 unsigned long arg5,
240 unsigned long arg6,
241 unsigned long arg7,
242 unsigned long arg8,
243 unsigned long *out1);
244
245/* plpar_hcall_4out()
246 * 229 *
247 * same as plpar_hcall except with 4 output arguments. 230 * This call supports up to 6 arguments and 4 return arguments. Use
231 * PLPAR_HCALL_BUFSIZE to size the return argument buffer.
248 * 232 *
233 * Used for all but the craziest of phyp interfaces (see plpar_hcall9)
249 */ 234 */
250long plpar_hcall_4out(unsigned long opcode, 235#define PLPAR_HCALL_BUFSIZE 4
251 unsigned long arg1, 236long plpar_hcall(unsigned long opcode, unsigned long *retbuf, ...);
252 unsigned long arg2,
253 unsigned long arg3,
254 unsigned long arg4,
255 unsigned long *out1,
256 unsigned long *out2,
257 unsigned long *out3,
258 unsigned long *out4);
259 237
260long plpar_hcall_7arg_7ret(unsigned long opcode, 238/**
261 unsigned long arg1, 239 * plpar_hcall9: - Make a pseries hypervisor call with up to 9 return arguments
262 unsigned long arg2, 240 * @opcode: The hypervisor call to make.
263 unsigned long arg3, 241 * @retbuf: Buffer to store up to 9 return arguments in.
264 unsigned long arg4, 242 *
265 unsigned long arg5, 243 * This call supports up to 9 arguments and 9 return arguments. Use
266 unsigned long arg6, 244 * PLPAR_HCALL9_BUFSIZE to size the return argument buffer.
267 unsigned long arg7, 245 */
268 unsigned long *out1, 246#define PLPAR_HCALL9_BUFSIZE 9
269 unsigned long *out2, 247long plpar_hcall9(unsigned long opcode, unsigned long *retbuf, ...);
270 unsigned long *out3,
271 unsigned long *out4,
272 unsigned long *out5,
273 unsigned long *out6,
274 unsigned long *out7);
275 248
276long plpar_hcall_9arg_9ret(unsigned long opcode, 249/* For hcall instrumentation. One structure per-hcall, per-CPU */
277 unsigned long arg1, 250struct hcall_stats {
278 unsigned long arg2, 251 unsigned long num_calls; /* number of calls (on this CPU) */
279 unsigned long arg3, 252 unsigned long tb_total; /* total wall time (mftb) of calls. */
280 unsigned long arg4, 253 unsigned long purr_total; /* total cpu time (PURR) of calls. */
281 unsigned long arg5, 254};
282 unsigned long arg6, 255void update_hcall_stats(unsigned long opcode, unsigned long tb_delta,
283 unsigned long arg7, 256 unsigned long purr_delta);
284 unsigned long arg8, 257#define HCALL_STAT_ARRAY_SIZE ((MAX_HCALL_OPCODE >> 2) + 1)
285 unsigned long arg9,
286 unsigned long *out1,
287 unsigned long *out2,
288 unsigned long *out3,
289 unsigned long *out4,
290 unsigned long *out5,
291 unsigned long *out6,
292 unsigned long *out7,
293 unsigned long *out8,
294 unsigned long *out9);
295 258
296#endif /* __ASSEMBLY__ */ 259#endif /* __ASSEMBLY__ */
297#endif /* __KERNEL__ */ 260#endif /* __KERNEL__ */