alistair23-linux/arch
Zou Nan hai a3f5c338b9 [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>
2007-03-20 13:41:57 -07:00
..
alpha
arm [PATCH] add CONFIG_GENERIC_GPIO 2007-03-05 07:57:51 -08:00
arm26 [PATCH] arch/arm26/kernel/entry.S: remove dead code 2007-03-01 14:53:35 -08:00
avr32 [AVR32] Don't use kmap() in flush_icache_page() 2007-03-07 10:50:29 +01:00
cris [PATCH] fix memory leak in dma_declare_coherent_memory() 2007-03-01 14:53:39 -08:00
frv [PATCH] FRV: No ZONE_DMA 2007-03-01 14:53:36 -08:00
h8300 [PATCH] Declare init_irq_proc before we use it. 2007-02-19 14:21:50 -08:00
i386 Pull bugzilla-5966 into release branch 2007-03-09 23:18:05 -05:00
ia64 [IA64] min_low_pfn and max_low_pfn calculation fix 2007-03-20 13:41:57 -07:00
m32r Various typo fixes. 2007-02-17 19:07:33 +01:00
m68k [PATCH] Declare init_irq_proc before we use it. 2007-02-19 14:21:50 -08:00
m68knommu [PATCH] m68knommu: remove local_bh_count 2007-03-06 18:08:38 -08:00
mips [MIPS] Sibyte: Fix ZBbus profiler 2007-03-09 20:27:31 +00:00
parisc [PARISC] clocksource: Move update_cr16_clocksource later in boot 2007-02-26 22:21:22 -05:00
powerpc [POWERPC] 85xx: Enable CONFIG_SERIAL_8250_SHARE_IRQ 2007-03-07 23:14:57 -06:00
ppc mv643xx_eth: Place explicit port number in mv643xx_eth_platform_data 2007-03-06 06:14:54 -05:00
s390 [S390] Fixed handling of access register mode faults. 2007-03-05 23:35:54 +01:00
sh sh: Kill off I/O cruft for R7780RP. 2007-03-05 20:19:57 +09:00
sh64
sparc [SPARC]: Provide pci_device_to_OF_node() just like powerpc. 2007-03-02 15:22:51 -08:00
sparc64 [SPARC]: Provide pci_device_to_OF_node() just like powerpc. 2007-03-02 15:22:51 -08:00
um [PATCH] uml: arch_prctl should set thread fs 2007-03-08 07:38:22 -08:00
v850 kbuild: Replace remaining "depends" with "depends on" 2007-02-17 19:05:24 +01:00
x86_64 [PATCH] ACPI: repair nvidia early quirk breakage on x86_64 2007-03-08 16:06:07 -08:00
xtensa