aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64/meminit.h
diff options
context:
space:
mode:
authorZou Nan hai <nanhai.zou@intel.com>2007-03-20 16:41:57 -0400
committerTony Luck <tony.luck@intel.com>2007-03-20 16:41:57 -0400
commita3f5c338b9f30f328276739d9589beae19254936 (patch)
tree5c197e9c6565382a548180bdfb57ee5315d9fc60 /include/asm-ia64/meminit.h
parentbe521466feb3bb1cd89de82a2b1d080e9ebd3cb6 (diff)
[IA64] min_low_pfn and max_low_pfn calculation fix
We have seen bad_pte_print when testing crashdump on an SN machine in recent 2.6.20 kernel. There are tons of bad pte print (pfn < max_low_pfn) reports when the crash kernel boots up, all those reported bad pages are inside initmem range; That is because if the crash kernel code and data happens to be at the beginning of the 1st node. build_node_maps in discontig.c will bypass reserved regions with filter_rsvd_memory. Since min_low_pfn is calculated in build_node_map, so in this case, min_low_pfn will be greater than kernel code and data. Because pages inside initmem are freed and reused later, we saw pfn_valid check fail on those pages. I think this theoretically happen on a normal kernel. When I check min_low_pfn and max_low_pfn calculation in contig.c and discontig.c. I found more issues than this. 1. min_low_pfn and max_low_pfn calculation is inconsistent between contig.c and discontig.c, min_low_pfn is calculated as the first page number of boot memmap in contig.c (Why? Though this may work at the most of the time, I don't think it is the right logic). It is calculated as the lowest physical memory page number bypass reserved regions in discontig.c. max_low_pfn is calculated include reserved regions in contig.c. It is calculated exclude reserved regions in discontig.c. 2. If kernel code and data region is happen to be at the begin or the end of physical memory, when min_low_pfn and max_low_pfn calculation is bypassed kernel code and data, pages in initmem will report bad. 3. initrd is also in reserved regions, if it is at the begin or at the end of physical memory, kernel will refuse to reuse the memory. Because the virt_addr_valid check in free_initrd_mem. So it is better to fix and clean up those issues. Calculate min_low_pfn and max_low_pfn in a consistent way. Signed-off-by: Zou Nan hai <nanhai.zou@intel.com> Acked-by: Jay Lan <jlan@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64/meminit.h')
-rw-r--r--include/asm-ia64/meminit.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h
index 21ec5f3d23de..3a62878e84f3 100644
--- a/include/asm-ia64/meminit.h
+++ b/include/asm-ia64/meminit.h
@@ -36,6 +36,7 @@ extern void reserve_memory (void);
36extern void find_initrd (void); 36extern void find_initrd (void);
37extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg); 37extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg);
38extern void efi_memmap_init(unsigned long *, unsigned long *); 38extern void efi_memmap_init(unsigned long *, unsigned long *);
39extern int find_max_min_low_pfn (unsigned long , unsigned long, void *);
39 40
40extern unsigned long vmcore_find_descriptor_size(unsigned long address); 41extern unsigned long vmcore_find_descriptor_size(unsigned long address);
41extern int reserve_elfcorehdr(unsigned long *start, unsigned long *end); 42extern int reserve_elfcorehdr(unsigned long *start, unsigned long *end);