aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/init.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-07-01 07:00:57 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-07-27 03:48:23 -0400
commiteda2e5dcc914b4d70f665443efc9780e89a5e5c1 (patch)
tree7ae6f96890ca4a5b7e9c14bf0723f9f275ddfe87 /arch/arm/mm/init.c
parent98864ff58dd2b8ef9e72b0d2c70f34e7ff24a2ee (diff)
ARM: LMB: Convert arm_memory_present() to use LMB memory information
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r--arch/arm/mm/init.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 99d6bc9b89bb..a453982fdcef 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -257,17 +257,16 @@ int pfn_valid(unsigned long pfn)
257} 257}
258EXPORT_SYMBOL(pfn_valid); 258EXPORT_SYMBOL(pfn_valid);
259 259
260static void arm_memory_present(struct meminfo *mi) 260static void arm_memory_present(void)
261{ 261{
262} 262}
263#else 263#else
264static void arm_memory_present(struct meminfo *mi) 264static void arm_memory_present(void)
265{ 265{
266 int i; 266 int i;
267 for_each_bank(i, mi) { 267 for (i = 0; i < memblock.memory.cnt; i++)
268 struct membank *bank = &mi->bank[i]; 268 memory_present(0, memblock_start_pfn(&memblock.memory, i),
269 memory_present(0, bank_pfn_start(bank), bank_pfn_end(bank)); 269 memblock_end_pfn(&memblock.memory, i));
270 }
271} 270}
272#endif 271#endif
273 272
@@ -320,7 +319,7 @@ void __init bootmem_init(void)
320 * Sparsemem tries to allocate bootmem in memory_present(), 319 * Sparsemem tries to allocate bootmem in memory_present(),
321 * so must be done after the fixed reservations 320 * so must be done after the fixed reservations
322 */ 321 */
323 arm_memory_present(mi); 322 arm_memory_present();
324 323
325 /* 324 /*
326 * sparse_init() needs the bootmem allocator up and running. 325 * sparse_init() needs the bootmem allocator up and running.