Commit 6bf1545b authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[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
parent 32f5543d
...@@ -448,7 +448,11 @@ void __init set_highmem_pages_init(int bad_ppro) ...@@ -448,7 +448,11 @@ void __init set_highmem_pages_init(int bad_ppro)
void __init set_max_mapnr_init(void) void __init set_max_mapnr_init(void)
{ {
#ifdef CONFIG_HIGHMEM #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; num_physpages = highend_pfn;
#else #else
num_physpages = max_low_pfn; num_physpages = max_low_pfn;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment