Skip to content

Commit ca6dd1f

Browse files
committed
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 <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent d4e50cf commit ca6dd1f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/s390/kernel/cpcmd.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <asm/diag.h>
2121
#include <asm/ebcdic.h>
2222
#include <asm/cpcmd.h>
23+
#include <asm/asm.h>
2324

2425
static DEFINE_SPINLOCK(cpcmd_lock);
2526
static char cpcmd_buf[241];
@@ -45,12 +46,11 @@ static int diag8_response(int cmdlen, char *response, int *rlen)
4546
ry.odd = *rlen;
4647
asm volatile(
4748
" diag %[rx],%[ry],0x8\n"
48-
" ipm %[cc]\n"
49-
" srl %[cc],28\n"
50-
: [cc] "=&d" (cc), [ry] "+&d" (ry.pair)
49+
CC_IPM(cc)
50+
: CC_OUT(cc, cc), [ry] "+d" (ry.pair)
5151
: [rx] "d" (rx.pair)
52-
: "cc");
53-
if (cc)
52+
: CC_CLOBBER);
53+
if (CC_TRANSFORM(cc))
5454
*rlen += ry.odd;
5555
else
5656
*rlen = ry.odd;

0 commit comments

Comments
 (0)