powerpc wmb()

Anton Blanchard anton at samba.org
Mon Nov 19 00:13:05 EST 2001


[ yes this is a better place than debian-powerpc for this sort of
  conversation :) ]

> wmb is defined as
> #define wmb()  __asm__ __volatile__ ("eieio" : : : "memory")
> however, ``eieio'' has no effect on memory, that is
> Write Through Not Required, thus I think it should be
> #define wmb()  __asm__ __volatile__ ("sync" : : : "memory")

While the original ppc spec did not guarantee eieio ordered writes
to caching allowed, write through not required, memory coherence
required storage, there have been modifications since:


Look for the change "Book II, Section 3.3, page 350"

My understanding is that the earlier chips completed stores in order
which allowed the above change to be made safely, but I am not 100%
on this.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

More information about the Linuxppc-dev mailing list