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-ia64-devel

[Xen-ia64-devel] [patch 16/16] kexec/kdump: call xen_machine_kexec_setup

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [patch 16/16] kexec/kdump: call xen_machine_kexec_setup_resources() after init_bootmem()
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Thu, 27 Sep 2007 16:31:17 +0900
Cc: Alex Williamson <alex.williamson@xxxxxx>
Delivery-date: Thu, 27 Sep 2007 01:32:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070927073101.163912627@xxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.46-1
Early on in find_memory(), reserve_memory() is called,
which in turn calls xen_machine_kexec_setup_resources()
and in turn alloc_bootmem_low().

However, before alloc_bootmem_low() can be called,
init_bootmem() needs to be called.

To resolve this problem, the call to xen_machine_kexec_setup_resources()
is moved to just after the call to init_bootmem() in alloc_bootmem_low().

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

---
This replaces an earlier patch that made use of a staic allocation
to avoid calling alloc_bootmem_low() in xen_machine_kexec_setup_resources().

Index: linux-2.6.18-xen.hg/arch/ia64/kernel/setup.c
===================================================================
--- linux-2.6.18-xen.hg.orig/arch/ia64/kernel/setup.c   2007-09-27 
13:20:20.000000000 +0900
+++ linux-2.6.18-xen.hg/arch/ia64/kernel/setup.c        2007-09-27 
13:20:29.000000000 +0900
@@ -308,12 +308,9 @@ reserve_memory (void)
                char *from = strstr(saved_command_line, "crashkernel=");
                unsigned long base, size;
 #ifdef CONFIG_XEN
-               if (is_initial_xendomain()) {
-                       if (from)
+               if (is_initial_xendomain() && from)
                                printk("Ignoring crashkernel command line, "
                                       "parameter will be supplied by xen\n");
-                       xen_machine_kexec_setup_resources();
-               }
                else {
 #endif
                if (from) {
Index: linux-2.6.18-xen.hg/arch/ia64/mm/contig.c
===================================================================
--- linux-2.6.18-xen.hg.orig/arch/ia64/mm/contig.c      2007-09-27 
13:20:20.000000000 +0900
+++ linux-2.6.18-xen.hg/arch/ia64/mm/contig.c   2007-09-27 13:23:02.000000000 
+0900
@@ -18,6 +18,9 @@
 #include <linux/efi.h>
 #include <linux/mm.h>
 #include <linux/swap.h>
+#ifdef CONFIG_XEN
+#include <linux/kexec.h>
+#endif
 
 #include <asm/meminit.h>
 #include <asm/pgalloc.h>
@@ -172,6 +175,9 @@ find_memory (void)
        /* Free all available memory, then mark bootmem-map as being in use. */
        efi_memmap_walk(filter_rsvd_memory, free_bootmem);
        reserve_bootmem(bootmap_start, bootmap_size);
+#ifdef CONFIG_XEN
+       xen_machine_kexec_setup_resources();
+#endif
 
        find_initrd();
 

-- 

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/


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

<Prev in Thread] Current Thread [Next in Thread>