]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/cio/qdio: Convert to use flag output macros
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 7 Nov 2024 15:11:52 +0000 (16:11 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 13 Nov 2024 13:31:34 +0000 (14:31 +0100)
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>
drivers/s390/cio/qdio_main.c

index b711bb17f9da92a82043fc48bf3d5ac703146acf..07e82816b77adfc4c21cb62cec21ec786994bc27 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/atomic.h>
 #include <asm/debug.h>
 #include <asm/qdio.h>
+#include <asm/asm.h>
 #include <asm/ipl.h>
 
 #include "cio.h"
@@ -42,13 +43,12 @@ static inline int do_siga_sync(unsigned long schid,
                "       lgr     2,%[out]\n"
                "       lgr     3,%[in]\n"
                "       siga    0\n"
-               "       ipm     %[cc]\n"
-               "       srl     %[cc],28\n"
-               : [cc] "=&d" (cc)
+               CC_IPM(cc)
+               : CC_OUT(cc, cc)
                : [fc] "d" (fc), [schid] "d" (schid),
                  [out] "d" (out_mask), [in] "d" (in_mask)
-               : "cc", "0", "1", "2", "3");
-       return cc;
+               : CC_CLOBBER_LIST("0", "1", "2", "3"));
+       return CC_TRANSFORM(cc);
 }
 
 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,
                "       lgr     1,%[schid]\n"
                "       lgr     2,%[mask]\n"
                "       siga    0\n"
-               "       ipm     %[cc]\n"
-               "       srl     %[cc],28\n"
-               : [cc] "=&d" (cc)
+               CC_IPM(cc)
+               : CC_OUT(cc, cc)
                : [fc] "d" (fc), [schid] "d" (schid), [mask] "d" (mask)
-               : "cc", "0", "1", "2");
-       return cc;
+               : CC_CLOBBER_LIST("0", "1", "2"));
+       return CC_TRANSFORM(cc);
 }
 
 /**
@@ -93,13 +92,12 @@ static inline int do_siga_output(unsigned long schid, unsigned long mask,
                "       lgr     3,%[aob]\n"
                "       siga    0\n"
                "       lgr     %[fc],0\n"
-               "       ipm     %[cc]\n"
-               "       srl     %[cc],28\n"
-               : [cc] "=&d" (cc), [fc] "+&d" (fc)
+               CC_IPM(cc)
+               : CC_OUT(cc, cc), [fc] "+&d" (fc)
                : [schid] "d" (schid), [mask] "d" (mask), [aob] "d" (aob)
-               : "cc", "0", "1", "2", "3");
+               : CC_CLOBBER_LIST("0", "1", "2", "3"));
        *bb = fc >> 31;
-       return cc;
+       return CC_TRANSFORM(cc);
 }
 
 /**