diff options
| author | Andi Kleen <ak@muc.de> | 2004-07-17 06:49:01 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-17 06:49:01 -0700 |
| commit | 6bf1545b847e64e7f048fda19c24297c95a00cf6 (patch) | |
| tree | 4006ef304721a0cca6f042472b857d96c011a672 | |
| parent | 32f5543d552793dfdc2576668422b7fbdf32d01c (diff) | |
[PATCH] Fix i386 bootup with HIGHMEM+SLAB_DEBUG+NUMA and no real
For some reason I booted a NUMA and SLAB_DEBUG i386 kernel on a non
NUMA 512MB machine. This caused an oops at bootup in change_page_attr.
The reason was that highmem_start_start page ended up zero and
that triggered the highmem check in change_page_attr when the
slab debug code would unmap a kernel mapping.
Fix is straightforward: if there is no highmem set highmem_start_page
to max_low_pfn+1
| -rw-r--r-- | arch/i386/mm/discontig.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c index 9eecccc5b99d..569e08e5bbd9 100644 --- a/arch/i386/mm/discontig.c +++ b/arch/i386/mm/discontig.c @@ -448,7 +448,11 @@ void __init set_highmem_pages_init(int bad_ppro) void __init set_max_mapnr_init(void) { #ifdef CONFIG_HIGHMEM - highmem_start_page = NODE_DATA(0)->node_zones[ZONE_HIGHMEM].zone_mem_map; + struct zone *high0 = &NODE_DATA(0)->node_zones[ZONE_HIGHMEM]; + if (high0->spanned_pages > 0) + highmem_start_page = high0->zone_mem_map; + else + highmem_start_page = pfn_to_page(max_low_pfn+1); num_physpages = highend_pfn; #else num_physpages = max_low_pfn; |
