]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
xen/setup: Ignore E820_UNUSABLE when setting 1-1 mappings.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 12 Apr 2011 11:57:15 +0000 (07:57 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 12 May 2011 18:32:13 +0000 (14:32 -0400)
When we parse the raw E820, the Xen hypervisor can set "E820_RAM"
to "E820_UNUSABLE" if the mem=X argument is used. As such we
should _not_ consider the E820_UNUSABLE as an 1-1 identity
mapping, but instead use the same case as for E820_RAM.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/xen/setup.c

index 90bac0aac3a5d42f3c45b48c3980e0fb432eee03..fba4a6cc3a2d45949cdeba25bd4944bb6e358112 100644 (file)
@@ -166,7 +166,7 @@ static unsigned long __init xen_set_identity(const struct e820entry *list,
                if (last > end)
                        continue;
 
-               if (entry->type == E820_RAM) {
+               if ((entry->type == E820_RAM) || (entry->type == E820_UNUSABLE)) {
                        if (start > start_pci)
                                identity += set_phys_range_identity(
                                                PFN_UP(start_pci), PFN_DOWN(start));