From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] arm64:lib: Use Linaro's memset routine to avoid DC instruction
Date: Fri, 8 May 2015 09:52:32 +0100 [thread overview]
Message-ID: <20150508085232.GB2125@arm.com> (raw)
In-Reply-To: <1431062602-1894-1-git-send-email-jliang@xilinx.com>
On Fri, May 08, 2015 at 06:23:22AM +0100, Wendy Liang wrote:
> From: Jason Wu <j.wu@xilinx.com>
>
> Currently the DC ZVA is used to zero out memory which is causing unaligned
> fault due to the follows:
> "If the memory region being zeroed is any type of Device memory, these
> instructions give an alignment fault which is prioritized in the same way
> as other alignment faults that are determined by the memory type."
> from arm reference menual.
[...]
> We have carved out top memory from DDR as the memory for the device from DTS:
> ----
> reserved-memory {
> #address-cells = <2>;
> #size-cells = <1>;
> ranges;
> rproc_0_reserved: rproc at 3ed000000 {
> no-map;
> reg = <0x0 0x3ed00000 0x1000000>;
> };
> };
>
> amba {
> example at 0 {
> reg = <0x0 0x3ed00000 0x800000>;
> ...
> };
> };
> ----
> We use dma_coherent_declare_memory() to declare the memory for DMA operations.
> We use memset() initialize the memory with 0.
> memset calls dc zva to zeroing the memory however it thinks the memory
> is not part of system (somehow even it is part of DDR) and causing
> unalignment fault.
Why isn't the buffer mapped as normal, non-cacheable? Device memory also
doesn't support things like unaligned access, so really DC ZVA is the canary
in the coal mine.
Will
next prev parent reply other threads:[~2015-05-08 8:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 5:23 [PATCH 1/1] arm64:lib: Use Linaro's memset routine to avoid DC instruction Wendy Liang
2015-05-08 8:52 ` Will Deacon [this message]
2015-05-08 8:55 ` Catalin Marinas
2015-05-08 9:00 ` 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=20150508085232.GB2125@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.