diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2016-06-20 15:04:17 +0300 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-06-28 10:32:35 +0300 |
commit | 80a60f6ef19a0d4d06a55065f69fa3dbbbac8bcc (patch) | |
tree | e5d3e4390d5233094420bff31228c1809db8eb76 /arch/s390/include/asm/sigp.h | |
parent | a4d9b97cc3c215a2dd6e841ee203db7b7e73b3c9 (diff) | |
download | linux-80a60f6ef19a0d4d06a55065f69fa3dbbbac8bcc.tar.xz |
s390/smp: use basic blocks for sigp inline assemblies
Use only simple inline assemblies which consist of a single basic
block if the register asm construct is being used.
Otherwise gcc would generate broken code if the compiler option
--sanitize-coverage=trace-pc would be used.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/sigp.h')
-rw-r--r-- | arch/s390/include/asm/sigp.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/s390/include/asm/sigp.h b/arch/s390/include/asm/sigp.h index 1c8f33fca356..72df5f2de6b0 100644 --- a/arch/s390/include/asm/sigp.h +++ b/arch/s390/include/asm/sigp.h @@ -37,8 +37,8 @@ #ifndef __ASSEMBLY__ -static inline int __pcpu_sigp(u16 addr, u8 order, unsigned long parm, - u32 *status) +static inline int ____pcpu_sigp(u16 addr, u8 order, unsigned long parm, + u32 *status) { register unsigned long reg1 asm ("1") = parm; int cc; @@ -48,8 +48,19 @@ static inline int __pcpu_sigp(u16 addr, u8 order, unsigned long parm, " ipm %0\n" " srl %0,28\n" : "=d" (cc), "+d" (reg1) : "d" (addr), "a" (order) : "cc"); + *status = reg1; + return cc; +} + +static inline int __pcpu_sigp(u16 addr, u8 order, unsigned long parm, + u32 *status) +{ + u32 _status; + int cc; + + cc = ____pcpu_sigp(addr, order, parm, &_status); if (status && cc == 1) - *status = reg1; + *status = _status; return cc; } |