Skip to content

Commit

Permalink
[POWERPC] Fix rmb to order cacheable vs. noncacheable
Browse files Browse the repository at this point in the history
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>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Nick Piggin authored and Paul Mackerras committed Jun 16, 2008
1 parent a9653cf commit 598056d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-powerpc/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 598056d

Please sign in to comment.