summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2021-06-22 14:50:27 +0200
committerVasily Gorbik <gor@linux.ibm.com>2021-06-28 11:18:29 +0200
commit7496209a8944efd7b7feb2a0f960419c077c94d1 (patch)
treee57555bff8143c84da5c43f14a09b3fc17b60fde /drivers/s390
parentb94bcca28342e676126431917f7c1e8d3f6b8b18 (diff)
downloadlinux-7496209a8944efd7b7feb2a0f960419c077c94d1.tar.gz
linux-7496209a8944efd7b7feb2a0f960419c077c94d1.tar.bz2
linux-7496209a8944efd7b7feb2a0f960419c077c94d1.zip
s390/ioasm: use symbolic names for asm operands
Change remaining inline assemblies to also use symbolic names for operands, use "Q" constraint when possible, and use "+" modifier so that an operand needs to be specified only once. Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/cio/ioasm.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/s390/cio/ioasm.c b/drivers/s390/cio/ioasm.c
index 1c2866c66f0d..180913007824 100644
--- a/drivers/s390/cio/ioasm.c
+++ b/drivers/s390/cio/ioasm.c
@@ -158,11 +158,11 @@ int tpi(struct tpi_info *addr)
int ccode;
asm volatile(
- " tpi 0(%2)\n"
- " ipm %0\n"
- " srl %0,28"
- : "=d" (ccode), "=m" (*addr)
- : "a" (addr)
+ " tpi %[addr]\n"
+ " ipm %[cc]\n"
+ " srl %[cc],28"
+ : [cc] "=&d" (ccode), [addr] "=Q" (*addr)
+ :
: "cc");
trace_s390_cio_tpi(addr, ccode);
@@ -175,13 +175,13 @@ int chsc(void *chsc_area)
int cc = -EIO;
asm volatile(
- " .insn rre,0xb25f0000,%2,0\n"
- "0: ipm %0\n"
- " srl %0,28\n"
+ " .insn rre,0xb25f0000,%[chsc_area],0\n"
+ "0: ipm %[cc]\n"
+ " srl %[cc],28\n"
"1:\n"
EX_TABLE(0b, 1b)
- : "+d" (cc), "=m" (*(addr_type *) chsc_area)
- : "d" (chsc_area), "m" (*(addr_type *) chsc_area)
+ : [cc] "+&d" (cc), "+m" (*(addr_type *)chsc_area)
+ : [chsc_area] "d" (chsc_area)
: "cc");
trace_s390_cio_chsc(chsc_area, cc);
@@ -273,11 +273,11 @@ static inline int __stcrw(struct crw *crw)
int ccode;
asm volatile(
- " stcrw 0(%2)\n"
- " ipm %0\n"
- " srl %0,28\n"
- : "=d" (ccode), "=m" (*crw)
- : "a" (crw)
+ " stcrw %[crw]\n"
+ " ipm %[cc]\n"
+ " srl %[cc],28\n"
+ : [cc] "=&d" (ccode), [crw] "=Q" (*crw)
+ :
: "cc");
return ccode;
}