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

[Xen-ia64-devel] [patch 16/16] kexec/kdump: call xen_machine_kexec_setup_resources() after init_bootmem()



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


 


Rackspace

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