summaryrefslogtreecommitdiffstats
path: root/arch/s390/mm/page-states.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2016-06-20 13:31:55 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-06-28 09:32:29 +0200
commit931641c639cea024d4462d79ad9716406bba7b19 (patch)
treeed985ee956f8cb7469ed44dcd45d4175eeaa3fe7 /arch/s390/mm/page-states.c
parentdb7f5eef3dc0866320a4a92c38c58d6fb8dfdd34 (diff)
downloadop-kernel-dev-931641c639cea024d4462d79ad9716406bba7b19.zip
op-kernel-dev-931641c639cea024d4462d79ad9716406bba7b19.tar.gz
s390/mm: use basic block for essa 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>
Diffstat (limited to 'arch/s390/mm/page-states.c')
-rw-r--r--arch/s390/mm/page-states.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/s390/mm/page-states.c b/arch/s390/mm/page-states.c
index a90d45e..3330ea1 100644
--- a/arch/s390/mm/page-states.c
+++ b/arch/s390/mm/page-states.c
@@ -34,20 +34,25 @@ static int __init cmma(char *str)
}
__setup("cmma=", cmma);
-void __init cmma_init(void)
+static inline int cmma_test_essa(void)
{
register unsigned long tmp asm("0") = 0;
register int rc asm("1") = -EOPNOTSUPP;
- if (!cmma_flag)
- return;
asm volatile(
" .insn rrf,0xb9ab0000,%1,%1,0,0\n"
"0: la %0,0\n"
"1:\n"
EX_TABLE(0b,1b)
: "+&d" (rc), "+&d" (tmp));
- if (rc)
+ return rc;
+}
+
+void __init cmma_init(void)
+{
+ if (!cmma_flag)
+ return;
+ if (cmma_test_essa())
cmma_flag = 0;
}
OpenPOWER on IntegriCloud