From: Scott Wood <scottwood@freescale.com>
To: leroy christophe <christophe.leroy@c-s.fr>
Cc: LinuxPPC-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: What is the reel purpose of in_beXX() and out_beXX() fonctions ?
Date: Mon, 27 Oct 2014 11:45:04 -0500 [thread overview]
Message-ID: <1414428304.23458.13.camel@snotra.buserror.net> (raw)
In-Reply-To: <544E3FF6.7090300@c-s.fr>
On Mon, 2014-10-27 at 13:52 +0100, leroy christophe wrote:
> Many drivers use in_be16(), in_be32(), out_be16(), out_be32(), etc ....
> to access to registrers in IO mapped memory.
>
> What is the real purpose of those functions, and are they really needed ?
>
> ioremap() maps the related areas as GUARDED, which means that accesses
> can't be speculative. So what is the benefit of using in_beXX() and
> out_beXX() over simple memory accesses in the area ?
Speculative accesses aren't the only issue -- there's also hardware
reordering (some implementations may not do this on guarded regions, but
I don't think it's architecturally guaranteed), and of course you need
to make sure the compiler doesn't do anything funny.
-Scott
prev parent reply other threads:[~2014-10-27 16:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 12:52 What is the reel purpose of in_beXX() and out_beXX() fonctions ? leroy christophe
2014-10-27 15:05 ` David Laight
2014-10-27 21:11 ` Benjamin Herrenschmidt
2014-10-27 16:45 ` Scott Wood [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=1414428304.23458.13.camel@snotra.buserror.net \
--to=scottwood@freescale.com \
--cc=christophe.leroy@c-s.fr \
--cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).