]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ARM: LMB: Convert arm_memory_present() to use LMB memory information
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 1 Jul 2010 11:00:57 +0000 (12:00 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 27 Jul 2010 07:48:23 +0000 (08:48 +0100)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/init.c

index 99d6bc9b89bbda2d2cc690cee2bf0c9e49ae339f..a453982fdcefbc25511e03d608d8e362c5c7df22 100644 (file)
@@ -257,17 +257,16 @@ int pfn_valid(unsigned long pfn)
 }
 EXPORT_SYMBOL(pfn_valid);
 
-static void arm_memory_present(struct meminfo *mi)
+static void arm_memory_present(void)
 {
 }
 #else
-static void arm_memory_present(struct meminfo *mi)
+static void arm_memory_present(void)
 {
        int i;
-       for_each_bank(i, mi) {
-               struct membank *bank = &mi->bank[i];
-               memory_present(0, bank_pfn_start(bank), bank_pfn_end(bank));
-       }
+       for (i = 0; i < memblock.memory.cnt; i++)
+               memory_present(0, memblock_start_pfn(&memblock.memory, i),
+                                 memblock_end_pfn(&memblock.memory, i));
 }
 #endif
 
@@ -320,7 +319,7 @@ void __init bootmem_init(void)
         * Sparsemem tries to allocate bootmem in memory_present(),
         * so must be done after the fixed reservations
         */
-       arm_memory_present(mi);
+       arm_memory_present();
 
        /*
         * sparse_init() needs the bootmem allocator up and running.