diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-03-20 08:55:00 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-04-01 09:23:35 +0200 |
commit | 0ccc8b7ac86053388e793bad20bd26bd777752eb (patch) | |
tree | ab5a74ecd88aba3d7060b2ff3cd7be60db8becc2 /drivers/s390 | |
parent | ce1ce2f31224c18e84d859ccd5675cbb2728f57a (diff) | |
download | linux-0ccc8b7ac86053388e793bad20bd26bd777752eb.tar.bz2 |
s390/bitops,atomic: add missing memory barriers
When reworking the bitops and atomic ops I missed that those instructions
that got atomic behaviour only perform a "specific-operand-serialization"
instead of a full "serialization".
The compare-and-swap instruction used before performs a full serialization
before and after the instruction is executed, which means it has full
memory barrier semantics.
In order to give the new bitops and atomic ops functions also full memory
barrier semantics add a "bcr 14,0" before and after each of those new
instructions which performs full serialization as well.
This restores memory barrier semantics for bitops and atomic ops functions
which return values, like e.g. atomic_add_return(), but not for functions
which do not return a value, like e.g. atomic_add().
This is consistent to other architectures and what common code requires.
Cc: stable@vger.kernel.org # v3.13+
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
0 files changed, 0 insertions, 0 deletions