powerpc wmb()
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")
Comments ?
Regards,
-velco
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Hi,
[ yes this is a better place than debian-powerpc for this sort of
conversation :) ]
Quoted 8 lines
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:
http://www.rs6000.ibm.com/tech/ppc-chg2.html
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.
Anton
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/