Skip to content

Commit 0b7265a

Browse files
committed
s390/extmem: 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 0caf91f commit 0b7265a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

arch/s390/mm/extmem.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <asm/extmem.h>
2929
#include <asm/cpcmd.h>
3030
#include <asm/setup.h>
31+
#include <asm/asm.h>
3132

3233
#define DCSS_PURGESEG 0x08
3334
#define DCSS_LOADSHRX 0x20
@@ -134,20 +135,21 @@ dcss_diag(int *func, void *parameter,
134135
unsigned long *ret1, unsigned long *ret2)
135136
{
136137
unsigned long rx, ry;
137-
int rc;
138+
int cc;
138139

139140
rx = virt_to_phys(parameter);
140141
ry = (unsigned long) *func;
141142

142143
diag_stat_inc(DIAG_STAT_X064);
143144
asm volatile(
144-
" diag %0,%1,0x64\n"
145-
" ipm %2\n"
146-
" srl %2,28\n"
147-
: "+d" (rx), "+d" (ry), "=d" (rc) : : "cc");
145+
" diag %[rx],%[ry],0x64\n"
146+
CC_IPM(cc)
147+
: CC_OUT(cc, cc), [rx] "+d" (rx), [ry] "+d" (ry)
148+
:
149+
: CC_CLOBBER);
148150
*ret1 = rx;
149151
*ret2 = ry;
150-
return rc;
152+
return CC_TRANSFORM(cc);
151153
}
152154

153155
static inline int

0 commit comments

Comments
 (0)