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-devel] [patch 1/4] kexec: add parent to per-cpu regions at setup ti

To: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch 1/4] kexec: add parent to per-cpu regions at setup time.
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Wed, 27 Feb 2008 16:10:03 +0900
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxx>
Delivery-date: Tue, 26 Feb 2008 23:16:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20080227071002.966248306@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.46-1
This is slightly more efficient as xen_machine_kexec_setup_resorces()
is called once (before xen_machine_kexec_register_resources()). While
xen_machine_kexec_register_resources() is called once for each EFI memory
region seen by a domain.

More cosmetic than anything else, but it seems more logical to me.

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

--- 

 drivers/xen/core/machine_kexec.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Index: linux-2.6.18-xen.hg/drivers/xen/core/machine_kexec.c
===================================================================
--- linux-2.6.18-xen.hg.orig/drivers/xen/core/machine_kexec.c   2008-02-26 
18:37:15.000000000 +0900
+++ linux-2.6.18-xen.hg/drivers/xen/core/machine_kexec.c        2008-02-26 
18:37:17.000000000 +0900
@@ -79,6 +79,10 @@ void __init xen_machine_kexec_setup_reso
        xen_hypervisor_res.end = range.start + range.size - 1;
        xen_hypervisor_res.flags = IORESOURCE_BUSY | IORESOURCE_MEM;
 
+       /* The per-cpu crash note resources belong to the hypervisor resource */
+       for (k = 0; k < xen_max_nr_phys_cpus; k++)
+               request_resource(&xen_hypervisor_res, xen_phys_cpus + k);
+
        /* fill in crashk_res if range is reserved by hypervisor */
 
        memset(&range, 0, sizeof(range));
@@ -106,13 +110,7 @@ void __init xen_machine_kexec_setup_reso
 
 void __init xen_machine_kexec_register_resources(struct resource *res)
 {
-       int k;
-
        request_resource(res, &xen_hypervisor_res);
-
-       for (k = 0; k < xen_max_nr_phys_cpus; k++)
-               request_resource(&xen_hypervisor_res, xen_phys_cpus + k);
-
 }
 
 static void setup_load_arg(xen_kexec_image_t *xki, struct kimage *image)

-- 

-- 
Horms


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