linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/2] powerpc: rmb fix
@ 2008-05-21 14:10 Nick Piggin
  2008-05-21 14:12 ` [patch 2/2] powerpc: optimise smp_wmb Nick Piggin
  2008-05-21 15:27 ` [patch 1/2] powerpc: rmb fix Benjamin Herrenschmidt
  0 siblings, 2 replies; 23+ messages in thread
From: Nick Piggin @ 2008-05-21 14:10 UTC (permalink / raw)
  To: paulus, linuxppc-dev

Hi,

I'm sure I've sent these patches before, but I can't remember why they
weren't merged. They still seem obviously correct to me.

--

lwsync is explicitly defined not to have any effect on the ordering of
accesses to device memory, so it cannot be used for rmb(). sync appears
to be the only barrier which fits the bill.

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
@@ -34,7 +34,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)
 

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

end of thread, other threads:[~2008-05-26  1:38 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21 14:10 [patch 1/2] powerpc: rmb fix Nick Piggin
2008-05-21 14:12 ` [patch 2/2] powerpc: optimise smp_wmb Nick Piggin
2008-05-21 15:26   ` Benjamin Herrenschmidt
2008-05-21 15:34     ` Nick Piggin
2008-05-21 15:43       ` Benjamin Herrenschmidt
2008-05-21 15:47         ` Nick Piggin
2008-05-21 16:02           ` Benjamin Herrenschmidt
2008-05-21 20:51             ` Segher Boessenkool
2008-05-21 16:01         ` Nick Piggin
2008-05-21 20:12           ` Segher Boessenkool
2008-05-21 20:44             ` Benjamin Herrenschmidt
2008-05-21 22:07               ` Segher Boessenkool
2008-05-22  0:30             ` Nick Piggin
2008-05-21 20:16   ` Segher Boessenkool
2008-05-21 15:27 ` [patch 1/2] powerpc: rmb fix Benjamin Herrenschmidt
2008-05-21 15:32   ` Nick Piggin
2008-05-21 15:43     ` Benjamin Herrenschmidt
2008-05-23  2:14     ` Paul Mackerras
2008-05-23  4:40       ` Nick Piggin
2008-05-23  4:53         ` Paul Mackerras
2008-05-23  5:48           ` Nick Piggin
2008-05-23  6:40             ` Paul Mackerras
2008-05-26  1:38               ` Nick Piggin

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