aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/discontig_32.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-06-02 02:53:50 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-03 07:26:28 -0400
commit6af61a7614a306fe882a0c2b4ddc63b65aa66efc (patch)
treea4027323b741d9784b5f3755fe7a276c536932ee /arch/x86/mm/discontig_32.c
parent287572cb38de7f270b59191a0fecfa5c5de7765d (diff)
x86: clean up max_pfn_mapped usage - 32-bit
on 32-bit in head_32.S after initial page table is done, we get initial max_pfn_mapped, and then kernel_physical_mapping_init will give us a final one. We need to use that to make sure find_e820_area will get valid addresses for boot_map and for NODE_DATA(0) on numa32. XEN PV and lguest may need to assign max_pfn_mapped too. 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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c
index 73a983489c60..914a81ee7855 100644
--- a/arch/x86/mm/discontig_32.c
+++ b/arch/x86/mm/discontig_32.c
@@ -163,7 +163,8 @@ static void __init allocate_pgdat(int nid)
163 else { 163 else {
164 unsigned long pgdat_phys; 164 unsigned long pgdat_phys;
165 pgdat_phys = find_e820_area(min_low_pfn<<PAGE_SHIFT, 165 pgdat_phys = find_e820_area(min_low_pfn<<PAGE_SHIFT,
166 max_low_pfn<<PAGE_SHIFT, sizeof(pg_data_t), 166 (nid ? max_low_pfn:max_pfn_mapped)<<PAGE_SHIFT,
167 sizeof(pg_data_t),
167 PAGE_SIZE); 168 PAGE_SIZE);
168 NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(pgdat_phys>>PAGE_SHIFT)); 169 NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(pgdat_phys>>PAGE_SHIFT));
169 reserve_early(pgdat_phys, pgdat_phys + sizeof(pg_data_t), 170 reserve_early(pgdat_phys, pgdat_phys + sizeof(pg_data_t),