]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/sysinfo: get rid of register asm
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 14 Jun 2021 17:54:42 +0000 (19:54 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Fri, 18 Jun 2021 14:41:23 +0000 (16:41 +0200)
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/sysinfo.c

index 2ac3c9b56a13e8e60cacf0bcfc3c66165e7fdb7f..ef3f2659876cb8359109da86036e80146ec4ccb8 100644 (file)
@@ -25,19 +25,22 @@ int topology_max_mnest;
 
 static inline int __stsi(void *sysinfo, int fc, int sel1, int sel2, int *lvl)
 {
-       register int r0 asm("0") = (fc << 28) | sel1;
-       register int r1 asm("1") = sel2;
+       int r0 = (fc << 28) | sel1;
        int rc = 0;
 
        asm volatile(
-               "       stsi    0(%3)\n"
+               "       lr      0,%[r0]\n"
+               "       lr      1,%[r1]\n"
+               "       stsi    0(%[sysinfo])\n"
                "0:     jz      2f\n"
-               "1:     lhi     %1,%4\n"
-               "2:\n"
+               "1:     lhi     %[rc],%[retval]\n"
+               "2:     lr      %[r0],0\n"
                EX_TABLE(0b, 1b)
-               : "+d" (r0), "+d" (rc)
-               : "d" (r1), "a" (sysinfo), "K" (-EOPNOTSUPP)
-               : "cc", "memory");
+               : [r0] "+d" (r0), [rc] "+d" (rc)
+               : [r1] "d" (sel2),
+                 [sysinfo] "a" (sysinfo),
+                 [retval] "K" (-EOPNOTSUPP)
+               : "cc", "0", "1", "memory");
        *lvl = ((unsigned int) r0) >> 28;
        return rc;
 }