linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: memcpy alignment for DEVICE_nGnRnE
Date: Fri, 21 Feb 2014 10:53:08 +0000	[thread overview]
Message-ID: <20140221105307.GE25363@localhost> (raw)
In-Reply-To: <53072343.4080505@marvell.com>

Hi Zhou,

On Fri, Feb 21, 2014 at 09:58:27AM +0000, Zhou Zhu wrote:
> We faced one issue using memcpy for memory type DEVICE_nGnRnE 
> (pgprot_noncached). If the address is not aligned, exception would 
> happen due to the alignment of this type could not be handled by hardware.

Indeed, that's expected. This memory type is the equivalent of Strongly
Ordered.

> Is there any plan and ongoing patch to support this or we need to keep 
> address aligned for memcpy using pgprot_noncached memory in drivers?

You either change the memory type to pgprot_writecombine() or use the
right API (memcpy_toio/memcpy_fromio, these could be further optimised,
similar to powerpc for example, but I didn't get there yet).

-- 
Catalin

       reply	other threads:[~2014-02-21 10:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <53072343.4080505@marvell.com>
2014-02-21 10:53 ` Catalin Marinas [this message]
2014-04-08  0:35   ` memcpy alignment for DEVICE_nGnRnE Michael Bohan
2014-04-08 11:49     ` Catalin Marinas
2014-04-08 23:39       ` Michael Bohan
2014-04-09  8:17         ` 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=20140221105307.GE25363@localhost \
    --to=catalin.marinas@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).