WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEN] Only parse the crashkernel command

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Only parse the crashkernel command line parameter once on boot
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 30 Nov 2006 21:30:57 +0000
Delivery-date: Thu, 30 Nov 2006 13:33:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Node ID 5091a9a55d8677399fa55c721ce0bc2beae9ba74
# Parent  f6993ff5cf49c2e98890ee86a233b95353bee461
[XEN] Only parse the crashkernel command line parameter once on boot
not each time it is requested.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
---
 xen/arch/x86/setup.c |    8 +++-----
 xen/common/kexec.c   |   51 ++++++++++++++++++++++-----------------------------
 2 files changed, 25 insertions(+), 34 deletions(-)

diff -r f6993ff5cf49 -r 5091a9a55d86 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Thu Nov 30 18:44:54 2006 +0000
+++ b/xen/arch/x86/setup.c      Thu Nov 30 18:44:55 2006 +0000
@@ -299,7 +299,6 @@ void __init __start_xen(multiboot_info_t
     unsigned long nr_pages, modules_length;
     paddr_t s, e;
     int i, e820_warn = 0, e820_raw_nr = 0, bytes = 0;
-    xen_kexec_reserve_t crash_area;
     struct ns16550_defaults ns16550 = {
         .data_bits = 8,
         .parity    = 'n',
@@ -480,8 +479,7 @@ void __init __start_xen(multiboot_info_t
 #endif
     }
 
-    machine_kexec_reserved(&crash_area);
-    if ( crash_area.size > 0 )
+    if ( kexec_crash_area.size > 0 )
     {
         unsigned long kdump_start, kdump_size, k;
 
@@ -489,8 +487,8 @@ void __init __start_xen(multiboot_info_t
 
         init_boot_pages(initial_images_start, initial_images_end);
 
-        kdump_start = crash_area.start;
-        kdump_size = crash_area.size;
+        kdump_start = kexec_crash_area.start;
+        kdump_size = kexec_crash_area.size;
 
         printk("Kdump: %luMB (%lukB) at 0x%lx\n",
                kdump_size >> 20,
diff -r f6993ff5cf49 -r 5091a9a55d86 xen/common/kexec.c
--- a/xen/common/kexec.c        Thu Nov 30 18:44:54 2006 +0000
+++ b/xen/common/kexec.c        Thu Nov 30 18:44:55 2006 +0000
@@ -22,9 +22,6 @@
 #include <xen/version.h>
 #include <public/elfnote.h>
 
-static char opt_crashkernel[32] = "";
-string_param("crashkernel", opt_crashkernel);
-
 DEFINE_PER_CPU (crash_note_t, crash_notes);
 cpumask_t crash_saved_cpus;
 int crashing_cpu;
@@ -38,6 +35,26 @@ unsigned long kexec_flags = 0; /* the lo
 unsigned long kexec_flags = 0; /* the lowest bits are for KEXEC_IMAGE... */
 
 spinlock_t kexec_lock = SPIN_LOCK_UNLOCKED;
+
+xen_kexec_reserve_t kexec_crash_area;
+
+static void __init parse_crashkernel(char *str)
+{
+    unsigned long start, size;
+
+    size = parse_size_and_unit(str, &str);
+    if ( *str == '@' )
+        start = parse_size_and_unit(str+1, NULL);
+    else
+        start = 0;
+
+    if ( start && size )
+    {
+        kexec_crash_area.start = start;
+        kexec_crash_area.size = size;
+    }
+}
+custom_param("crashkernel", parse_crashkernel);
 
 static void one_cpu_only(void)
 {
@@ -134,34 +151,10 @@ static __init int register_crashdump_tri
 }
 __initcall(register_crashdump_trigger);
 
-void machine_kexec_reserved(xen_kexec_reserve_t *reservation)
-{
-    unsigned long start, size;
-    char *str = opt_crashkernel;
-
-    memset(reservation, 0, sizeof(*reservation));
-
-    size = parse_size_and_unit(str, &str);
-    if ( *str == '@' )
-        start = parse_size_and_unit(str+1, NULL);
-    else
-        start = 0;
-
-    if ( start && size )
-    {
-        reservation->start = start;
-        reservation->size = size;
-    }
-}
-
 static int kexec_get_reserve(xen_kexec_range_t *range)
 {
-    xen_kexec_reserve_t reservation;
-
-    machine_kexec_reserved(&reservation);
-
-    range->start = reservation.start;
-    range->size = reservation.size;
+    range->start = kexec_crash_area.start;
+    range->size = kexec_crash_area.size;
     return 0;
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN] Only parse the crashkernel command line parameter once on boot, Xen patchbot-unstable <=