linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/2] powerpc: rmb fix
@ 2007-08-21  2:11 Nick Piggin
  2007-08-21  2:16 ` [patch 1/2] powerpc: smp_wmb speedup Nick Piggin
  2007-08-21 19:07 ` [patch 1/2] powerpc: rmb fix Joel Schopp
  0 siblings, 2 replies; 15+ messages in thread
From: Nick Piggin @ 2007-08-21  2:11 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Paul Mackerras

In the interest of completeness, I'll split these patches up and submit to
the powerpc dev list. Any discussion or ack/nack would be appreciated.

---
lwsync is defined to only order memory operations on cacheable memory.
A full sync appears to be the only barrier that will order all memory
loads including device memory.

Signed-off-by: Nick Piggin <npiggin@suse.de>

Index: linux-2.6/include/asm-powerpc/system.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/system.h
+++ linux-2.6/include/asm-powerpc/system.h
@@ -33,7 +33,7 @@
  * SMP since it is only used to order updates to system memory.
  */
 #define mb()   __asm__ __volatile__ ("sync" : : : "memory")
-#define rmb()  __asm__ __volatile__ (__stringify(LWSYNC) : : : "memory")
+#define rmb()  __asm__ __volatile__ ("sync" : : : "memory")
 #define wmb()  __asm__ __volatile__ ("sync" : : : "memory")
 #define read_barrier_depends()  do { } while(0)
 
@@ -42,7 +42,7 @@
 #ifdef __KERNEL__
 #ifdef CONFIG_SMP
 #define smp_mb()	mb()
-#define smp_rmb()	rmb()
+#define smp_rmb()	__asm__ __volatile__ (__stringify(LWSYNC) : : : "memory")
 #define smp_wmb()	eieio()
 #define smp_read_barrier_depends()	read_barrier_depends()
 #else

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

end of thread, other threads:[~2007-08-24  2:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-21  2:11 [patch 1/2] powerpc: rmb fix Nick Piggin
2007-08-21  2:16 ` [patch 1/2] powerpc: smp_wmb speedup Nick Piggin
2007-08-21  2:21   ` Nick Piggin
2007-08-21 19:07 ` [patch 1/2] powerpc: rmb fix Joel Schopp
2007-08-21 19:43   ` Segher Boessenkool
2007-08-21 21:42     ` Linas Vepstas
2007-08-22  1:16     ` Nick Piggin
2007-08-22  3:29       ` Segher Boessenkool
2007-08-22  3:55         ` Nick Piggin
2007-08-23 17:57           ` Segher Boessenkool
2007-08-24  2:47             ` Nick Piggin
2007-08-22  3:15     ` Nick Piggin
2007-08-22  3:33       ` Segher Boessenkool
2007-08-22  4:05         ` Nick Piggin
2007-08-23 17:49           ` Segher Boessenkool

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).