From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: supplementing IO accessors with 64 bit capability
Date: Tue, 28 Oct 2014 12:23:24 +0000 [thread overview]
Message-ID: <20141028122324.GB12136@arm.com> (raw)
In-Reply-To: <CANLsYkyNNXc5XHOfrzRZ2Bz_32Dn_qhEsWEzymXxf_9-VRqcOA@mail.gmail.com>
On Mon, Oct 27, 2014 at 10:14:41PM +0000, Mathieu Poirier wrote:
> On 27 October 2014 09:54, Will Deacon <will.deacon@arm.com> wrote:
> > On Fri, Oct 24, 2014 at 05:16:34PM +0100, Catalin Marinas wrote:
> >> As I said, it's confusing. Anyway, you can go ahead and add the
> >> readq/writeq for ARMv6 and later, though it won't be guaranteed to have
> >> a 64-bit access, it depends on the bus.
> >
> > I'm really not comfortable with this... we don't make any guarantees for
> > 32-bit CPUs that a double-word access will be single-copy atomic for MMIO.
> > That means it could be subjected to things like reordering and merging,
> > which I think means that it depends on both the bus *and* the endpoint as to
> > whether or not this will work. Worse still, the endpoint could decide to
> > return a SLVERR, which would appear as an external abort.
>
> I agree on all of the point you bring up. The person using these
> should know their architecture and the target endpoint support this
> kind of access. If they don't then a problem will show up pretty
> quickly.
That goes against the I/O abstractions provided by the kernel to allow for
portable device drivers. readq/writeq *must* have some portable semantics
and I don't think that we should implement them on a best-effort basis
in io.h.
> >
> > Is it not possible to use 32-bit MMIO accesses for this driver?
>
> Sure it is but we wouldn't be using the HW to it's full capability.
> Another solution is to move the accessors to the driver itself where
> nobody else in the 32 bit world will have access to them. Russell,
> what you're opinion on that?
FWIW, I'd much prefer that, but I'd be interested to know how much of a
a couple of {read,write}l_relaxed operations really cost you by
comparison.
Will
next prev parent reply other threads:[~2014-10-28 12:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 16:06 [PATCH] ARM: supplementing IO accessors with 64 bit capability mathieu.poirier at linaro.org
2014-10-22 16:11 ` Russell King - ARM Linux
2014-10-22 16:22 ` Mathieu Poirier
2014-10-22 17:19 ` Russell King - ARM Linux
2014-10-22 17:55 ` Mathieu Poirier
2014-10-22 16:44 ` Catalin Marinas
2014-10-22 19:10 ` Mathieu Poirier
2014-10-24 9:28 ` Catalin Marinas
2014-10-24 15:05 ` Mathieu Poirier
2014-10-24 16:16 ` Catalin Marinas
2014-10-24 17:54 ` Mathieu Poirier
2014-10-27 15:54 ` Will Deacon
2014-10-27 22:14 ` Mathieu Poirier
2014-10-28 12:23 ` Will Deacon [this message]
2014-10-23 19:47 ` Nicolas Pitre
2014-10-23 19:51 ` Russell King - ARM Linux
2014-10-23 20:15 ` Nicolas Pitre
2014-10-24 10:37 ` Arnd Bergmann
2014-10-24 9:23 ` Catalin Marinas
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=20141028122324.GB12136@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.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).