From: jcm@redhat.com (Jon Masters)
To: linux-arm-kernel@lists.infradead.org
Subject: memcpy alignment
Date: Tue, 15 Dec 2015 10:24:13 -0500 [thread overview]
Message-ID: <5670309D.1040309@redhat.com> (raw)
In-Reply-To: <20151215093406.GC19244@e104818-lin.cambridge.arm.com>
On 12/15/2015 04:34 AM, Catalin Marinas wrote:
> On Mon, Dec 14, 2015 at 11:11:02PM -0500, Jon Masters wrote:
>> What's supposed to happen if the natural alignment of the pointers dst
>> and src is not the same? We don't seem to handle that case today, and
>> instead will base our access data type on the source alignment only.
>
> The hardware takes care of the other one. The memcpy behaviour in the
> kernel is the same as the glibc one (the Cortex Strings library).
Not if you're dealing with Device memory. I accept that one could always
ensure that there's a non-Device mapping (I got the other replies) but I
don't think it's unreasonable to expect a memcpy to work in the presence
of misaligned addresses either.
Jon.
next prev parent reply other threads:[~2015-12-15 15:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 4:11 memcpy alignment Jon Masters
2015-12-15 9:34 ` Catalin Marinas
2015-12-15 15:24 ` Jon Masters [this message]
2015-12-15 15:32 ` Russell King - ARM Linux
2015-12-15 15:43 ` Jon Masters
2015-12-15 15:52 ` Mark Rutland
2015-12-15 16:09 ` Leif Lindholm
2015-12-15 16:28 ` Jon Masters
2015-12-15 16:47 ` Måns Rullgård
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=5670309D.1040309@redhat.com \
--to=jcm@redhat.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).