[PATCH v2 1/3] Pass mmd pointer to __exclude_unnecessary_pages

Petr Tesarik ptesarik at suse.cz
Fri Apr 4 13:25:07 EDT 2014


Pass the mmd pointer itself instead of the individual fields, so additional
information can be kept in mem_map_data.

Signed-off-by: Petr Tesarik <ptesarik at suse.cz>
---
 makedumpfile.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 5e81cc5..81c687b 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -4658,9 +4658,11 @@ initialize_2nd_bitmap_cyclic(struct cycle *cycle)
 }
 
 int
-__exclude_unnecessary_pages(unsigned long mem_map,
-    unsigned long long pfn_start, unsigned long long pfn_end, struct cycle *cycle)
+__exclude_unnecessary_pages(struct mem_map_data *mmd, struct cycle *cycle)
 {
+	unsigned long mem_map = mmd->mem_map;
+	unsigned long long pfn_start = mmd->pfn_start;
+	unsigned long long pfn_end = mmd->pfn_end;
 	unsigned long long pfn, pfn_mm, maddr;
 	unsigned long long pfn_read_start, pfn_read_end, index_pg;
 	unsigned char page_cache[SIZE(page) * PGMM_CACHED];
@@ -4809,8 +4811,7 @@ exclude_unnecessary_pages(void)
 		if (mmd->mem_map == NOT_MEMMAP_ADDR)
 			continue;
 
-		if (!__exclude_unnecessary_pages(mmd->mem_map,
-						 mmd->pfn_start, mmd->pfn_end, NULL))
+		if (!__exclude_unnecessary_pages(mmd, NULL))
 			return FALSE;
 	}
 
@@ -4860,8 +4861,7 @@ exclude_unnecessary_pages_cyclic(struct cycle *cycle)
 
 			if (mmd->pfn_end >= cycle->start_pfn &&
 			    mmd->pfn_start <= cycle->end_pfn) {
-				if (!__exclude_unnecessary_pages(mmd->mem_map,
-								 mmd->pfn_start, mmd->pfn_end, cycle))
+				if (!__exclude_unnecessary_pages(mmd, cycle))
 					return FALSE;
 			}
 		}
-- 
1.8.4.5




More information about the kexec mailing list