Commit 16387295 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: extend e820 early_res support 32bit -fix #4

reserve_early pgdata for 32bit numa
Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f0d43100
...@@ -159,8 +159,13 @@ static void __init allocate_pgdat(int nid) ...@@ -159,8 +159,13 @@ static void __init allocate_pgdat(int nid)
if (nid && node_has_online_mem(nid)) if (nid && node_has_online_mem(nid))
NODE_DATA(nid) = (pg_data_t *)node_remap_start_vaddr[nid]; NODE_DATA(nid) = (pg_data_t *)node_remap_start_vaddr[nid];
else { else {
NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(min_low_pfn)); unsigned long pgdat_phys;
min_low_pfn += PFN_UP(sizeof(pg_data_t)); pgdat_phys = find_e820_area(min_low_pfn<<PAGE_SHIFT,
max_low_pfn<<PAGE_SHIFT, sizeof(pg_data_t),
PAGE_SIZE);
NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(pgdat_phys>>PAGE_SHIFT));
reserve_early(pgdat_phys, pgdat_phys + sizeof(pg_data_t),
"NODE_DATA");
} }
} }
......
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