[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [LINUX] Simplify /proc/iomem initialisation -- no need to fake a



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 43f1d77bc7addfd623d842a721b4898a2436bcf9
# Parent  4df81d20a9a1a8dfbe47d1b5697122559d7b6cc9
[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@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c   |    7 +------
 linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c |   14 +++++---------
 2 files changed, 6 insertions(+), 15 deletions(-)

diff -r 4df81d20a9a1 -r 43f1d77bc7ad 
linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c Fri Jun 09 16:18:40 
2006 +0100
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c Fri Jun 09 16:19:42 
2006 +0100
@@ -1459,12 +1459,7 @@ static void __init register_memory(void)
 
        /* Nothing to do if not running in dom0. */
        if (!(xen_start_info->flags & SIF_INITDOMAIN)) {
-               struct e820entry domU_e820 = {
-                       .addr = 0,
-                       .size = max_pfn << PAGE_SHIFT,
-                       .type = E820_RAM,
-               };
-               legacy_init_iomem_resources(&domU_e820, 1,
+               legacy_init_iomem_resources(e820.map, e820.nr_map,
                                            &code_resource, &data_resource);
                return;
        }
diff -r 4df81d20a9a1 -r 43f1d77bc7ad 
linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c       Fri Jun 09 
16:18:40 2006 +0100
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c       Fri Jun 09 
16:19:42 2006 +0100
@@ -919,15 +919,11 @@ void __init setup_arch(char **cmdline_p)
                BUG_ON(HYPERVISOR_memory_op(XENMEM_machine_memory_map, 
&memmap));
 
                e820_reserve_resources(machine_e820, memmap.nr_entries);
-       } else {
-               struct e820entry domU_e820 = {
-                       .addr = 0,
-                       .size = max_pfn << PAGE_SHIFT,
-                       .type = E820_RAM,
-               };
-               e820_reserve_resources(&domU_e820, 1);
-       }
-#elif !defined(CONFIG_XEN)
+       } else if (!(xen_start_info->flags & SIF_INITDOMAIN))
+               e820_reserve_resources(e820.map, e820.nr_map);
+#elif defined(CONFIG_XEN)
+       e820_reserve_resources(e820.map, e820.nr_map);
+#else
        probe_roms();
        e820_reserve_resources(e820.map, e820.nr_map);
 #endif

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.