aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/xen/setup.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-09-02 17:10:12 -0700
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-10-22 12:57:29 -0700
commitb5b43ced7a6e79d30df3232b37dc82c5d8dfa843 (patch)
treeb931036d5811e710a1193430d76fff12f719021c /arch/x86/xen/setup.c
parent36bc251b87f88147e9d8346e4b431f42353c3d38 (diff)
xen: add extra pages for E820 RAM regions, even if beyond mem_end
If an entire E820 RAM region is beyond mem_end, still add its pages to the extra area so that space can be used by the kernel. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86/xen/setup.c')
-rw-r--r--arch/x86/xen/setup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index eac010008cd..1e85e26efa6 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -158,9 +158,8 @@ char * __init xen_memory_setup(void)
xen_extra_mem_start = mem_end;
for (i = 0; i < memmap.nr_entries; i++) {
unsigned long long end = map[i].addr + map[i].size;
+
if (map[i].type == E820_RAM) {
- if (map[i].addr > mem_end)
- continue;
if (end > mem_end) {
/* Truncate region to max_mem. */
map[i].size -= end - mem_end;
@@ -169,7 +168,9 @@ char * __init xen_memory_setup(void)
}
} else if (map[i].type != E820_RAM)
xen_extra_mem_start = end;
- if (map[i].size > 0)
+
+ if ((map[i].type != E820_RAM || map[i].addr < mem_end) &&
+ map[i].size > 0)
e820_add_region(map[i].addr, map[i].size, map[i].type);
}