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] kexec/kdump: statically allocate xen_phys_cpus

To: xen-ia64@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] kexec/kdump: statically allocate xen_phys_cpus
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Thu, 20 Sep 2007 13:38:51 +0900 (JST)
Cc: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
Delivery-date: Wed, 19 Sep 2007 23:36:43 -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>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
On IA64 alloc_bootmem_low() can't be called this early.

Before alloc_bootmem_low() can be called init_bootmem(), which is called in
find_memory(). However xen_machine_kexec_setup_resources() is indirectly
called earlier on in find_memory().

Cc: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

---
Date: Thu, 20 Sep 2007 13:37:10 +0900
From: Simon Horman <horms@xxxxxxxxxxxx>

Posted to xen-devel as it changes common code.
As suggested by Alex Williamson.

Index: x/drivers/xen/core/machine_kexec.c
===================================================================
--- x/drivers/xen/core/machine_kexec.c  2007-05-11 18:19:20.000000000 +0900
+++ x/drivers/xen/core/machine_kexec.c  2007-05-14 19:18:03.000000000 +0900
@@ -13,7 +13,7 @@ extern void machine_kexec_setup_load_arg
 
 static int __initdata xen_max_nr_phys_cpus;
 static struct resource xen_hypervisor_res;
-static struct resource *xen_phys_cpus;
+static struct resource xen_phys_cpus[NR_CPUS];
 
 void __init xen_machine_kexec_setup_resources(void)
 {
@@ -42,11 +42,6 @@ void xen_machine_kexec_setup_resources(v
 
        xen_max_nr_phys_cpus = k;
 
-       /* allocate xen_phys_cpus */
-
-       xen_phys_cpus = alloc_bootmem_low(k * sizeof(struct resource));
-       BUG_ON(xen_phys_cpus == NULL);
-
        /* fill in xen_phys_cpus with per-cpu crash note information */
 
        for (k = 0; k < xen_max_nr_phys_cpus; k++) {

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

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