@@ -271,4 +271,17 @@ static inline int stsi(void *addr, int fc, int sel1, int sel2)
return cc;
}
+static inline int servc(uint32_t command, unsigned long sccb)
+{
+ int cc;
+
+ asm volatile(
+ " .insn rre,0xb2200000,%1,%2\n" /* servc %1,%2 */
+ " ipm %0\n"
+ " srl %0,28"
+ : "=&d" (cc) : "d" (command), "a" (sccb)
+ : "cc", "memory");
+ return cc;
+}
+
#endif
@@ -116,12 +116,7 @@ int sclp_service_call(unsigned int command, void *sccb)
int cc;
sclp_setup_int();
- asm volatile(
- " .insn rre,0xb2200000,%1,%2\n" /* servc %1,%2 */
- " ipm %0\n"
- " srl %0,28"
- : "=&d" (cc) : "d" (command), "a" (__pa(sccb))
- : "cc", "memory");
+ cc = servc(command, __pa(sccb));
sclp_wait_busy();
if (cc == 3)
return -1;