linux/arch/x86/mm
Dave Young e621bd1895 i386: vmalloc size fix
Booting kernel with vmalloc=[any size<=16m] will oops on my pc (i386/1G memory).

BUG_ON in arch/x86/mm/init_32.c triggered:
BUG_ON((unsigned long)high_memory > VMALLOC_START);

It's due to the vm area hole.

In include/asm-x86/pgtable_32.h:
#define VMALLOC_OFFSET	(8 * 1024 * 1024)
#define VMALLOC_START	(((unsigned long)high_memory + 2 * VMALLOC_OFFSET - 1) \
			 & ~(VMALLOC_OFFSET - 1))

There's several related point:
1. MAXMEM :
 (-__PAGE_OFFSET - __VMALLOC_RESERVE).
The space after VMALLOC_END is included as well, I set it to
(VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE)

2. VMALLOC_OFFSET is not considered in __VMALLOC_RESERVE
fixed by adding VMALLOC_OFFSET to it.

3. VMALLOC_START :
 (((unsigned long)high_memory + 2 * VMALLOC_OFFSET - 1) & ~(VMALLOC_OFFSET - 1))
So it's not always 8M, bigger than 8M possible.
I set it to ((unsigned long)high_memory + VMALLOC_OFFSET)

4. the VMALLOC_RESERVE is an unused macro, so remove it here.

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Cc: akpm@linux-foundation.org
Cc: hidave.darkstar@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-08-21 10:13:21 +02:00
..
discontig_32.c mm: move bootmem descriptors definition to a single place 2008-07-24 10:47:14 -07:00
dump_pagetables.c x86: add PTE_FLAGS_MASK 2008-07-22 10:43:45 +02:00
extable.c x86: unify extable_{32|64}.c 2008-01-30 13:31:41 +01:00
fault.c Merge branch 'auto-ftrace-next' into tracing/for-linus 2008-07-14 16:11:52 +02:00
gup.c Fix 'get_user_pages_fast()' with non-page-aligned start address 2008-07-28 17:54:21 -07:00
highmem_32.c x86: unexport kmap_atomic_to_page 2008-04-30 23:15:34 +02:00
hugetlbpage.c x86: add hugepagesz option on 64-bit 2008-07-24 10:47:19 -07:00
init_32.c Merge branches 'x86/urgent', 'x86/amd-iommu', 'x86/apic', 'x86/cleanups', 'x86/core', 'x86/cpu', 'x86/fixmap', 'x86/gart', 'x86/kprobes', 'x86/memtest', 'x86/modules', 'x86/nmi', 'x86/pat', 'x86/reboot', 'x86/setup', 'x86/step', 'x86/unify-pci', 'x86/uv', 'x86/xen' and 'xen-64bit' into x86/for-linus 2008-07-21 16:37:17 +02:00
init_64.c x86: fix section mismatch warning - spp_getpage() 2008-08-15 19:16:06 +02:00
ioremap.c x86: Fix ioremap off by one BUG 2008-08-15 18:18:38 +02:00
k8topology_64.c x86: remove end_pfn in 64bit 2008-07-08 13:10:38 +02:00
kmmio.c - fix mmioftrace + rcu merge interaction 2008-05-25 09:51:43 +02:00
Makefile mm: Make generic weak get_user_pages_fast and EXPORT_GPL it 2008-08-12 17:52:53 +10:00
memtest.c x86: seperate memtest from init_64.c 2008-07-18 14:10:27 +02:00
mmap.c x86: unify mmap_{32|64}.c 2008-01-30 13:31:10 +01:00
mmio-mod.c x86 mmiotrace: page level is unsigned 2008-05-24 11:27:47 +02:00
numa_64.c mm: move bootmem descriptors definition to a single place 2008-07-24 10:47:14 -07:00
pageattr-test.c x86: use WARN() in arch/x86/mm/pageattr.c 2008-08-13 19:05:39 +02:00
pageattr.c x86: fix /proc/meminfo DirectMap 2008-08-15 15:27:55 +02:00
pat.c Merge branches 'x86/urgent', 'x86/amd-iommu', 'x86/apic', 'x86/cleanups', 'x86/core', 'x86/cpu', 'x86/fixmap', 'x86/gart', 'x86/kprobes', 'x86/memtest', 'x86/modules', 'x86/nmi', 'x86/pat', 'x86/reboot', 'x86/setup', 'x86/step', 'x86/unify-pci', 'x86/uv', 'x86/xen' and 'xen-64bit' into x86/for-linus 2008-07-21 16:37:17 +02:00
pf_in.c x86 mmiotrace: move files into arch/x86/mm/. 2008-05-24 11:25:37 +02:00
pf_in.h x86 mmiotrace: move files into arch/x86/mm/. 2008-05-24 11:25:37 +02:00
pgtable.c x86: work around gcc 3.4.x bug 2008-08-11 18:44:02 +02:00
pgtable_32.c i386: vmalloc size fix 2008-08-21 10:13:21 +02:00
srat_32.c x86: don't call e820_regiter_active_regions if out of range on node 2008-08-14 11:35:52 +02:00
srat_64.c x86: reserve SLIT 2008-07-11 10:22:33 +02:00
testmmiotrace.c mmiotrace: code style cleanups 2008-05-24 11:27:28 +02:00