aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHeiko J Schick <schihei@de.ibm.com>2006-03-30 15:47:14 -0500
committerPaul Mackerras <paulus@samba.org>2006-04-01 06:37:00 -0500
commitb13a96cfb055fd4b9c61463f87534a6f406b174b (patch)
tree4ab32133b1a786ef9bd9448ffadff0f2fc9c36bf /arch
parent706c8c93ba4865a19e981b9770151a7a63c15794 (diff)
[PATCH] powerpc: Extends HCALL interface for InfiniBand usage
This extends the HCALL interface for InfiniBand usage. I've made the patch against the linux-2.6 git tree and Segher's patch: [PATCH] Change H_StudlyCaps to H_SHOUTING_CAPS We moved this into the common powerpc code based on comments we got after posting the first eHCA InfiniBand device driver patch. Signed-off-by: Heiko j Schick <schickhj@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/pseries/hvCall.S100
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c3
2 files changed, 102 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S
index db7c19fe9297..c9ff547f9d25 100644
--- a/arch/powerpc/platforms/pseries/hvCall.S
+++ b/arch/powerpc/platforms/pseries/hvCall.S
@@ -127,3 +127,103 @@ _GLOBAL(plpar_hcall_4out)
127 127
128 mtcrf 0xff,r0 128 mtcrf 0xff,r0
129 blr /* return r3 = status */ 129 blr /* return r3 = status */
130
131/* plpar_hcall_7arg_7ret(unsigned long opcode, R3
132 unsigned long arg1, R4
133 unsigned long arg2, R5
134 unsigned long arg3, R6
135 unsigned long arg4, R7
136 unsigned long arg5, R8
137 unsigned long arg6, R9
138 unsigned long arg7, R10
139 unsigned long *out1, 112(R1)
140 unsigned long *out2, 110(R1)
141 unsigned long *out3, 108(R1)
142 unsigned long *out4, 106(R1)
143 unsigned long *out5, 104(R1)
144 unsigned long *out6, 102(R1)
145 unsigned long *out7); 100(R1)
146*/
147_GLOBAL(plpar_hcall_7arg_7ret)
148 HMT_MEDIUM
149
150 mfcr r0
151 stw r0,8(r1)
152
153 HVSC /* invoke the hypervisor */
154
155 lwz r0,8(r1)
156
157 ld r11,STK_PARM(r11)(r1) /* Fetch r4 ret arg */
158 std r4,0(r11)
159 ld r11,STK_PARM(r12)(r1) /* Fetch r5 ret arg */
160 std r5,0(r11)
161 ld r11,STK_PARM(r13)(r1) /* Fetch r6 ret arg */
162 std r6,0(r11)
163 ld r11,STK_PARM(r14)(r1) /* Fetch r7 ret arg */
164 std r7,0(r11)
165 ld r11,STK_PARM(r15)(r1) /* Fetch r8 ret arg */
166 std r8,0(r11)
167 ld r11,STK_PARM(r16)(r1) /* Fetch r9 ret arg */
168 std r9,0(r11)
169 ld r11,STK_PARM(r17)(r1) /* Fetch r10 ret arg */
170 std r10,0(r11)
171
172 mtcrf 0xff,r0
173
174 blr /* return r3 = status */
175
176/* plpar_hcall_9arg_9ret(unsigned long opcode, R3
177 unsigned long arg1, R4
178 unsigned long arg2, R5
179 unsigned long arg3, R6
180 unsigned long arg4, R7
181 unsigned long arg5, R8
182 unsigned long arg6, R9
183 unsigned long arg7, R10
184 unsigned long arg8, 112(R1)
185 unsigned long arg9, 110(R1)
186 unsigned long *out1, 108(R1)
187 unsigned long *out2, 106(R1)
188 unsigned long *out3, 104(R1)
189 unsigned long *out4, 102(R1)
190 unsigned long *out5, 100(R1)
191 unsigned long *out6, 98(R1)
192 unsigned long *out7); 96(R1)
193 unsigned long *out8, 94(R1)
194 unsigned long *out9, 92(R1)
195*/
196_GLOBAL(plpar_hcall_9arg_9ret)
197 HMT_MEDIUM
198
199 mfcr r0
200 stw r0,8(r1)
201
202 ld r11,STK_PARM(r11)(r1) /* put arg8 in R11 */
203 ld r12,STK_PARM(r12)(r1) /* put arg9 in R12 */
204
205 HVSC /* invoke the hypervisor */
206
207 ld r0,STK_PARM(r13)(r1) /* Fetch r4 ret arg */
208 stdx r4,r0,r0
209 ld r0,STK_PARM(r14)(r1) /* Fetch r5 ret arg */
210 stdx r5,r0,r0
211 ld r0,STK_PARM(r15)(r1) /* Fetch r6 ret arg */
212 stdx r6,r0,r0
213 ld r0,STK_PARM(r16)(r1) /* Fetch r7 ret arg */
214 stdx r7,r0,r0
215 ld r0,STK_PARM(r17)(r1) /* Fetch r8 ret arg */
216 stdx r8,r0,r0
217 ld r0,STK_PARM(r18)(r1) /* Fetch r9 ret arg */
218 stdx r9,r0,r0
219 ld r0,STK_PARM(r19)(r1) /* Fetch r10 ret arg */
220 stdx r10,r0,r0
221 ld r0,STK_PARM(r20)(r1) /* Fetch r11 ret arg */
222 stdx r11,r0,r0
223 ld r0,STK_PARM(r21)(r1) /* Fetch r12 ret arg */
224 stdx r12,r0,r0
225
226 lwz r0,8(r1)
227 mtcrf 0xff,r0
228
229 blr /* return r3 = status */
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index c72c0918b44b..634b7d06d3cc 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -54,7 +54,8 @@ EXPORT_SYMBOL(plpar_hcall);
54EXPORT_SYMBOL(plpar_hcall_4out); 54EXPORT_SYMBOL(plpar_hcall_4out);
55EXPORT_SYMBOL(plpar_hcall_norets); 55EXPORT_SYMBOL(plpar_hcall_norets);
56EXPORT_SYMBOL(plpar_hcall_8arg_2ret); 56EXPORT_SYMBOL(plpar_hcall_8arg_2ret);
57 57EXPORT_SYMBOL(plpar_hcall_7arg_7ret);
58EXPORT_SYMBOL(plpar_hcall_9arg_9ret);
58extern void pSeries_find_serial_port(void); 59extern void pSeries_find_serial_port(void);
59 60
60 61