From: andy@warmcat.com (Andy Green)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM: big performance waste in memcpy_{from,to}io
Date: Fri, 13 Nov 2009 12:42:17 +0000 [thread overview]
Message-ID: <4AFD5429.8000307@warmcat.com> (raw)
In-Reply-To: <20091113122438.GB29008@n2100.arm.linux.org.uk>
On 11/13/09 12:24, Somebody in the thread at some point said:
> On Fri, Nov 13, 2009 at 12:32:41PM +0100, Hubert Feurstein wrote:
>> The memcpy_{to,from}io-function don't has to care about the bus-width of the
>> attached peripheral, because this is already handled correctly by the static
>> memory controller of your arm-derivate (Of course this one has to be
>> configured correctly to the peripherals bus width). In the rare case where you
>> have to take care about that it is anyway a bad idea to use a memcpy_xxio-
>> function.
>
> I believe there are SoCs where using 32-bit reads on lesser-width buses
> generate faults. There are certainly SoCs which do abort reads/writes
> to certain peripherals which aren't the right size.
Not much help to the discussion about memcpy, but I saw an example of
this death by bus size mismatch is iMX31's internal watchdog. I failed
to notice the registers were (unusually) specified to be 16-bit.
Using a u32 * to access the first register, which was 32-bit aligned OK,
gave an "imprecise external abort" until I read the datasheet closer and
used a u16 *.
-Andy
next prev parent reply other threads:[~2009-11-13 12:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 16:49 ARM: big performance waste in memcpy_{from,to}io Hubert Feurstein
2009-11-12 18:44 ` Alexander Clouter
2009-11-13 11:32 ` Hubert Feurstein
2009-11-13 12:24 ` Russell King - ARM Linux
2009-11-13 12:42 ` Andy Green [this message]
2009-11-13 14:00 ` Bill Gatliff
2009-11-16 14:57 ` [RFC PATCH] ARM: add (experimental) alternative memcpy_{from, to}io() and memset_io() Hubert Feurstein
2009-11-13 15:16 ` ARM: big performance waste in memcpy_{from,to}io Hubert Feurstein
2009-11-13 23:14 ` Ben Dooks
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=4AFD5429.8000307@warmcat.com \
--to=andy@warmcat.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).