]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
[IA64] backport point saved_max_pfn to the max_pfn of the entire system
authorIsaku Yamahata <yamahata@valinux.co.jp>
Mon, 28 Jul 2008 08:22:45 +0000 (17:22 +0900)
committerIsaku Yamahata <yamahata@valinux.co.jp>
Mon, 28 Jul 2008 08:22:45 +0000 (17:22 +0900)
backport Upstream Linux changeset f4a570997e71b892805a1e71303d09c327af135f

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
arch/ia64/kernel/efi.c
arch/ia64/mm/contig.c

index 2f5b0b48cade323d763146652d15a3faece23c76..dae4aaa8d5d0c2a98a1865361492ed1724364281 100644 (file)
@@ -21,6 +21,7 @@
  *     Skip non-WB memory and ignore empty memory ranges.
  */
 #include <linux/module.h>
+#include <linux/bootmem.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
@@ -1015,6 +1016,11 @@ efi_memmap_init(unsigned long *s, unsigned long *e)
                } else
                        ae = efi_md_end(md);
 
+#ifdef CONFIG_CRASH_DUMP
+               /* saved_max_pfn should ignore max_addr= command line arg */
+               if (saved_max_pfn < (ae >> PAGE_SHIFT))
+                       saved_max_pfn = (ae >> PAGE_SHIFT);
+#endif
                /* keep within max_addr= and min_addr= command line arg */
                as = max(as, min_addr);
                ae = min(ae, max_addr);
index 22535d6b30fa9358e2c7e38b7640ef50511cc3be..6df24caed4117b337f83504661c7e4fd6fd193ba 100644 (file)
@@ -181,11 +181,6 @@ find_memory (void)
 
        find_initrd();
 
-#ifdef CONFIG_CRASH_DUMP
-       /* If we are doing a crash dump, we still need to know the real mem
-        * size before original memory map is * reset. */
-       saved_max_pfn = max_pfn;
-#endif
 }
 
 #ifdef CONFIG_SMP