xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
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, wei.liu2@citrix.com
Subject: [PATCH for-4.7 1/1] xen/arm: Rename map_regions_rw_cache and use p2m.default_access
Date: Wed,  8 Jun 2016 02:15:27 +0200	[thread overview]
Message-ID: <1465344927-3557-1-git-send-email-edgar.iglesias@gmail.com> (raw)

From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

Rename map_regions_rw_cache to map_regions_cache and make it use
p2m.default_access.

Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 xen/arch/arm/domain_build.c | 16 ++++++++--------
 xen/arch/arm/p2m.c          | 20 ++++++++++----------
 xen/include/asm-arm/p2m.h   | 18 +++++++++---------
 3 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 00dc07a..b9ffaca 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1570,10 +1570,10 @@ static void acpi_map_other_tables(struct domain *d)
     {
         addr = acpi_gbl_root_table_list.tables[i].address;
         size = acpi_gbl_root_table_list.tables[i].length;
-        res = map_regions_rw_cache(d,
-                                   paddr_to_pfn(addr & PAGE_MASK),
-                                   DIV_ROUND_UP(size, PAGE_SIZE),
-                                   paddr_to_pfn(addr & PAGE_MASK));
+        res = map_regions_cache(d,
+                                paddr_to_pfn(addr & PAGE_MASK),
+                                DIV_ROUND_UP(size, PAGE_SIZE),
+                                paddr_to_pfn(addr & PAGE_MASK));
         if ( res )
         {
              panic(XENLOG_ERR "Unable to map ACPI region 0x%"PRIx64
@@ -1926,10 +1926,10 @@ static int prepare_acpi(struct domain *d, struct kernel_info *kinfo)
     acpi_create_efi_mmap_table(d, &kinfo->mem, tbl_add);
 
     /* Map the EFI and ACPI tables to Dom0 */
-    rc = map_regions_rw_cache(d,
-                              paddr_to_pfn(d->arch.efi_acpi_gpa),
-                              PFN_UP(d->arch.efi_acpi_len),
-                              paddr_to_pfn(virt_to_maddr(d->arch.efi_acpi_table)));
+    rc = map_regions_cache(d,
+                           paddr_to_pfn(d->arch.efi_acpi_gpa),
+                           PFN_UP(d->arch.efi_acpi_len),
+                           paddr_to_pfn(virt_to_maddr(d->arch.efi_acpi_table)));
     if ( rc != 0 )
     {
         printk(XENLOG_ERR "Unable to map EFI/ACPI table 0x%"PRIx64
diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 838d004..3d3fd16 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -1216,30 +1216,30 @@ int p2m_populate_ram(struct domain *d,
                              d->arch.p2m.default_access);
 }
 
-int map_regions_rw_cache(struct domain *d,
-                         unsigned long start_gfn,
-                         unsigned long nr,
-                         unsigned long mfn)
+int map_regions_cache(struct domain *d,
+                      unsigned long start_gfn,
+                      unsigned long nr,
+                      unsigned long mfn)
 {
     return apply_p2m_changes(d, INSERT,
                              pfn_to_paddr(start_gfn),
                              pfn_to_paddr(start_gfn + nr),
                              pfn_to_paddr(mfn),
                              MATTR_MEM, 0, p2m_mmio_direct,
-                             p2m_access_rw);
+                             d->arch.p2m.default_access);
 }
 
-int unmap_regions_rw_cache(struct domain *d,
-                           unsigned long start_gfn,
-                           unsigned long nr,
-                           unsigned long mfn)
+int unmap_regions_cache(struct domain *d,
+                        unsigned long start_gfn,
+                        unsigned long nr,
+                        unsigned long mfn)
 {
     return apply_p2m_changes(d, REMOVE,
                              pfn_to_paddr(start_gfn),
                              pfn_to_paddr(start_gfn + nr),
                              pfn_to_paddr(mfn),
                              MATTR_MEM, 0, p2m_invalid,
-                             p2m_access_rw);
+                             d->arch.p2m.default_access);
 }
 
 int map_mmio_regions(struct domain *d,
diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
index d240d1e..a2d1bbe 100644
--- a/xen/include/asm-arm/p2m.h
+++ b/xen/include/asm-arm/p2m.h
@@ -144,15 +144,15 @@ int p2m_cache_flush(struct domain *d, xen_pfn_t start_mfn, xen_pfn_t end_mfn);
 /* Setup p2m RAM mapping for domain d from start-end. */
 int p2m_populate_ram(struct domain *d, paddr_t start, paddr_t end);
 
-int map_regions_rw_cache(struct domain *d,
-                         unsigned long start_gfn,
-                         unsigned long nr_mfns,
-                         unsigned long mfn);
-
-int unmap_regions_rw_cache(struct domain *d,
-                           unsigned long start_gfn,
-                           unsigned long nr_mfns,
-                           unsigned long mfn);
+int map_regions_cache(struct domain *d,
+                      unsigned long start_gfn,
+                      unsigned long nr_mfns,
+                      unsigned long mfn);
+
+int unmap_regions_cache(struct domain *d,
+                        unsigned long start_gfn,
+                        unsigned long nr_mfns,
+                        unsigned long mfn);
 
 int map_dev_mmio_region(struct domain *d,
                         unsigned long start_gfn,
-- 
2.5.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

             reply	other threads:[~2016-06-08  0:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08  0:15 Edgar E. Iglesias [this message]
2016-06-08  8:17 ` Wei Liu
2016-06-08  8:22   ` Julien Grall
2016-06-08  8:25     ` Wei Liu
2016-06-08  9:36     ` Stefano Stabellini
2016-06-09 15:55       ` Edgar E. Iglesias
2016-06-08  8:24 ` Julien Grall

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=1465344927-3557-1-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=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --subject='Re: [PATCH for-4.7 1/1] xen/arm: Rename map_regions_rw_cache and use p2m.default_access' \
    /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

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).