Skip to content

Commit 5a5897d

Browse files
committed
s390/irq: 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 553ed6d commit 5a5897d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

arch/s390/kernel/irq.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <asm/stacktrace.h>
3131
#include <asm/softirq_stack.h>
3232
#include <asm/vtime.h>
33+
#include <asm/asm.h>
3334
#include "entry.h"
3435

3536
DEFINE_PER_CPU_SHARED_ALIGNED(struct irq_stat, irq_stat);
@@ -129,9 +130,13 @@ static int irq_pending(struct pt_regs *regs)
129130
{
130131
int cc;
131132

132-
asm volatile("tpi 0\n"
133-
"ipm %0" : "=d" (cc) : : "cc");
134-
return cc >> 28;
133+
asm volatile(
134+
" tpi 0\n"
135+
CC_IPM(cc)
136+
: CC_OUT(cc, cc)
137+
:
138+
: CC_CLOBBER);
139+
return CC_TRANSFORM(cc);
135140
}
136141

137142
void noinstr do_io_irq(struct pt_regs *regs)

0 commit comments

Comments
 (0)