Skip to content

Commit d4e50cf

Browse files
committed
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 <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent 81c54fc commit d4e50cf

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

arch/s390/kernel/topology.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/node.h>
2727
#include <asm/hiperdispatch.h>
2828
#include <asm/sysinfo.h>
29+
#include <asm/asm.h>
2930

3031
#define PTF_HORIZONTAL (0UL)
3132
#define PTF_VERTICAL (1UL)
@@ -224,15 +225,15 @@ static void topology_update_polarization_simple(void)
224225

225226
static int ptf(unsigned long fc)
226227
{
227-
int rc;
228+
int cc;
228229

229230
asm volatile(
230-
" .insn rre,0xb9a20000,%1,%1\n"
231-
" ipm %0\n"
232-
" srl %0,28\n"
233-
: "=d" (rc)
234-
: "d" (fc) : "cc");
235-
return rc;
231+
" .insn rre,0xb9a20000,%[fc],%[fc]\n"
232+
CC_IPM(cc)
233+
: CC_OUT(cc, cc)
234+
: [fc] "d" (fc)
235+
: CC_CLOBBER);
236+
return CC_TRANSFORM(cc);
236237
}
237238

238239
int topology_set_cpu_management(int fc)

0 commit comments

Comments
 (0)