Skip to content

Commit

Permalink
[IA64] point saved_max_pfn to the max_pfn of the entire system
Browse files Browse the repository at this point in the history
Make saved_max_pfn point to max_pfn of entire system.

Without this patch is so that vmcore is zero length on ia64.  This is
because saved_max_pfn was wrongly being set to the max_pfn of the crash
kernel's address space, rather than the max_pfg on the physical memory of
the machine - the whole purpose of vmcore is to access physical memory that
is not part of the crash kernel's addresss space.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Sort-Of-Acked-By: Jay Lan <jlan@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Horms authored and Tony Luck committed Mar 6, 2007
1 parent 25667d6 commit f4a5709
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
6 changes: 6 additions & 0 deletions arch/ia64/kernel/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -1009,6 +1010,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);
Expand Down
5 changes: 0 additions & 5 deletions arch/ia64/mm/contig.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,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
Expand Down
6 changes: 0 additions & 6 deletions arch/ia64/mm/discontig.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,6 @@ void __init find_memory(void)
max_pfn = max_low_pfn;

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
Expand Down

0 comments on commit f4a5709

Please sign in to comment.