diff options
Diffstat (limited to 'drivers/s390/net/iucv.c')
-rw-r--r-- | drivers/s390/net/iucv.c | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c index 821dde86e240..809dd8d7f47a 100644 --- a/drivers/s390/net/iucv.c +++ b/drivers/s390/net/iucv.c | |||
@@ -534,19 +534,15 @@ iucv_add_handler (handler *new) | |||
534 | * | 534 | * |
535 | * Returns: return code from CP's IUCV call | 535 | * Returns: return code from CP's IUCV call |
536 | */ | 536 | */ |
537 | static __inline__ ulong | 537 | static inline ulong b2f0(__u32 code, void *parm) |
538 | b2f0(__u32 code, void *parm) | ||
539 | { | 538 | { |
539 | register unsigned long reg0 asm ("0"); | ||
540 | register unsigned long reg1 asm ("1"); | ||
540 | iucv_dumpit("iparml before b2f0 call:", parm, sizeof(iucv_param)); | 541 | iucv_dumpit("iparml before b2f0 call:", parm, sizeof(iucv_param)); |
541 | 542 | ||
542 | asm volatile ( | 543 | reg0 = code; |
543 | "LRA 1,0(%1)\n\t" | 544 | reg1 = virt_to_phys(parm); |
544 | "LR 0,%0\n\t" | 545 | asm volatile(".long 0xb2f01000" : : "d" (reg0), "a" (reg1)); |
545 | ".long 0xb2f01000" | ||
546 | : | ||
547 | : "d" (code), "a" (parm) | ||
548 | : "0", "1" | ||
549 | ); | ||
550 | 546 | ||
551 | iucv_dumpit("iparml after b2f0 call:", parm, sizeof(iucv_param)); | 547 | iucv_dumpit("iparml after b2f0 call:", parm, sizeof(iucv_param)); |
552 | 548 | ||
@@ -1248,6 +1244,8 @@ iucv_purge (__u16 pathid, __u32 msgid, __u32 srccls, __u32 *audit) | |||
1248 | static int | 1244 | static int |
1249 | iucv_query_generic(int want_maxconn) | 1245 | iucv_query_generic(int want_maxconn) |
1250 | { | 1246 | { |
1247 | register unsigned long reg0 asm ("0"); | ||
1248 | register unsigned long reg1 asm ("1"); | ||
1251 | iparml_purge *parm = (iparml_purge *)grab_param(); | 1249 | iparml_purge *parm = (iparml_purge *)grab_param(); |
1252 | int bufsize, maxconn; | 1250 | int bufsize, maxconn; |
1253 | int ccode; | 1251 | int ccode; |
@@ -1256,18 +1254,15 @@ iucv_query_generic(int want_maxconn) | |||
1256 | * Call b2f0 and store R0 (max buffer size), | 1254 | * Call b2f0 and store R0 (max buffer size), |
1257 | * R1 (max connections) and CC. | 1255 | * R1 (max connections) and CC. |
1258 | */ | 1256 | */ |
1259 | asm volatile ( | 1257 | reg0 = QUERY; |
1260 | "LRA 1,0(%4)\n\t" | 1258 | reg1 = virt_to_phys(parm); |
1261 | "LR 0,%3\n\t" | 1259 | asm volatile( |
1262 | ".long 0xb2f01000\n\t" | 1260 | " .long 0xb2f01000\n" |
1263 | "IPM %0\n\t" | 1261 | " ipm %0\n" |
1264 | "SRL %0,28\n\t" | 1262 | " srl %0,28\n" |
1265 | "ST 0,%1\n\t" | 1263 | : "=d" (ccode), "+d" (reg0), "+d" (reg1) : : "cc"); |
1266 | "ST 1,%2\n\t" | 1264 | bufsize = reg0; |
1267 | : "=d" (ccode), "=m" (bufsize), "=m" (maxconn) | 1265 | maxconn = reg1; |
1268 | : "d" (QUERY), "a" (parm) | ||
1269 | : "0", "1", "cc" | ||
1270 | ); | ||
1271 | release_param(parm); | 1266 | release_param(parm); |
1272 | 1267 | ||
1273 | if (ccode) | 1268 | if (ccode) |