mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
a4d9b97cc3
commit
80a60f6ef1
|
@ -37,8 +37,8 @@
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
static inline int __pcpu_sigp(u16 addr, u8 order, unsigned long parm,
|
static inline int ____pcpu_sigp(u16 addr, u8 order, unsigned long parm,
|
||||||
u32 *status)
|
u32 *status)
|
||||||
{
|
{
|
||||||
register unsigned long reg1 asm ("1") = parm;
|
register unsigned long reg1 asm ("1") = parm;
|
||||||
int cc;
|
int cc;
|
||||||
|
@ -48,8 +48,19 @@ static inline int __pcpu_sigp(u16 addr, u8 order, unsigned long parm,
|
||||||
" ipm %0\n"
|
" ipm %0\n"
|
||||||
" srl %0,28\n"
|
" srl %0,28\n"
|
||||||
: "=d" (cc), "+d" (reg1) : "d" (addr), "a" (order) : "cc");
|
: "=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)
|
if (status && cc == 1)
|
||||||
*status = reg1;
|
*status = _status;
|
||||||
return cc;
|
return cc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -318,17 +318,11 @@ static void pcpu_delegate(struct pcpu *pcpu, void (*func)(void *),
|
||||||
*/
|
*/
|
||||||
static int pcpu_set_smt(unsigned int mtid)
|
static int pcpu_set_smt(unsigned int mtid)
|
||||||
{
|
{
|
||||||
register unsigned long reg1 asm ("1") = (unsigned long) mtid;
|
|
||||||
int cc;
|
int cc;
|
||||||
|
|
||||||
if (smp_cpu_mtid == mtid)
|
if (smp_cpu_mtid == mtid)
|
||||||
return 0;
|
return 0;
|
||||||
asm volatile(
|
cc = __pcpu_sigp(0, SIGP_SET_MULTI_THREADING, mtid, NULL);
|
||||||
" sigp %1,0,%2 # sigp set multi-threading\n"
|
|
||||||
" ipm %0\n"
|
|
||||||
" srl %0,28\n"
|
|
||||||
: "=d" (cc) : "d" (reg1), "K" (SIGP_SET_MULTI_THREADING)
|
|
||||||
: "cc");
|
|
||||||
if (cc == 0) {
|
if (cc == 0) {
|
||||||
smp_cpu_mtid = mtid;
|
smp_cpu_mtid = mtid;
|
||||||
smp_cpu_mt_shift = 0;
|
smp_cpu_mt_shift = 0;
|
||||||
|
|
Loading…
Reference in New Issue