diff options
author | Anton Blanchard <anton@samba.org> | 2006-07-18 18:01:28 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-08-01 02:19:15 -0400 |
commit | b9377ffc3a03cde558d76349a262a1adbb6d3112 (patch) | |
tree | c61fcdb732d06c64b9c5634953e46cefdf6af846 /arch/powerpc/kernel/rtas.c | |
parent | 57cad8084e0837e0f2c97da789ec9b3f36809be9 (diff) |
[POWERPC] clean up pseries hcall interfaces
Our pseries hcall interfaces are out of control:
plpar_hcall_norets
plpar_hcall
plpar_hcall_8arg_2ret
plpar_hcall_4out
plpar_hcall_7arg_7ret
plpar_hcall_9arg_9ret
Create 3 interfaces to cover all cases:
plpar_hcall_norets: 7 arguments no returns
plpar_hcall: 6 arguments 4 returns
plpar_hcall9: 9 arguments 9 returns
There are only 2 cases in the kernel that need plpar_hcall9, hopefully
we can keep it that way.
Pass in a buffer to stash return parameters so we avoid the &dummy1,
&dummy2 madness.
Signed-off-by: Anton Blanchard <anton@samba.org>
--
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/rtas.c')
-rw-r--r-- | arch/powerpc/kernel/rtas.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 10e10be324c9..14353b8789dd 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -668,15 +668,14 @@ static int rtas_ibm_suspend_me(struct rtas_args *args) | |||
668 | int i; | 668 | int i; |
669 | long state; | 669 | long state; |
670 | long rc; | 670 | long rc; |
671 | unsigned long dummy; | 671 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; |
672 | |||
673 | struct rtas_suspend_me_data data; | 672 | struct rtas_suspend_me_data data; |
674 | 673 | ||
675 | /* Make sure the state is valid */ | 674 | /* Make sure the state is valid */ |
676 | rc = plpar_hcall(H_VASI_STATE, | 675 | rc = plpar_hcall(H_VASI_STATE, retbuf, |
677 | ((u64)args->args[0] << 32) | args->args[1], | 676 | ((u64)args->args[0] << 32) | args->args[1]); |
678 | 0, 0, 0, | 677 | |
679 | &state, &dummy, &dummy); | 678 | state = retbuf[0]; |
680 | 679 | ||
681 | if (rc) { | 680 | if (rc) { |
682 | printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned %ld\n",rc); | 681 | printk(KERN_ERR "rtas_ibm_suspend_me: vasi_state returned %ld\n",rc); |