[PATCH 6/7] kexec: Move crash memory ranges logging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move crash memory ranges logging from get_crash_memory_ranges()
to load_crashdump_segments(). This solution will be used by
fixed Xen kdump support, too.

Signed-off-by: Daniel Kiper <daniel.kiper at oracle.com>
---
 kexec/arch/i386/crashdump-x86.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index 56ef59e..c6b9354 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -270,14 +270,6 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges,
 	*range = crash_memory_range;
 	*ranges = memory_ranges;
 
-	int i;
-	dbgprintf("CRASH MEMORY RANGES\n");
-	for(i = 0; i < memory_ranges; i++) {
-		start = crash_memory_range[i].start;
-		end = crash_memory_range[i].end;
-		dbgprintf("%016Lx-%016Lx\n", start, end);
-	}
-
 	return 0;
 }
 
@@ -739,6 +731,11 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
 
 	get_backup_area(info, mem_range, nr_ranges);
 
+	dbgprintf("CRASH MEMORY RANGES\n");
+
+	for(i = 0; i < nr_ranges; ++i)
+		dbgprintf("%016Lx-%016Lx\n", mem_range[i].start, mem_range[i].end);
+
 	/*
 	 * if the core type has not been set on command line, set it here
 	 * automatically
-- 
1.5.6.5




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux