Memory barrier on ppc and general
Hi list:
I have a question about memory barrier.
1. first, this is a ppc-specific question. From the source of Linux ppc, I see mb() and rmb() are defined as "sync", while "wmb()" is defined as "eieio", but from the manual I see why eieio can't be used for rmb() and mb() also. Could someone enlighten me?
2. second, does the memory barrier also work for for memory-mapped IO registers? For example, a wmb() guarantees two stores to memory are in-order, but say the second store is actually a hardware register. Would the barrier still work?
Thanks for your answer.
Hua