From: "Dan Maas" <dmaas@dcine.com>
To: <linux-kernel@vger.kernel.org>
Cc: "Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
"Ben Collins" <bcollins@debian.org>
Subject: readl/writel and memory barriers
Date: Mon, 18 Feb 2002 20:45:29 -0500 [thread overview]
Message-ID: <092401c1b8e7$1d190660$1a01a8c0@allyourbase> (raw)
Are the PCI memory access functions like readl() and writel() supposed to
enforce ordering without explicit memory barriers?
I've heard inconsistent reports - Benjamin Herrenschmidt pointed out that on
PPC, the definitions of readl() and writel() include memory barriers. But
the code example on page 229 of Rubini and Corbet's "Linux Device Drivers"
2nd ed. suggests that an explicit wmb() is needed to preserve ordering of
writel()s.
In a quick survey of architectures that need explicit memory barriers to
enforce ordering of PCI accesses, it seems that alpha and PPC include memory
barriers inside readl() and writel(), whereas MIPS, sparc64, ia64, and s390
do not include them. (I'm not intimately familiar with these architectures
so forgive me if I got some wrong...). What is the official story here?
Regards,
Dan
next reply other threads:[~2002-02-19 1:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-19 1:45 Dan Maas [this message]
2002-02-19 9:31 ` Alan Cox
2002-02-19 17:10 ` David Mosberger
2002-02-19 18:35 ` Jesse Barnes
2002-02-19 20:11 ` Dan Maas
2002-02-19 20:23 ` Jesse Barnes
2002-02-19 22:05 ` Keith Owens
2002-02-19 22:17 ` Jesse Barnes
2002-02-21 0:29 ` Randy.Dunlap
2002-02-23 4:48 ` Daniel Phillips
2002-02-25 16:19 ` Randy.Dunlap
2002-02-19 19:33 ` David Mosberger
2002-02-19 19:42 ` Jesse Barnes
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='092401c1b8e7$1d190660$1a01a8c0@allyourbase' \
--to=dmaas@dcine.com \
--cc=bcollins@debian.org \
--cc=benh@kernel.crashing.org \
--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®