s390/hypfs: use basic block for diag 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
2c79813a1f
commit
e030c1125e
1 changed files with 7 additions and 5 deletions
|
@ -337,9 +337,9 @@ static inline __u64 phys_cpu__ctidx(enum diag204_format type, void *hdr)
|
||||||
|
|
||||||
/* Diagnose 204 functions */
|
/* Diagnose 204 functions */
|
||||||
|
|
||||||
static inline int __diag204(unsigned long subcode, unsigned long size, void *addr)
|
static inline int __diag204(unsigned long *subcode, unsigned long size, void *addr)
|
||||||
{
|
{
|
||||||
register unsigned long _subcode asm("0") = subcode;
|
register unsigned long _subcode asm("0") = *subcode;
|
||||||
register unsigned long _size asm("1") = size;
|
register unsigned long _size asm("1") = size;
|
||||||
|
|
||||||
asm volatile(
|
asm volatile(
|
||||||
|
@ -347,15 +347,17 @@ static inline int __diag204(unsigned long subcode, unsigned long size, void *add
|
||||||
"0: nopr %%r7\n"
|
"0: nopr %%r7\n"
|
||||||
EX_TABLE(0b,0b)
|
EX_TABLE(0b,0b)
|
||||||
: "+d" (_subcode), "+d" (_size) : "d" (addr) : "memory");
|
: "+d" (_subcode), "+d" (_size) : "d" (addr) : "memory");
|
||||||
if (_subcode)
|
*subcode = _subcode;
|
||||||
return -1;
|
|
||||||
return _size;
|
return _size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int diag204(unsigned long subcode, unsigned long size, void *addr)
|
static int diag204(unsigned long subcode, unsigned long size, void *addr)
|
||||||
{
|
{
|
||||||
diag_stat_inc(DIAG_STAT_X204);
|
diag_stat_inc(DIAG_STAT_X204);
|
||||||
return __diag204(subcode, size, addr);
|
size = __diag204(&subcode, size, addr);
|
||||||
|
if (subcode)
|
||||||
|
return -1;
|
||||||
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue