Skip to content

Commit f62ad90

Browse files
committed
s390/cio/qdio: 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>
1 parent 6816e21 commit f62ad90

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

drivers/s390/cio/qdio_main.c

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <linux/atomic.h>
1818
#include <asm/debug.h>
1919
#include <asm/qdio.h>
20+
#include <asm/asm.h>
2021
#include <asm/ipl.h>
2122

2223
#include "cio.h"
@@ -42,13 +43,12 @@ static inline int do_siga_sync(unsigned long schid,
4243
" lgr 2,%[out]\n"
4344
" lgr 3,%[in]\n"
4445
" siga 0\n"
45-
" ipm %[cc]\n"
46-
" srl %[cc],28\n"
47-
: [cc] "=&d" (cc)
46+
CC_IPM(cc)
47+
: CC_OUT(cc, cc)
4848
: [fc] "d" (fc), [schid] "d" (schid),
4949
[out] "d" (out_mask), [in] "d" (in_mask)
50-
: "cc", "0", "1", "2", "3");
51-
return cc;
50+
: CC_CLOBBER_LIST("0", "1", "2", "3"));
51+
return CC_TRANSFORM(cc);
5252
}
5353

5454
static inline int do_siga_input(unsigned long schid, unsigned long mask,
@@ -61,12 +61,11 @@ static inline int do_siga_input(unsigned long schid, unsigned long mask,
6161
" lgr 1,%[schid]\n"
6262
" lgr 2,%[mask]\n"
6363
" siga 0\n"
64-
" ipm %[cc]\n"
65-
" srl %[cc],28\n"
66-
: [cc] "=&d" (cc)
64+
CC_IPM(cc)
65+
: CC_OUT(cc, cc)
6766
: [fc] "d" (fc), [schid] "d" (schid), [mask] "d" (mask)
68-
: "cc", "0", "1", "2");
69-
return cc;
67+
: CC_CLOBBER_LIST("0", "1", "2"));
68+
return CC_TRANSFORM(cc);
7069
}
7170

7271
/**
@@ -93,13 +92,12 @@ static inline int do_siga_output(unsigned long schid, unsigned long mask,
9392
" lgr 3,%[aob]\n"
9493
" siga 0\n"
9594
" lgr %[fc],0\n"
96-
" ipm %[cc]\n"
97-
" srl %[cc],28\n"
98-
: [cc] "=&d" (cc), [fc] "+&d" (fc)
95+
CC_IPM(cc)
96+
: CC_OUT(cc, cc), [fc] "+&d" (fc)
9997
: [schid] "d" (schid), [mask] "d" (mask), [aob] "d" (aob)
100-
: "cc", "0", "1", "2", "3");
98+
: CC_CLOBBER_LIST("0", "1", "2", "3"));
10199
*bb = fc >> 31;
102-
return cc;
100+
return CC_TRANSFORM(cc);
103101
}
104102

105103
/**

0 commit comments

Comments
 (0)