diff options
Diffstat (limited to 'include/asm-powerpc/hvcall.h')
-rw-r--r-- | include/asm-powerpc/hvcall.h | 105 |
1 files changed, 25 insertions, 80 deletions
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h index f07ae50cbc2c..63ce1ac8c1f4 100644 --- a/include/asm-powerpc/hvcall.h +++ b/include/asm-powerpc/hvcall.h | |||
@@ -212,94 +212,39 @@ | |||
212 | 212 | ||
213 | #ifndef __ASSEMBLY__ | 213 | #ifndef __ASSEMBLY__ |
214 | 214 | ||
215 | /* 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. | ||
216 | * | 218 | * |
217 | * The actual call interface is a hypervisor call instruction with | 219 | * This call supports up to 7 arguments and only returns the status of |
218 | * the opcode in R3 and input args in R4-R7. | 220 | * the hcall. Use this version where possible, its slightly faster than |
219 | * Status is returned in R3 with variable output values in R4-R11. | 221 | * the other plpar_hcalls. |
220 | * Only H_PTE_READ with H_READ_4 uses R6-R11 so we ignore it for now | ||
221 | * and return only two out args which MUST ALWAYS BE PROVIDED. | ||
222 | */ | ||
223 | long plpar_hcall(unsigned long opcode, | ||
224 | unsigned long arg1, | ||
225 | unsigned long arg2, | ||
226 | unsigned long arg3, | ||
227 | unsigned long arg4, | ||
228 | unsigned long *out1, | ||
229 | unsigned long *out2, | ||
230 | unsigned long *out3); | ||
231 | |||
232 | /* Same as plpar_hcall but for those opcodes that return no values | ||
233 | * other than status. Slightly more efficient. | ||
234 | */ | 222 | */ |
235 | long plpar_hcall_norets(unsigned long opcode, ...); | 223 | long plpar_hcall_norets(unsigned long opcode, ...); |
236 | 224 | ||
237 | /* | 225 | /** |
238 | * Special hcall interface for ibmveth support. | 226 | * plpar_hcall: - Make a pseries hypervisor call |
239 | * Takes 8 input parms. Returns a rc and stores the | 227 | * @opcode: The hypervisor call to make. |
240 | * R4 return value in *out1. | 228 | * @retbuf: Buffer to store up to 4 return arguments in. |
241 | */ | ||
242 | long plpar_hcall_8arg_2ret(unsigned long opcode, | ||
243 | unsigned long arg1, | ||
244 | unsigned long arg2, | ||
245 | unsigned long arg3, | ||
246 | unsigned long arg4, | ||
247 | unsigned long arg5, | ||
248 | unsigned long arg6, | ||
249 | unsigned long arg7, | ||
250 | unsigned long arg8, | ||
251 | unsigned long *out1); | ||
252 | |||
253 | /* plpar_hcall_4out() | ||
254 | * | 229 | * |
255 | * 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. | ||
256 | * | 232 | * |
233 | * Used for all but the craziest of phyp interfaces (see plpar_hcall9) | ||
257 | */ | 234 | */ |
258 | long plpar_hcall_4out(unsigned long opcode, | 235 | #define PLPAR_HCALL_BUFSIZE 4 |
259 | unsigned long arg1, | 236 | long plpar_hcall(unsigned long opcode, unsigned long *retbuf, ...); |
260 | unsigned long arg2, | ||
261 | unsigned long arg3, | ||
262 | unsigned long arg4, | ||
263 | unsigned long *out1, | ||
264 | unsigned long *out2, | ||
265 | unsigned long *out3, | ||
266 | unsigned long *out4); | ||
267 | 237 | ||
268 | long plpar_hcall_7arg_7ret(unsigned long opcode, | 238 | /** |
269 | unsigned long arg1, | 239 | * plpar_hcall9: - Make a pseries hypervisor call with up to 9 return arguments |
270 | unsigned long arg2, | 240 | * @opcode: The hypervisor call to make. |
271 | unsigned long arg3, | 241 | * @retbuf: Buffer to store up to 9 return arguments in. |
272 | unsigned long arg4, | 242 | * |
273 | unsigned long arg5, | 243 | * This call supports up to 9 arguments and 9 return arguments. Use |
274 | unsigned long arg6, | 244 | * PLPAR_HCALL9_BUFSIZE to size the return argument buffer. |
275 | unsigned long arg7, | 245 | */ |
276 | unsigned long *out1, | 246 | #define PLPAR_HCALL9_BUFSIZE 9 |
277 | unsigned long *out2, | 247 | long plpar_hcall9(unsigned long opcode, unsigned long *retbuf, ...); |
278 | unsigned long *out3, | ||
279 | unsigned long *out4, | ||
280 | unsigned long *out5, | ||
281 | unsigned long *out6, | ||
282 | unsigned long *out7); | ||
283 | |||
284 | long plpar_hcall_9arg_9ret(unsigned long opcode, | ||
285 | unsigned long arg1, | ||
286 | unsigned long arg2, | ||
287 | unsigned long arg3, | ||
288 | unsigned long arg4, | ||
289 | unsigned long arg5, | ||
290 | unsigned long arg6, | ||
291 | unsigned long arg7, | ||
292 | unsigned long arg8, | ||
293 | unsigned long arg9, | ||
294 | unsigned long *out1, | ||
295 | unsigned long *out2, | ||
296 | unsigned long *out3, | ||
297 | unsigned long *out4, | ||
298 | unsigned long *out5, | ||
299 | unsigned long *out6, | ||
300 | unsigned long *out7, | ||
301 | unsigned long *out8, | ||
302 | unsigned long *out9); | ||
303 | 248 | ||
304 | #endif /* __ASSEMBLY__ */ | 249 | #endif /* __ASSEMBLY__ */ |
305 | #endif /* __KERNEL__ */ | 250 | #endif /* __KERNEL__ */ |