aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/discontig_32.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-05-29 15:57:22 -0400
committerIngo Molnar <mingo@elte.hu>2008-05-31 03:55:50 -0400
commit163872950dc856fd23849c27f60049feaac49ae6 (patch)
tree15307c36c2e3c7cd13b7f1b64bf583f29f46f377 /arch/x86/mm/discontig_32.c
parentf0d43100f13be0fa5bf52741d7084bb27f00e621 (diff)
x86: extend e820 early_res support 32bit -fix #4
reserve_early pgdata for 32bit numa Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/discontig_32.c')
-rw-r--r--arch/x86/mm/discontig_32.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c
index 914ccf983687..47749727907e 100644
--- a/arch/x86/mm/discontig_32.c
+++ b/arch/x86/mm/discontig_32.c
@@ -159,8 +159,13 @@ static void __init allocate_pgdat(int nid)
159 if (nid && node_has_online_mem(nid)) 159 if (nid && node_has_online_mem(nid))
160 NODE_DATA(nid) = (pg_data_t *)node_remap_start_vaddr[nid]; 160 NODE_DATA(nid) = (pg_data_t *)node_remap_start_vaddr[nid];
161 else { 161 else {
162 NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(min_low_pfn)); 162 unsigned long pgdat_phys;
163 min_low_pfn += PFN_UP(sizeof(pg_data_t)); 163 pgdat_phys = find_e820_area(min_low_pfn<<PAGE_SHIFT,
164 max_low_pfn<<PAGE_SHIFT, sizeof(pg_data_t),
165 PAGE_SIZE);
166 NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(pgdat_phys>>PAGE_SHIFT));
167 reserve_early(pgdat_phys, pgdat_phys + sizeof(pg_data_t),
168 "NODE_DATA");
164 } 169 }
165} 170}
166 171