[xen master] x86_64/mm: drop redundant MFN to page conventions in cleanup_frame_table()

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

[xen master] x86_64/mm: drop redundant MFN to page conventions in cleanup_frame_table()

patchbot
commit 59f224a90d1286770667fea213e8c17486dd4db4
Author:     Haozhong Zhang <[hidden email]>
AuthorDate: Mon Sep 11 12:37:43 2017 +0800
Commit:     Andrew Cooper <[hidden email]>
CommitDate: Fri Dec 1 19:03:27 2017 +0000

    x86_64/mm: drop redundant MFN to page conventions in cleanup_frame_table()
   
    Replace pdx_to_page(pfn_to_pdx(pfn)) by mfn_to_page(pfn), which is
    identical to the former.
   
    Signed-off-by: Haozhong Zhang <[hidden email]>
    Reviewed-by: Andrew Cooper <[hidden email]>
---
 xen/arch/x86/x86_64/mm.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 34cd845..9b37da6 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -720,12 +720,11 @@ static void cleanup_frame_table(struct mem_hotadd_info *info)
     spfn = info->spfn;
     epfn = info->epfn;
 
-    sva = (unsigned long)pdx_to_page(pfn_to_pdx(spfn));
-    eva = (unsigned long)pdx_to_page(pfn_to_pdx(epfn));
+    sva = (unsigned long)mfn_to_page(spfn);
+    eva = (unsigned long)mfn_to_page(epfn);
 
     /* Intialize all page */
-    memset(mfn_to_page(spfn), -1,
-           (unsigned long)mfn_to_page(epfn) - (unsigned long)mfn_to_page(spfn));
+    memset((void *)sva, -1, eva - sva);
 
     while (sva < eva)
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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