aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller2008-02-13 18:13:20 -0800
committerDavid S. Miller2008-04-23 23:32:08 -0700
commit3b2a7e23a9808e349bc5fb32327bacc5e81be79c (patch)
tree3f41f419a15df3210113e06bdd785f89f1a39a8c /arch
parent4e82c9a606da2b1c1c7ea7dfd8052626a4c6d5d6 (diff)
[SPARC64]: Initialize LMB tables.
Call lmb_add() on available regions, and call lmb_reserve() on the main kernel image and the ramdisk (if any). Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/mm/init.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 21e9267608c7..6eb76243fa9d 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -24,6 +24,7 @@
#include <linux/cache.h>
#include <linux/sort.h>
#include <linux/percpu.h>
+#include <linux/lmb.h>
#include <asm/head.h>
#include <asm/system.h>
@@ -910,6 +911,8 @@ static void __init find_ramdisk(unsigned long phys_base)
initrd_start = ramdisk_image;
initrd_end = ramdisk_image + sparc_ramdisk_size;
+
+ lmb_reserve(initrd_start, initrd_end);
}
#endif
}
@@ -1337,15 +1340,24 @@ void __init paging_init(void)
sun4v_ktsb_init();
}
+ lmb_init();
+
/* Find available physical memory... */
read_obp_memory("available", &pavail[0], &pavail_ents);
phys_base = 0xffffffffffffffffUL;
- for (i = 0; i < pavail_ents; i++)
+ for (i = 0; i < pavail_ents; i++) {
phys_base = min(phys_base, pavail[i].phys_addr);
+ lmb_add(pavail[i].phys_addr, pavail[i].reg_size);
+ }
+
+ lmb_reserve(kern_base, kern_size);
find_ramdisk(phys_base);
+ lmb_analyze();
+ lmb_dump_all();
+
set_bit(0, mmu_context_bmap);
shift = kern_base + PAGE_OFFSET - ((unsigned long)KERNBASE);