From: Heiko Carstens Date: Thu, 7 Nov 2024 15:11:36 +0000 (+0100) Subject: s390/topology: Convert to use flag output macros X-Git-Tag: v6.13-rc1~206^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4e50cfe9c75f4d3caab62c7227152db10d23c82;p=thirdparty%2Fkernel%2Flinux.git s390/topology: Convert to use flag output macros 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 Signed-off-by: Heiko Carstens --- diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index a33d6a105086d..4f9c301a705b6 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c @@ -26,6 +26,7 @@ #include #include #include +#include #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)