diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2024-11-07 18:11:37 +0300 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2024-11-13 16:31:32 +0300 |
commit | ca6dd1faa0220483cb2f9d22e0556ba9d48c90bd (patch) | |
tree | 71b1c1bbeaf7f495587ae9c2c9c3692e8ad7b184 | |
parent | d4e50cfe9c75f4d3caab62c7227152db10d23c82 (diff) | |
download | linux-ca6dd1faa0220483cb2f9d22e0556ba9d48c90bd.tar.xz |
s390/cpcmd: Convert to use flag output macros
Use flag output macros in inline asm to allow for better code generation if
the compiler has support for the flag output constraint.
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-rw-r--r-- | arch/s390/kernel/cpcmd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/s390/kernel/cpcmd.c b/arch/s390/kernel/cpcmd.c index b210a29d3ee9..2f4174b961de 100644 --- a/arch/s390/kernel/cpcmd.c +++ b/arch/s390/kernel/cpcmd.c @@ -20,6 +20,7 @@ #include <asm/diag.h> #include <asm/ebcdic.h> #include <asm/cpcmd.h> +#include <asm/asm.h> static DEFINE_SPINLOCK(cpcmd_lock); static char cpcmd_buf[241]; @@ -45,12 +46,11 @@ static int diag8_response(int cmdlen, char *response, int *rlen) ry.odd = *rlen; asm volatile( " diag %[rx],%[ry],0x8\n" - " ipm %[cc]\n" - " srl %[cc],28\n" - : [cc] "=&d" (cc), [ry] "+&d" (ry.pair) + CC_IPM(cc) + : CC_OUT(cc, cc), [ry] "+d" (ry.pair) : [rx] "d" (rx.pair) - : "cc"); - if (cc) + : CC_CLOBBER); + if (CC_TRANSFORM(cc)) *rlen += ry.odd; else *rlen = ry.odd; |