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

[Xen-devel] [PATCH 3/7] kexec: Move crash kernel area placement and size detection to is_crashkernel_mem_reserved()



Move crash kernel area placement and size detection
from get_crash_memory_ranges() to is_crashkernel_mem_reserved().
Former one will not be used by fixed Xen kdump support.

Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>
---
 kexec/arch/i386/crashdump-x86.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index 2af090c..ec9432b 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -212,13 +212,6 @@ static int get_crash_memory_ranges(struct memory_range 
**range, int *ranges,
                /* Only Dumping memory of type System RAM. */
                if (memcmp(str, "System RAM\n", 11) == 0) {
                        type = RANGE_RAM;
-               } else if (memcmp(str, "Crash kernel\n", 13) == 0) {
-                               /* Reserved memory region. New kernel can
-                                * use this region to boot into. */
-                               crash_reserved_mem.start = start;
-                               crash_reserved_mem.end = end;
-                               crash_reserved_mem.type = RANGE_RAM;
-                               continue;
                } else if (memcmp(str, "ACPI Tables\n", 12) == 0) {
                        /*
                         * ACPI Tables area need to be passed to new
@@ -849,6 +842,12 @@ int is_crashkernel_mem_reserved(void)
 {
        uint64_t start, end;
 
-       return parse_iomem_single("Crash kernel\n", &start, &end) == 0 ?
-         (start != end) : 0;
+       if (parse_iomem_single("Crash kernel\n", &start, &end) || start == end)
+               return 0;
+
+       crash_reserved_mem.start = start;
+       crash_reserved_mem.end = end;
+       crash_reserved_mem.type = RANGE_RAM;
+
+       return 1;
 }
-- 
1.5.6.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.