s390/cpumf: use basic block for ecctr inline assembly
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
e030c1125e
commit
e238c15e52
@ -169,16 +169,27 @@ static inline int lcctl(u64 ctl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Extract CPU counter */
|
/* Extract CPU counter */
|
||||||
static inline int ecctr(u64 ctr, u64 *val)
|
static inline int __ecctr(u64 ctr, u64 *content)
|
||||||
{
|
{
|
||||||
register u64 content asm("4") = 0;
|
register u64 _content asm("4") = 0;
|
||||||
int cc;
|
int cc;
|
||||||
|
|
||||||
asm volatile (
|
asm volatile (
|
||||||
" .insn rre,0xb2e40000,%0,%2\n"
|
" .insn rre,0xb2e40000,%0,%2\n"
|
||||||
" ipm %1\n"
|
" ipm %1\n"
|
||||||
" srl %1,28\n"
|
" srl %1,28\n"
|
||||||
: "=d" (content), "=d" (cc) : "d" (ctr) : "cc");
|
: "=d" (_content), "=d" (cc) : "d" (ctr) : "cc");
|
||||||
|
*content = _content;
|
||||||
|
return cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Extract CPU counter */
|
||||||
|
static inline int ecctr(u64 ctr, u64 *val)
|
||||||
|
{
|
||||||
|
u64 content;
|
||||||
|
int cc;
|
||||||
|
|
||||||
|
cc = __ecctr(ctr, &content);
|
||||||
if (!cc)
|
if (!cc)
|
||||||
*val = content;
|
*val = content;
|
||||||
return cc;
|
return cc;
|
||||||
|
Loading…
Reference in New Issue
Block a user