提交 4e8309ba 编写于 作者: C Cody P Schafer 提交者: Benjamin Herrenschmidt

powerpc/mm: Eliminate unneeded for_each_memblock

The only persistent change made by this loop is calling
memblock_set_node() once for each memblock, which is not useful (and has
no effect) as memblock_set_node() is not called with any
memblock-specific parameters.

Subsistute a single memblock_set_node().
Signed-off-by: NCody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 dfd0436a
...@@ -195,13 +195,10 @@ void __init do_init_bootmem(void) ...@@ -195,13 +195,10 @@ void __init do_init_bootmem(void)
min_low_pfn = MEMORY_START >> PAGE_SHIFT; min_low_pfn = MEMORY_START >> PAGE_SHIFT;
boot_mapsize = init_bootmem_node(NODE_DATA(0), start >> PAGE_SHIFT, min_low_pfn, max_low_pfn); boot_mapsize = init_bootmem_node(NODE_DATA(0), start >> PAGE_SHIFT, min_low_pfn, max_low_pfn);
/* Add active regions with valid PFNs */ /* Place all memblock_regions in the same node and merge contiguous
for_each_memblock(memory, reg) { * memblock_regions
unsigned long start_pfn, end_pfn; */
start_pfn = memblock_region_memory_base_pfn(reg);
end_pfn = memblock_region_memory_end_pfn(reg);
memblock_set_node(0, (phys_addr_t)ULLONG_MAX, 0); memblock_set_node(0, (phys_addr_t)ULLONG_MAX, 0);
}
/* Add all physical memory to the bootmem map, mark each area /* Add all physical memory to the bootmem map, mark each area
* present. * present.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册