ia64/xen-unstable

changeset 10349:43f1d77bc7ad

[LINUX] Simplify /proc/iomem initialisation -- no need to fake a
domU memory map. The main e820 map already terminates at max_pfn.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Jun 09 16:19:42 2006 +0100 (2006-06-09)
parents 4df81d20a9a1
children c1163951ee2f
files linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c	Fri Jun 09 16:18:40 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c	Fri Jun 09 16:19:42 2006 +0100
     1.3 @@ -1459,12 +1459,7 @@ static void __init register_memory(void)
     1.4  
     1.5  	/* Nothing to do if not running in dom0. */
     1.6  	if (!(xen_start_info->flags & SIF_INITDOMAIN)) {
     1.7 -		struct e820entry domU_e820 = {
     1.8 -			.addr = 0,
     1.9 -			.size = max_pfn << PAGE_SHIFT,
    1.10 -			.type = E820_RAM,
    1.11 -		};
    1.12 -		legacy_init_iomem_resources(&domU_e820, 1,
    1.13 +		legacy_init_iomem_resources(e820.map, e820.nr_map,
    1.14  					    &code_resource, &data_resource);
    1.15  		return;
    1.16  	}
     2.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c	Fri Jun 09 16:18:40 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c	Fri Jun 09 16:19:42 2006 +0100
     2.3 @@ -919,15 +919,11 @@ void __init setup_arch(char **cmdline_p)
     2.4  		BUG_ON(HYPERVISOR_memory_op(XENMEM_machine_memory_map, &memmap));
     2.5  
     2.6  		e820_reserve_resources(machine_e820, memmap.nr_entries);
     2.7 -	} else {
     2.8 -		struct e820entry domU_e820 = {
     2.9 -			.addr = 0,
    2.10 -			.size = max_pfn << PAGE_SHIFT,
    2.11 -			.type = E820_RAM,
    2.12 -		};
    2.13 -		e820_reserve_resources(&domU_e820, 1);
    2.14 -	}
    2.15 -#elif !defined(CONFIG_XEN)
    2.16 +	} else if (!(xen_start_info->flags & SIF_INITDOMAIN))
    2.17 +		e820_reserve_resources(e820.map, e820.nr_map);
    2.18 +#elif defined(CONFIG_XEN)
    2.19 +	e820_reserve_resources(e820.map, e820.nr_map);
    2.20 +#else
    2.21  	probe_roms();
    2.22  	e820_reserve_resources(e820.map, e820.nr_map);
    2.23  #endif