Re: ordered memory access

Jes Sorensen (Jes.Sorensen@cern.ch)
30 Sep 1999 14:47:09 +0200


>>>>> "Benjamin" == Benjamin Herrenschmidt <bh40@calva.net> writes:

Benjamin> On Thu, Sep 30, 1999, Jes Sorensen <Jes.Sorensen@cern.ch>
Benjamin> wrote:
>> atomic_foo() should be ordered, at least that the idea behind it as
>> far as I understand.
>>
>> Otherwise you want to look at mb(), rmb() and wmb(). mb() is a
>> generic memory barrier, wmb() makes sure a write is issues before
>> another write() and rmb() ... you get the idea ;-)

Benjamin> The last time I discussed this with Paul Mackerras, he told
Benjamin> me that the atomic_xxx functions were not expected to
Benjamin> enforce ordering. (At this time, the linuxppc versions
Benjamin> didn't do a sync instruction for this reason). I didn't
Benjamin> check recent linuxppc versions however.

Well it seems like another case where we are not exactly sure what the
functions are supposed to do (eg. like with readl/writel). Thats why I
suggest it is being documented at least.

Jes

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