summaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-06-15 03:32:52 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-08 10:37:25 +0200
commitb5bc6c0e55000dab86b73f838f5ad02908b23755 (patch)
tree4895117f5e69ed8648f102dccc895c80c14fbae5 /mm/page_alloc.c
parentx86: rename two e820 related functions (diff)
downloadlinux-b5bc6c0e55000dab86b73f838f5ad02908b23755.tar.xz
linux-b5bc6c0e55000dab86b73f838f5ad02908b23755.zip
x86, mm: use add_highpages_with_active_regions() for high pages init v2
use early_node_map to init high pages, so we can remove page_is_ram() and page_is_reserved_early() in the big loop with add_one_highpage also remove page_is_reserved_early(), it is not needed anymore. v2: fix the build of other platforms Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d80e1868e570..41c6e3aa059f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2929,6 +2929,14 @@ void __init free_bootmem_with_active_regions(int nid,
}
}
+void __init work_with_active_regions(int nid, work_fn_t work_fn, void *data)
+{
+ int i;
+
+ for_each_active_range_index_in_nid(i, nid)
+ work_fn(early_node_map[i].start_pfn, early_node_map[i].end_pfn,
+ data);
+}
/**
* sparse_memory_present_with_active_regions - Call memory_present for each active range
* @nid: The node to call memory_present for. If MAX_NUMNODES, all nodes will be used.