]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/checksum: 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:21 +0000 (16:41 +0200)
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/checksum.h

index a8c02cfbc712f7a5606a404e3f7c4a2891046573..cdd19d3263458338031ff86bbd0b7d739a812a21 100644 (file)
  */
 static inline __wsum csum_partial(const void *buff, int len, __wsum sum)
 {
-       register unsigned long reg2 asm("2") = (unsigned long) buff;
-       register unsigned long reg3 asm("3") = (unsigned long) len;
+       union register_pair rp = {
+               .even = (unsigned long) buff,
+               .odd = (unsigned long) len,
+       };
 
        asm volatile(
-               "0:     cksm    %0,%1\n"        /* do checksum on longs */
+               "0:     cksm    %[sum],%[rp]\n"
                "       jo      0b\n"
-               : "+d" (sum), "+d" (reg2), "+d" (reg3) : : "cc", "memory");
+               : [sum] "+&d" (sum), [rp] "+&d" (rp.pair) : : "cc", "memory");
        return sum;
 }