]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/sthyi: use register pair instead of register asm
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 9 Jun 2021 20:59:13 +0000 (22:59 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Fri, 18 Jun 2021 14:41:22 +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/sthyi.c

index 888cc2f166db726d8e5c967c4082e781cc6137f4..4d141e2c132e5d5ad38ef6b132c69f4f607fd899 100644 (file)
@@ -395,19 +395,18 @@ out:
 
 static int sthyi(u64 vaddr, u64 *rc)
 {
-       register u64 code asm("0") = 0;
-       register u64 addr asm("2") = vaddr;
-       register u64 rcode asm("3");
+       union register_pair r1 = { .even = 0, }; /* subcode */
+       union register_pair r2 = { .even = vaddr, };
        int cc;
 
        asm volatile(
-               ".insn   rre,0xB2560000,%[code],%[addr]\n"
+               ".insn   rre,0xB2560000,%[r1],%[r2]\n"
                "ipm     %[cc]\n"
                "srl     %[cc],28\n"
-               : [cc] "=d" (cc), "=d" (rcode)
-               : [code] "d" (code), [addr] "a" (addr)
+               : [cc] "=&d" (cc), [r2] "+&d" (r2.pair)
+               : [r1] "d" (r1.pair)
                : "memory", "cc");
-       *rc = rcode;
+       *rc = r2.odd;
        return cc;
 }