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