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

index 06e55f681a395e56d4aed61f2121fe1bf5adcb2d..deeb32034ad5e98779795df61666afffa73549a9 100644 (file)
@@ -43,6 +43,7 @@
 #include <asm/sclp.h>
 #include <asm/cpacf.h>
 #include <asm/timex.h>
+#include <asm/asm.h>
 #include <asm/fpu.h>
 #include <asm/ap.h>
 #include <asm/uv.h>
@@ -340,12 +341,11 @@ static inline int plo_test_bit(unsigned char nr)
                "       lgr     0,%[function]\n"
                /* Parameter registers are ignored for "test bit" */
                "       plo     0,0,0,0(0)\n"
-               "       ipm     %0\n"
-               "       srl     %0,28\n"
-               : "=d" (cc)
+               CC_IPM(cc)
+               : CC_OUT(cc, cc)
                : [function] "d" (function)
-               : "cc", "0");
-       return cc == 0;
+               : CC_CLOBBER_LIST("0"));
+       return CC_TRANSFORM(cc) == 0;
 }
 
 static __always_inline void __sortl_query(u8 (*query)[32])