[xen master] mm: change boot_scrub_done definition

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

[xen master] mm: change boot_scrub_done definition

patchbot
commit 845a7c89687a10fc2427ab078d7d13403662bcf7
Author:     Boris Ostrovsky <[hidden email]>
AuthorDate: Fri Sep 1 11:05:45 2017 +0200
Commit:     Jan Beulich <[hidden email]>
CommitDate: Fri Sep 1 11:05:45 2017 +0200

    mm: change boot_scrub_done definition
   
    Rename it to the more appropriate scrub_debug and define as a macro
    for !CONFIG_SCRUB_DEBUG. This will allow us to get rid of some
    ifdefs (here and in the subsequent patch).
   
    Suggested-by: Jan Beulich <[hidden email]>
    Signed-off-by: Boris Ostrovsky <[hidden email]>
    Reviewed-by: Wei Liu <[hidden email]>
---
 xen/common/page_alloc.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 43f5a38..2c7675b 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -171,7 +171,9 @@ static unsigned long __initdata opt_bootscrub_chunk = MB(128);
 size_param("bootscrub_chunk", opt_bootscrub_chunk);
 
 #ifdef CONFIG_SCRUB_DEBUG
-static bool __read_mostly boot_scrub_done;
+static bool __read_mostly scrub_debug;
+#else
+#define scrub_debug    false
 #endif
 
 /*
@@ -725,7 +727,7 @@ static void check_one_page(struct page_info *pg)
     const uint64_t *ptr;
     unsigned int i;
 
-    if ( !boot_scrub_done )
+    if ( !scrub_debug )
         return;
 
     ptr = map_domain_page(mfn);
@@ -1696,12 +1698,7 @@ static void init_heap_pages(
             nr_pages -= n;
         }
 
-#ifndef CONFIG_SCRUB_DEBUG
-        free_heap_pages(pg + i, 0, false);
-#else
-        free_heap_pages(pg + i, 0, boot_scrub_done);
-#endif
-
+        free_heap_pages(pg + i, 0, scrub_debug);
     }
 }
 
@@ -1965,7 +1962,7 @@ static void __init scrub_heap_pages(void)
     printk("done.\n");
 
 #ifdef CONFIG_SCRUB_DEBUG
-    boot_scrub_done = true;
+    scrub_debug = true;
 #endif
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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