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 v1 1/1] xen/arm: Map mmio-sram nodes as cached memory
Date: Thu, 15 Dec 2016 12:26:48 +0100 [thread overview]
Message-ID: <1481801208-27758-2-git-send-email-edgar.iglesias@gmail.com> (raw)
In-Reply-To: <1481801208-27758-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:
Allthough on chip memories are relatively fast compared to
off-chip memories, large OCMs are still significantly slower
than L1 caches. Depending on the memory, either cached or
uncached may make most sense.
Also, dom0 may like to use the memory in a cache-coherent way
to avoid SW managed coherency.
By mapping it cached at S2, we let dom0 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..3a7c1ee 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,
},
{
+ /*
+ * Allthough on chip memories are relatively fast compared to
+ * off-chip memories, large OCMs are still significantly slower
+ * than L1 caches. Depending on the memory, either cached or
+ * uncached may make most sense.
+ *
+ * Also, dom0 may like to use the memory in a cache-coherent
+ * way to avoid SW managed coherency.
+ *
+ * By mapping it cached at S2, we let dom0 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
next prev parent reply other threads:[~2016-12-15 11:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-15 11:26 [PATCH v1 0/1] xen/arm: Map mmio-sram nodes as cached memory Edgar E. Iglesias
2016-12-15 11:26 ` Edgar E. Iglesias [this message]
2016-12-16 16:12 ` [PATCH v1 1/1] " Julien Grall
2016-12-16 17:04 ` Edgar E. Iglesias
2016-12-19 12:17 ` Julien Grall
2016-12-20 0:01 ` Stefano Stabellini
2016-12-20 12:53 ` Edgar E. Iglesias
2016-12-21 11:29 ` Julien Grall
2016-12-21 18:50 ` Stefano Stabellini
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=1481801208-27758-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).