提交 132de671 编写于 作者: J Jiang Liu 提交者: Linus Torvalds

mm/metag: prepare for removing num_physpages and simplify mem_init()

Prepare for removing num_physpages and simplify mem_init().
Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 9671468f
......@@ -388,22 +388,16 @@ void __init mem_init(void)
reset_all_zones_managed_pages();
for (tmp = highstart_pfn; tmp < highend_pfn; tmp++)
free_highmem_page(pfn_to_page(tmp));
num_physpages += totalhigh_pages;
#endif /* CONFIG_HIGHMEM */
for_each_online_node(nid) {
pg_data_t *pgdat = NODE_DATA(nid);
num_physpages += pgdat->node_present_pages;
if (pgdat->node_spanned_pages)
free_all_bootmem_node(pgdat);
}
pr_info("Memory: %luk/%luk available\n",
(unsigned long)nr_free_pages() << (PAGE_SHIFT - 10),
num_physpages << (PAGE_SHIFT - 10));
mem_init_print_info(NULL);
show_mem(0);
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册