diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc64/mm/init.c | 14 |
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 @@ | |||
24 | #include <linux/cache.h> | 24 | #include <linux/cache.h> |
25 | #include <linux/sort.h> | 25 | #include <linux/sort.h> |
26 | #include <linux/percpu.h> | 26 | #include <linux/percpu.h> |
27 | #include <linux/lmb.h> | ||
27 | 28 | ||
28 | #include <asm/head.h> | 29 | #include <asm/head.h> |
29 | #include <asm/system.h> | 30 | #include <asm/system.h> |
@@ -910,6 +911,8 @@ static void __init find_ramdisk(unsigned long phys_base) | |||
910 | 911 | ||
911 | initrd_start = ramdisk_image; | 912 | initrd_start = ramdisk_image; |
912 | initrd_end = ramdisk_image + sparc_ramdisk_size; | 913 | initrd_end = ramdisk_image + sparc_ramdisk_size; |
914 | |||
915 | lmb_reserve(initrd_start, initrd_end); | ||
913 | } | 916 | } |
914 | #endif | 917 | #endif |
915 | } | 918 | } |
@@ -1337,15 +1340,24 @@ void __init paging_init(void) | |||
1337 | sun4v_ktsb_init(); | 1340 | sun4v_ktsb_init(); |
1338 | } | 1341 | } |
1339 | 1342 | ||
1343 | lmb_init(); | ||
1344 | |||
1340 | /* Find available physical memory... */ | 1345 | /* Find available physical memory... */ |
1341 | read_obp_memory("available", &pavail[0], &pavail_ents); | 1346 | read_obp_memory("available", &pavail[0], &pavail_ents); |
1342 | 1347 | ||
1343 | phys_base = 0xffffffffffffffffUL; | 1348 | phys_base = 0xffffffffffffffffUL; |
1344 | for (i = 0; i < pavail_ents; i++) | 1349 | for (i = 0; i < pavail_ents; i++) { |
1345 | phys_base = min(phys_base, pavail[i].phys_addr); | 1350 | phys_base = min(phys_base, pavail[i].phys_addr); |
1351 | lmb_add(pavail[i].phys_addr, pavail[i].reg_size); | ||
1352 | } | ||
1353 | |||
1354 | lmb_reserve(kern_base, kern_size); | ||
1346 | 1355 | ||
1347 | find_ramdisk(phys_base); | 1356 | find_ramdisk(phys_base); |
1348 | 1357 | ||
1358 | lmb_analyze(); | ||
1359 | lmb_dump_all(); | ||
1360 | |||
1349 | set_bit(0, mmu_context_bmap); | 1361 | set_bit(0, mmu_context_bmap); |
1350 | 1362 | ||
1351 | shift = kern_base + PAGE_OFFSET - ((unsigned long)KERNBASE); | 1363 | shift = kern_base + PAGE_OFFSET - ((unsigned long)KERNBASE); |