]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/uv: Convert to use flag output macros
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 7 Nov 2024 15:11:41 +0000 (16:11 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 13 Nov 2024 13:31:32 +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>
arch/s390/include/asm/uv.h

index 2da05a9d9dc7d1eb0dd146114acd29a261c3060b..dc332609f2c3f929b7b0bfcf373926e6de192337 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/sched.h>
 #include <asm/page.h>
 #include <asm/gmap.h>
+#include <asm/asm.h>
 
 #define UVC_CC_OK      0
 #define UVC_CC_ERROR   1
@@ -436,13 +437,12 @@ static inline int __uv_call(unsigned long r1, unsigned long r2)
        int cc;
 
        asm volatile(
-               "       .insn rrf,0xB9A40000,%[r1],%[r2],0,0\n"
-               "       ipm     %[cc]\n"
-               "       srl     %[cc],28\n"
-               : [cc] "=d" (cc)
+               "       .insn    rrf,0xb9a40000,%[r1],%[r2],0,0\n"
+               CC_IPM(cc)
+               : CC_OUT(cc, cc)
                : [r1] "a" (r1), [r2] "a" (r2)
-               : "memory", "cc");
-       return cc;
+               : CC_CLOBBER_LIST("memory"));
+       return CC_TRANSFORM(cc);
 }
 
 static inline int uv_call(unsigned long r1, unsigned long r2)