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

index a33d6a105086d305edf9ad77996e0d86bb4c2e52..4f9c301a705b63f8dd0e7bc33e7206ad1222e7a7 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/node.h>
 #include <asm/hiperdispatch.h>
 #include <asm/sysinfo.h>
+#include <asm/asm.h>
 
 #define PTF_HORIZONTAL (0UL)
 #define PTF_VERTICAL   (1UL)
@@ -224,15 +225,15 @@ static void topology_update_polarization_simple(void)
 
 static int ptf(unsigned long fc)
 {
-       int rc;
+       int cc;
 
        asm volatile(
-               "       .insn   rre,0xb9a20000,%1,%1\n"
-               "       ipm     %0\n"
-               "       srl     %0,28\n"
-               : "=d" (rc)
-               : "d" (fc)  : "cc");
-       return rc;
+               "       .insn   rre,0xb9a20000,%[fc],%[fc]\n"
+               CC_IPM(cc)
+               : CC_OUT(cc, cc)
+               : [fc] "d" (fc)
+               : CC_CLOBBER);
+       return CC_TRANSFORM(cc);
 }
 
 int topology_set_cpu_management(int fc)