android_kernel_motorola_sm6225/arch/x86/mm
Ingo Molnar 23be8c7ddf x86: fix boot crash on HIGHMEM4G && SPARSEMEM
Denys Fedoryshchenko reported a bootup crash when he upgraded
his system from 3GB to 4GB RAM:

   http://lkml.org/lkml/2008/1/7/9

the bug is due to HIGHMEM4G && SPARSEMEM kernels making pfn_to_page()
to return an invalid pointer when the pfn is in a memory hole. The
256 MB PCI aperture at the end of RAM was not mapped by sparsemem,
and hence the pfn was not valid. But set_highmem_pages_init() iterated
this range without checking the pfn's validity first.

this bug was probably present in the sparsemem code ever since sparsemem
has been introduced in v2.6.13. It was masked due to HIGHMEM64G using
larger memory regions in sparsemem_32.h:

 #ifdef CONFIG_X86_PAE
 #define SECTION_SIZE_BITS       30
 #define MAX_PHYSADDR_BITS       36
 #define MAX_PHYSMEM_BITS        36
 #else
 #define SECTION_SIZE_BITS       26
 #define MAX_PHYSADDR_BITS       32
 #define MAX_PHYSMEM_BITS        32
 #endif

which creates 1GB sparsemem regions instead of 64MB sparsemem regions.
So in practice we only ever created true sparsemem holes on x86 with
HIGHMEM4G - but that was rarely used by distros.

( btw., we could probably save 2MB of mem_map[]s on X86_PAE if we reduced
  the sparsemem region size to 256 MB. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-15 16:44:37 +01:00
..
boot_ioremap_32.c spelling fixes: arch/i386/ 2007-10-20 01:13:56 +02:00
discontig_32.c x86: mm/discontig_32.c: make code static 2007-10-30 00:22:22 +01:00
extable_32.c i386: move mm 2007-10-11 11:16:47 +02:00
extable_64.c x86_64: move mm 2007-10-11 11:17:18 +02:00
fault_32.c Merge branch 'v2.6.24-rc1-lockdep' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep 2007-11-03 12:42:52 -07:00
fault_64.c lockdep: fixup irq tracing 2007-10-25 14:01:10 +02:00
highmem_32.c i386: move mm 2007-10-11 11:16:47 +02:00
hugetlbpage.c i386: move mm 2007-10-11 11:16:47 +02:00
init_32.c x86: fix boot crash on HIGHMEM4G && SPARSEMEM 2008-01-15 16:44:37 +01:00
init_64.c memory hotplug x86_64: fix section mismatch in init_memory_mapping() 2007-11-29 09:24:54 -08:00
ioremap_32.c i386: move mm 2007-10-11 11:16:47 +02:00
ioremap_64.c x86_64: move mm 2007-10-11 11:17:18 +02:00
k8topology_64.c x86_64: move mm 2007-10-11 11:17:18 +02:00
Makefile x86_64: move mm 2007-10-11 11:17:18 +02:00
Makefile_32 i386: move mm 2007-10-11 11:16:47 +02:00
Makefile_64 x86_64: move mm 2007-10-11 11:17:18 +02:00
mmap_32.c i386: move mm 2007-10-11 11:16:47 +02:00
mmap_64.c x86_64: move mm 2007-10-11 11:17:18 +02:00
numa_64.c x86: convert cpu_to_apicid to be a per cpu variable 2007-10-19 20:35:03 +02:00
pageattr_32.c x86: Create clflush() inline, remove hardcoded wbinvd 2007-10-17 20:16:12 +02:00
pageattr_64.c Intel IOMMU: clflush_cache_range now takes size param 2007-10-22 08:13:18 -07:00
pgtable_32.c x86: stop nmi softlockup warnings in show_mem() 2007-10-17 20:15:41 +02:00
srat_64.c spelling fixes: arch/x86_64/ 2007-10-20 01:25:36 +02:00