Skip to content

Commit a6122f6

Browse files
committed
s390/diag: 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 5a5897d commit a6122f6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

arch/s390/kernel/diag.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <asm/diag.h>
1717
#include <asm/trace/diag.h>
1818
#include <asm/sections.h>
19+
#include <asm/asm.h>
1920
#include "entry.h"
2021

2122
struct diag_stat {
@@ -307,16 +308,15 @@ EXPORT_SYMBOL(diag26c);
307308

308309
int diag49c(unsigned long subcode)
309310
{
310-
int rc;
311+
int cc;
311312

312313
diag_stat_inc(DIAG_STAT_X49C);
313314
asm volatile(
314315
" diag %[subcode],0,0x49c\n"
315-
" ipm %[rc]\n"
316-
" srl %[rc],28\n"
317-
: [rc] "=d" (rc)
316+
CC_IPM(cc)
317+
: CC_OUT(cc, cc)
318318
: [subcode] "d" (subcode)
319-
: "cc");
320-
return rc;
319+
: CC_CLOBBER);
320+
return CC_TRANSFORM(cc);
321321
}
322322
EXPORT_SYMBOL(diag49c);

0 commit comments

Comments
 (0)