linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s390: more efficient smp barriers
@ 2016-01-10 11:53 Michael S. Tsirkin
  2016-01-11  8:07 ` Martin Schwidefsky
  0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2016-01-10 11:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Zijlstra, Martin Schwidefsky, Heiko Carstens, Ingo Molnar,
	Arnd Bergmann, Davidlohr Bueso, Andrey Konovalov,
	Christian Borntraeger, linux-s390

As per: lkml.kernel.org/r/20150921112252.3c2937e1@mschwide
atomics imply a barrier on s390, so s390 should change
smp_mb__before_atomic and smp_mb__after_atomic to barrier() instead of
smp_mb() and hence should not use the generic versions.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Suggested-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

This is on top of arch barrier cleanup patchset,
will be included in v3 of that patchset.

 arch/s390/include/asm/barrier.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/s390/include/asm/barrier.h b/arch/s390/include/asm/barrier.h
index 4d26fa4..5c8db3c 100644
--- a/arch/s390/include/asm/barrier.h
+++ b/arch/s390/include/asm/barrier.h
@@ -45,6 +45,9 @@ do {									\
 	___p1;								\
 })
 
+#define __smp_mb__before_atomic()	barrier()
+#define __smp_mb__after_atomic()	barrier()
+
 #include <asm-generic/barrier.h>
 
 #endif /* __ASM_BARRIER_H */
-- 
MST

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-11  8:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-10 11:53 [PATCH] s390: more efficient smp barriers Michael S. Tsirkin
2016-01-11  8:07 ` Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).