From: arjan@fenrus.demon.nl
To: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How to write portable MMIO code?
Date: Tue, 30 Apr 2002 20:56:42 +0100 [thread overview]
Message-ID: <200204301956.g3UJug012891@fenrus.demon.nl> (raw)
In-Reply-To: <Pine.LNX.4.44.0204301112520.32217-100000@chaos.physics.uiowa.edu>
In article <Pine.LNX.4.44.0204301112520.32217-100000@chaos.physics.uiowa.edu> you wrote:
>> - should one in general (i.e., assuming the worst case) do wmb() on
>> writes, and mb() on reads?
readl() and writel() are specified to contain the proper barriers already.
> I don't think mb() will help you. You're probably experiencing PCI posting
> problems - when a writel() has executed, that doesn't necessarily mean
> that the transaction has actually happened it may (and will) be buffered
> for a potentially long time.
>
> However, PCI won't reorder reads vs. writes, so you when you want to be
> sure that a write() actually reached the hardware, do a dummy read()
> afterwards, that'll flush the write buffer.
yup
prev parent reply other threads:[~2002-04-30 19:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-30 14:22 José Fonseca
2002-04-30 16:19 ` Kai Germaschewski
2002-04-30 19:01 ` José Fonseca
2002-04-30 19:41 ` Kai Germaschewski
2002-04-30 20:01 ` Jesse Barnes
2002-04-30 19:56 ` arjan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200204301956.g3UJug012891@fenrus.demon.nl \
--to=arjan@fenrus.demon.nl \
--cc=kai@tp1.ruhr-uni-bochum.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®