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/platforms/pseries/xics.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/platforms/pseries/xics.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/xics.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 1eab4688be17..c88ec63129f3 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <asm/i8259.h> | 34 | #include <asm/i8259.h> |
35 | 35 | ||
36 | #include "xics.h" | 36 | #include "xics.h" |
37 | #include "plpar_wrappers.h" | ||
37 | 38 | ||
38 | #define XICS_IPI 2 | 39 | #define XICS_IPI 2 |
39 | #define XICS_IRQ_SPURIOUS 0 | 40 | #define XICS_IRQ_SPURIOUS 0 |
@@ -110,27 +111,6 @@ static inline void direct_qirr_info(int n_cpu, u8 value) | |||
110 | /* LPAR low level accessors */ | 111 | /* LPAR low level accessors */ |
111 | 112 | ||
112 | 113 | ||
113 | static inline long plpar_eoi(unsigned long xirr) | ||
114 | { | ||
115 | return plpar_hcall_norets(H_EOI, xirr); | ||
116 | } | ||
117 | |||
118 | static inline long plpar_cppr(unsigned long cppr) | ||
119 | { | ||
120 | return plpar_hcall_norets(H_CPPR, cppr); | ||
121 | } | ||
122 | |||
123 | static inline long plpar_ipi(unsigned long servernum, unsigned long mfrr) | ||
124 | { | ||
125 | return plpar_hcall_norets(H_IPI, servernum, mfrr); | ||
126 | } | ||
127 | |||
128 | static inline long plpar_xirr(unsigned long *xirr_ret) | ||
129 | { | ||
130 | unsigned long dummy; | ||
131 | return plpar_hcall(H_XIRR, 0, 0, 0, 0, xirr_ret, &dummy, &dummy); | ||
132 | } | ||
133 | |||
134 | static inline unsigned int lpar_xirr_info_get(int n_cpu) | 114 | static inline unsigned int lpar_xirr_info_get(int n_cpu) |
135 | { | 115 | { |
136 | unsigned long lpar_rc; | 116 | unsigned long lpar_rc; |