diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-30 11:04:14 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-30 11:04:14 +0100 |
commit | c79c33af8f867e57ad4b84102db7901aee67485a (patch) | |
tree | aa619736b89a143cfc48f9647493c929523a928a /arch/x86/xen/setup.c | |
parent | 1c9a341bbdc14051a4d8c74ea67269786c7d3736 (diff) | |
parent | 824ef826f3c4d83d1925a5e351313bfd3e5ca6cb (diff) | |
download | op-kernel-dev-c79c33af8f867e57ad4b84102db7901aee67485a.zip op-kernel-dev-c79c33af8f867e57ad4b84102db7901aee67485a.tar.gz |
Merge remote-tracking branch 'asoc/topic/core' into tmp
Diffstat (limited to 'arch/x86/xen/setup.c')
-rw-r--r-- | arch/x86/xen/setup.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 056d11f..8f3eea6 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -313,6 +313,17 @@ static void xen_align_and_add_e820_region(u64 start, u64 size, int type) e820_add_region(start, end - start, type); } +void xen_ignore_unusable(struct e820entry *list, size_t map_size) +{ + struct e820entry *entry; + unsigned int i; + + for (i = 0, entry = list; i < map_size; i++, entry++) { + if (entry->type == E820_UNUSABLE) + entry->type = E820_RAM; + } +} + /** * machine_specific_memory_setup - Hook for machine specific memory setup. **/ @@ -353,6 +364,17 @@ char * __init xen_memory_setup(void) } BUG_ON(rc); + /* + * Xen won't allow a 1:1 mapping to be created to UNUSABLE + * regions, so if we're using the machine memory map leave the + * region as RAM as it is in the pseudo-physical map. + * + * UNUSABLE regions in domUs are not handled and will need + * a patch in the future. + */ + if (xen_initial_domain()) + xen_ignore_unusable(map, memmap.nr_entries); + /* Make sure the Xen-supplied memory map is well-ordered. */ sanitize_e820_map(map, memmap.nr_entries, &memmap.nr_entries); |