[xen master] xen/arm: mm: Use gaddr_to_gfn rather than _gfn(paddr_to_pfn(...))

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] xen/arm: mm: Use gaddr_to_gfn rather than _gfn(paddr_to_pfn(...))

patchbot
commit f737bc25c222dc6153412afac121a756601bb348
Author:     Julien Grall <[hidden email]>
AuthorDate: Wed Feb 21 13:46:23 2018 +0000
Commit:     Julien Grall <[hidden email]>
CommitDate: Fri Apr 6 09:43:29 2018 +0100

    xen/arm: mm: Use gaddr_to_gfn rather than _gfn(paddr_to_pfn(...))
   
    Signed-off-by: Julien Grall <[hidden email]>
    Reviewed-by: George Dunlap <[hidden email]>
    Acked-by: Stefano Stabellini <[hidden email]>
---
 xen/arch/arm/mm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index baa3b0de1d..1126e246c0 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -1431,7 +1431,7 @@ int create_grant_host_mapping(unsigned long addr, unsigned long frame,
     if ( flags & GNTMAP_readonly )
         t = p2m_grant_map_ro;
 
-    rc = guest_physmap_add_entry(current->domain, _gfn(addr >> PAGE_SHIFT),
+    rc = guest_physmap_add_entry(current->domain, gaddr_to_gfn(addr),
                                  _mfn(frame), 0, t);
 
     if ( rc )
@@ -1443,7 +1443,7 @@ int create_grant_host_mapping(unsigned long addr, unsigned long frame,
 int replace_grant_host_mapping(unsigned long addr, unsigned long mfn,
         unsigned long new_addr, unsigned int flags)
 {
-    gfn_t gfn = _gfn(addr >> PAGE_SHIFT);
+    gfn_t gfn = gaddr_to_gfn(addr);
     struct domain *d = current->domain;
     int rc;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog