summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2024-11-07 16:11:36 +0100
committerHeiko Carstens <hca@linux.ibm.com>2024-11-13 14:31:31 +0100
commitd4e50cfe9c75f4d3caab62c7227152db10d23c82 (patch)
tree62645838ab667bdb07db1869fe04294178d79baa
parent81c54fc570fe7eb5ab66f8a4f7b8d515e2426cf4 (diff)
downloadlinux-d4e50cfe9c75f4d3caab62c7227152db10d23c82.tar.gz
linux-d4e50cfe9c75f4d3caab62c7227152db10d23c82.tar.bz2
linux-d4e50cfe9c75f4d3caab62c7227152db10d23c82.zip
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 <jchrist@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-rw-r--r--arch/s390/kernel/topology.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index a33d6a105086..4f9c301a705b 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -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)