Memory barrier on ppc and general

From: Hua Zhong
Date: Fri Sep 10 2004 - 19:48:42 EST


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/