]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/pai: Convert to use flag output macros
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 7 Nov 2024 15:11:40 +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/pai.h

index 25f2077ba3c979744f322bbfb31260449125e298..ebeabd0aaa516aa5a79309984b360636409bc3f8 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/jump_label.h>
 #include <asm/lowcore.h>
 #include <asm/ptrace.h>
+#include <asm/asm.h>
 
 struct qpaci_info_block {
        u64 header;
@@ -33,12 +34,11 @@ static inline int qpaci(struct qpaci_info_block *info)
                "       lgr     0,%[size]\n"
                "       .insn   s,0xb28f0000,%[info]\n"
                "       lgr     %[size],0\n"
-               "       ipm     %[cc]\n"
-               "       srl     %[cc],28\n"
-               : [cc] "=d" (cc), [info] "=Q" (*info), [size] "+&d" (size)
+               CC_IPM(cc)
+               : CC_OUT(cc, cc), [info] "=Q" (*info), [size] "+&d" (size)
                :
-               : "0", "cc", "memory");
-       return cc ? (size + 1) * sizeof(u64) : 0;
+               : CC_CLOBBER_LIST("0", "memory"));
+       return CC_TRANSFORM(cc) ? (size + 1) * sizeof(u64) : 0;
 }
 
 #define PAI_CRYPTO_BASE                        0x1000  /* First event number */