ia64/linux-2.6.18-xen.hg

changeset 449:621ce063ad83

kexec: add parent to per-cpu regions at setup time.

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@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 28 10:53:42 2008 +0000 (2008-02-28)
parents 439fda3ac269
children b7f980c60a61
files drivers/xen/core/machine_kexec.c
line diff
     1.1 --- a/drivers/xen/core/machine_kexec.c	Thu Feb 28 10:52:47 2008 +0000
     1.2 +++ b/drivers/xen/core/machine_kexec.c	Thu Feb 28 10:53:42 2008 +0000
     1.3 @@ -79,6 +79,10 @@ void __init xen_machine_kexec_setup_reso
     1.4  	xen_hypervisor_res.end = range.start + range.size - 1;
     1.5  	xen_hypervisor_res.flags = IORESOURCE_BUSY | IORESOURCE_MEM;
     1.6  
     1.7 +	/* The per-cpu crash note resources belong to the hypervisor resource */
     1.8 +	for (k = 0; k < xen_max_nr_phys_cpus; k++)
     1.9 +		request_resource(&xen_hypervisor_res, xen_phys_cpus + k);
    1.10 +
    1.11  	/* fill in crashk_res if range is reserved by hypervisor */
    1.12  
    1.13  	memset(&range, 0, sizeof(range));
    1.14 @@ -106,13 +110,7 @@ void __init xen_machine_kexec_setup_reso
    1.15  
    1.16  void __init xen_machine_kexec_register_resources(struct resource *res)
    1.17  {
    1.18 -	int k;
    1.19 -
    1.20  	request_resource(res, &xen_hypervisor_res);
    1.21 -
    1.22 -	for (k = 0; k < xen_max_nr_phys_cpus; k++)
    1.23 -		request_resource(&xen_hypervisor_res, xen_phys_cpus + k);
    1.24 -
    1.25  }
    1.26  
    1.27  static void setup_load_arg(xen_kexec_image_t *xki, struct kimage *image)