s390/lib: add missing memory barriers to string inline assemblies
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 13 Dec 2016 08:50:30 +0000 (09:50 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 14 Dec 2016 15:33:41 +0000 (16:33 +0100)
commit7a71fd1c59dfd20fac4d14486d63d3d5ab70498a
tree50466ef7939ae6850cc36212ca2ab9cc3cb8964a
parent259acc5c255a4260b3db0461afd5d93fabfe8524
s390/lib: add missing memory barriers to string inline assemblies

We have a couple of inline assemblies like memchr() and strlen() that
read from memory, but tell the compiler only they need the addresses
of the strings they access.
This allows the compiler to omit the initialization of such strings
and therefore generate broken code. Add the missing memory barrier to
all string related inline assemblies to fix this potential issue. It
looks like the compiler currently does not generate broken code due to
these bugs.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/string.h
arch/s390/lib/string.c