linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* powerpc wmb()
@ 2001-11-18 12:58 Momchil Velikov
  2001-11-18 13:13 ` Anton Blanchard
  0 siblings, 1 reply; 2+ messages in thread
From: Momchil Velikov @ 2001-11-18 12:58 UTC (permalink / raw)
  To: linuxppc-dev


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/

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

* Re: powerpc wmb()
  2001-11-18 12:58 powerpc wmb() Momchil Velikov
@ 2001-11-18 13:13 ` Anton Blanchard
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Blanchard @ 2001-11-18 13:13 UTC (permalink / raw)
  To: Momchil Velikov; +Cc: linuxppc-dev


Hi,

[ 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:

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/

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

end of thread, other threads:[~2001-11-18 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-18 12:58 powerpc wmb() Momchil Velikov
2001-11-18 13:13 ` Anton Blanchard

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