summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/barrier.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2014-03-13 22:00:35 +0400
committerIngo Molnar <mingo@kernel.org>2014-04-18 16:20:42 +0400
commit0e530747c69f1e191f101a925bb4051894e5c7b0 (patch)
treedba0d885403109b8a5857bf59890dfe6b6cd077c /arch/s390/include/asm/barrier.h
parentc645073f7e4f073e1ebcd0f0d91652c4468b8364 (diff)
downloadlinux-0e530747c69f1e191f101a925bb4051894e5c7b0.tar.xz
arch,s390: Convert smp_mb__*()
As per the existing implementation; implement the new one using smp_mb(). AFAICT the s390 compare-and-swap does imply a barrier, however there are some immediate ops that seem to be singly-copy atomic and do not imply a barrier. One such is the "ni" op (which would be and-immediate) which is used for the constant clear_bit implementation. Therefore s390 needs full barriers for the {before,after} atomic ops. Signed-off-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Link: http://lkml.kernel.org/n/tip-kme5dz5hcobpnufnnkh1ech2@git.kernel.org Cc: Chen Gang <gang.chen@asianux.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: linux390@de.ibm.com Cc: linux-kernel@vger.kernel.org Cc: linux-s390@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/s390/include/asm/barrier.h')
-rw-r--r--arch/s390/include/asm/barrier.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/include/asm/barrier.h b/arch/s390/include/asm/barrier.h
index 578680f6207a..19ff956b752b 100644
--- a/arch/s390/include/asm/barrier.h
+++ b/arch/s390/include/asm/barrier.h
@@ -27,8 +27,9 @@
#define smp_rmb() rmb()
#define smp_wmb() wmb()
#define smp_read_barrier_depends() read_barrier_depends()
-#define smp_mb__before_clear_bit() smp_mb()
-#define smp_mb__after_clear_bit() smp_mb()
+
+#define smp_mb__before_atomic() smp_mb()
+#define smp_mb__after_atomic() smp_mb()
#define set_mb(var, value) do { var = value; mb(); } while (0)