diff options
author | Cody P Schafer <cody@linux.vnet.ibm.com> | 2013-01-09 07:40:18 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-01-28 19:34:25 -0500 |
commit | 4e8309baedfef8360f5b06ccaff8c45cff73cc4f (patch) | |
tree | a09eb20075f5b5e9a31ae53c876f3770571829d6 /arch/powerpc/mm/mem.c | |
parent | dfd0436ad0ce139467b124c646fa65ee2635e14a (diff) |
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: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm/mem.c')
-rw-r--r-- | arch/powerpc/mm/mem.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 0dba5066c22a..40df7c8f2096 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -195,13 +195,10 @@ void __init do_init_bootmem(void) | |||
195 | min_low_pfn = MEMORY_START >> PAGE_SHIFT; | 195 | min_low_pfn = MEMORY_START >> PAGE_SHIFT; |
196 | boot_mapsize = init_bootmem_node(NODE_DATA(0), start >> PAGE_SHIFT, min_low_pfn, max_low_pfn); | 196 | boot_mapsize = init_bootmem_node(NODE_DATA(0), start >> PAGE_SHIFT, min_low_pfn, max_low_pfn); |
197 | 197 | ||
198 | /* Add active regions with valid PFNs */ | 198 | /* Place all memblock_regions in the same node and merge contiguous |
199 | for_each_memblock(memory, reg) { | 199 | * memblock_regions |
200 | unsigned long start_pfn, end_pfn; | 200 | */ |
201 | start_pfn = memblock_region_memory_base_pfn(reg); | 201 | memblock_set_node(0, (phys_addr_t)ULLONG_MAX, 0); |
202 | end_pfn = memblock_region_memory_end_pfn(reg); | ||
203 | memblock_set_node(0, (phys_addr_t)ULLONG_MAX, 0); | ||
204 | } | ||
205 | 202 | ||
206 | /* Add all physical memory to the bootmem map, mark each area | 203 | /* Add all physical memory to the bootmem map, mark each area |
207 | * present. | 204 | * present. |