aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/sigp.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/sigp.h')
-rw-r--r--arch/s390/include/asm/sigp.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/s390/include/asm/sigp.h b/arch/s390/include/asm/sigp.h
index d091aa1aaf11..bf9c823d4020 100644
--- a/arch/s390/include/asm/sigp.h
+++ b/arch/s390/include/asm/sigp.h
@@ -31,4 +31,23 @@
31#define SIGP_STATUS_INCORRECT_STATE 0x00000200UL 31#define SIGP_STATUS_INCORRECT_STATE 0x00000200UL
32#define SIGP_STATUS_NOT_RUNNING 0x00000400UL 32#define SIGP_STATUS_NOT_RUNNING 0x00000400UL
33 33
34#ifndef __ASSEMBLY__
35
36static inline int __pcpu_sigp(u16 addr, u8 order, u32 parm, u32 *status)
37{
38 register unsigned int reg1 asm ("1") = parm;
39 int cc;
40
41 asm volatile(
42 " sigp %1,%2,0(%3)\n"
43 " ipm %0\n"
44 " srl %0,28\n"
45 : "=d" (cc), "+d" (reg1) : "d" (addr), "a" (order) : "cc");
46 if (status && cc == 1)
47 *status = reg1;
48 return cc;
49}
50
51#endif /* __ASSEMBLY__ */
52
34#endif /* __S390_ASM_SIGP_H */ 53#endif /* __S390_ASM_SIGP_H */