diff options
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r-- | arch/arm/mm/init.c | 69 |
1 files changed, 4 insertions, 65 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 15dddfe43319..c2daabbe0af0 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -282,15 +282,12 @@ void __init arm_memblock_init(const struct machine_desc *mdesc) | |||
282 | 282 | ||
283 | void __init bootmem_init(void) | 283 | void __init bootmem_init(void) |
284 | { | 284 | { |
285 | unsigned long min, max_low, max_high; | ||
286 | |||
287 | memblock_allow_resize(); | 285 | memblock_allow_resize(); |
288 | max_low = max_high = 0; | ||
289 | 286 | ||
290 | find_limits(&min, &max_low, &max_high); | 287 | find_limits(&min_low_pfn, &max_low_pfn, &max_pfn); |
291 | 288 | ||
292 | early_memtest((phys_addr_t)min << PAGE_SHIFT, | 289 | early_memtest((phys_addr_t)min_low_pfn << PAGE_SHIFT, |
293 | (phys_addr_t)max_low << PAGE_SHIFT); | 290 | (phys_addr_t)max_low_pfn << PAGE_SHIFT); |
294 | 291 | ||
295 | /* | 292 | /* |
296 | * Sparsemem tries to allocate bootmem in memory_present(), | 293 | * Sparsemem tries to allocate bootmem in memory_present(), |
@@ -308,16 +305,7 @@ void __init bootmem_init(void) | |||
308 | * the sparse mem_map arrays initialized by sparse_init() | 305 | * the sparse mem_map arrays initialized by sparse_init() |
309 | * for memmap_init_zone(), otherwise all PFNs are invalid. | 306 | * for memmap_init_zone(), otherwise all PFNs are invalid. |
310 | */ | 307 | */ |
311 | zone_sizes_init(min, max_low, max_high); | 308 | zone_sizes_init(min_low_pfn, max_low_pfn, max_pfn); |
312 | |||
313 | /* | ||
314 | * This doesn't seem to be used by the Linux memory manager any | ||
315 | * more, but is used by ll_rw_block. If we can get rid of it, we | ||
316 | * also get rid of some of the stuff above as well. | ||
317 | */ | ||
318 | min_low_pfn = min; | ||
319 | max_low_pfn = max_low; | ||
320 | max_pfn = max_high; | ||
321 | } | 309 | } |
322 | 310 | ||
323 | /* | 311 | /* |
@@ -498,55 +486,6 @@ void __init mem_init(void) | |||
498 | 486 | ||
499 | mem_init_print_info(NULL); | 487 | mem_init_print_info(NULL); |
500 | 488 | ||
501 | #define MLK(b, t) b, t, ((t) - (b)) >> 10 | ||
502 | #define MLM(b, t) b, t, ((t) - (b)) >> 20 | ||
503 | #define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), SZ_1K) | ||
504 | |||
505 | pr_notice("Virtual kernel memory layout:\n" | ||
506 | " vector : 0x%08lx - 0x%08lx (%4ld kB)\n" | ||
507 | #ifdef CONFIG_HAVE_TCM | ||
508 | " DTCM : 0x%08lx - 0x%08lx (%4ld kB)\n" | ||
509 | " ITCM : 0x%08lx - 0x%08lx (%4ld kB)\n" | ||
510 | #endif | ||
511 | " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n" | ||
512 | " vmalloc : 0x%08lx - 0x%08lx (%4ld MB)\n" | ||
513 | " lowmem : 0x%08lx - 0x%08lx (%4ld MB)\n" | ||
514 | #ifdef CONFIG_HIGHMEM | ||
515 | " pkmap : 0x%08lx - 0x%08lx (%4ld MB)\n" | ||
516 | #endif | ||
517 | #ifdef CONFIG_MODULES | ||
518 | " modules : 0x%08lx - 0x%08lx (%4ld MB)\n" | ||
519 | #endif | ||
520 | " .text : 0x%p" " - 0x%p" " (%4td kB)\n" | ||
521 | " .init : 0x%p" " - 0x%p" " (%4td kB)\n" | ||
522 | " .data : 0x%p" " - 0x%p" " (%4td kB)\n" | ||
523 | " .bss : 0x%p" " - 0x%p" " (%4td kB)\n", | ||
524 | |||
525 | MLK(VECTORS_BASE, VECTORS_BASE + PAGE_SIZE), | ||
526 | #ifdef CONFIG_HAVE_TCM | ||
527 | MLK(DTCM_OFFSET, (unsigned long) dtcm_end), | ||
528 | MLK(ITCM_OFFSET, (unsigned long) itcm_end), | ||
529 | #endif | ||
530 | MLK(FIXADDR_START, FIXADDR_END), | ||
531 | MLM(VMALLOC_START, VMALLOC_END), | ||
532 | MLM(PAGE_OFFSET, (unsigned long)high_memory), | ||
533 | #ifdef CONFIG_HIGHMEM | ||
534 | MLM(PKMAP_BASE, (PKMAP_BASE) + (LAST_PKMAP) * | ||
535 | (PAGE_SIZE)), | ||
536 | #endif | ||
537 | #ifdef CONFIG_MODULES | ||
538 | MLM(MODULES_VADDR, MODULES_END), | ||
539 | #endif | ||
540 | |||
541 | MLK_ROUNDUP(_text, _etext), | ||
542 | MLK_ROUNDUP(__init_begin, __init_end), | ||
543 | MLK_ROUNDUP(_sdata, _edata), | ||
544 | MLK_ROUNDUP(__bss_start, __bss_stop)); | ||
545 | |||
546 | #undef MLK | ||
547 | #undef MLM | ||
548 | #undef MLK_ROUNDUP | ||
549 | |||
550 | /* | 489 | /* |
551 | * Check boundaries twice: Some fundamental inconsistencies can | 490 | * Check boundaries twice: Some fundamental inconsistencies can |
552 | * be detected at build time already. | 491 | * be detected at build time already. |