aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2019-03-19 09:34:32 -0400
committerRussell King <rmk+kernel@armlinux.org.uk>2019-04-23 12:22:07 -0400
commit14b5f54b78292fdcf12ffb5e914f8fd2d190bcf5 (patch)
tree8610efa1fb6a37838feaf4c6189b774844432e50
parentfe4fb990202e3f525ebfb95999cc4ea2a4dfa4e1 (diff)
ARM: 8850/1: use memblocks_present
arm_memory_present is doing same thing as memblocks_present, so let's use common code memblocks_present instead of platform specific arm_memory_present. Patchwork: https://patchwork.kernel.org/patch/10805693/ Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--arch/arm/mm/init.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index c2daabbe0af0..b2fbb4a711fc 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -182,21 +182,6 @@ int pfn_valid(unsigned long pfn)
182EXPORT_SYMBOL(pfn_valid); 182EXPORT_SYMBOL(pfn_valid);
183#endif 183#endif
184 184
185#ifndef CONFIG_SPARSEMEM
186static void __init arm_memory_present(void)
187{
188}
189#else
190static void __init arm_memory_present(void)
191{
192 struct memblock_region *reg;
193
194 for_each_memblock(memory, reg)
195 memory_present(0, memblock_region_memory_base_pfn(reg),
196 memblock_region_memory_end_pfn(reg));
197}
198#endif
199
200static bool arm_memblock_steal_permitted = true; 185static bool arm_memblock_steal_permitted = true;
201 186
202phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align) 187phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
@@ -293,7 +278,7 @@ void __init bootmem_init(void)
293 * Sparsemem tries to allocate bootmem in memory_present(), 278 * Sparsemem tries to allocate bootmem in memory_present(),
294 * so must be done after the fixed reservations 279 * so must be done after the fixed reservations
295 */ 280 */
296 arm_memory_present(); 281 memblocks_present();
297 282
298 /* 283 /*
299 * sparse_init() needs the bootmem allocator up and running. 284 * sparse_init() needs the bootmem allocator up and running.