From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: xen-devel@lists.xen.org
Cc: edgar.iglesias@xilinx.com, julien.grall@arm.com, sstabellini@kernel.org
Subject: [PATCH v2 1/1] xen/arm: Map mmio-sram nodes as cached memory
Date: Tue, 20 Dec 2016 13:37:47 +0100 [thread overview]
Message-ID: <1482237467-17879-2-git-send-email-edgar.iglesias@gmail.com> (raw)
In-Reply-To: <1482237467-17879-1-git-send-email-edgar.iglesias@gmail.com>
From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
Relax the mapping of mmio-sram nodes that do not set the
no-memory-wc property to cached normal memory.
Rationale:
Although on chip memories are relatively fast compared to
off-chip memories, large on chip memories are still
significantly slower than L1 caches. Depending on the
memory, either cached or uncached may make most sense.
Also, hardware domains may like to use the memory in a
cache-coherent way to avoid SW managed coherency.
By mapping it cached at S2, we let hardware domains select
cacheability via S1 mappings.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
xen/arch/arm/domain_build.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 07b868d..08646b8 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -56,8 +56,20 @@ static const struct dt_device_match dev_map_attrs[] __initconst =
.data = (void *) (uintptr_t) p2m_mmio_direct_dev,
},
{
+ /*
+ * Although on chip memories are relatively fast compared to
+ * off-chip memories, large on chip memories are still
+ * significantly slower than L1 caches. Depending on the
+ * memory, either cached or uncached may make most sense.
+ *
+ * Also, hardware domains may like to use the memory in a
+ * cache-coherent way to avoid SW managed coherency.
+ *
+ * By mapping it cached at S2, we let hardware domains select
+ * cacheability via S1 mappings.
+ */
__DT_MATCH_COMPATIBLE("mmio-sram"),
- .data = (void *) (uintptr_t) p2m_mmio_direct_nc,
+ .data = (void *) (uintptr_t) p2m_mmio_direct_c,
},
{ /* sentinel */ },
};
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-12-20 12:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-20 12:37 [PATCH v2 0/1] xen/arm: Map mmio-sram nodes as cached memory Edgar E. Iglesias
2016-12-20 12:37 ` Edgar E. Iglesias [this message]
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=1482237467-17879-2-git-send-email-edgar.iglesias@gmail.com \
--to=edgar.iglesias@gmail.com \
--cc=edgar.iglesias@xilinx.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xen.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).