diff options
author | Helge Deller <deller@gmx.de> | 2006-10-14 16:10:44 -0400 |
---|---|---|
committer | Kyle McMartin <kyle@ubuntu.com> | 2006-12-08 00:33:55 -0500 |
commit | ce8420bb65d25335c3b48ddfb1b5a244f53bfb75 (patch) | |
tree | 41e9bcca2bc071769494bdafebea0783a6dd9ae9 /arch/parisc/mm/init.c | |
parent | 58554927f85616c374795fbddcf0607a3faa7c46 (diff) |
[PARISC] Show more memory information and memory layout at bootup
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch/parisc/mm/init.c')
-rw-r--r-- | arch/parisc/mm/init.c | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 0667f2b4f977..d9e4ab545b38 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/pagemap.h> /* for release_pages and page_cache_release */ | 24 | #include <linux/pagemap.h> /* for release_pages and page_cache_release */ |
25 | 25 | ||
26 | #include <asm/pgalloc.h> | 26 | #include <asm/pgalloc.h> |
27 | #include <asm/pgtable.h> | ||
27 | #include <asm/tlb.h> | 28 | #include <asm/tlb.h> |
28 | #include <asm/pdc_chassis.h> | 29 | #include <asm/pdc_chassis.h> |
29 | #include <asm/mmzone.h> | 30 | #include <asm/mmzone.h> |
@@ -453,6 +454,9 @@ unsigned long pcxl_dma_start __read_mostly; | |||
453 | 454 | ||
454 | void __init mem_init(void) | 455 | void __init mem_init(void) |
455 | { | 456 | { |
457 | int codesize, reservedpages, datasize, initsize; | ||
458 | int tmp; | ||
459 | |||
456 | high_memory = __va((max_pfn << PAGE_SHIFT)); | 460 | high_memory = __va((max_pfn << PAGE_SHIFT)); |
457 | 461 | ||
458 | #ifndef CONFIG_DISCONTIGMEM | 462 | #ifndef CONFIG_DISCONTIGMEM |
@@ -466,8 +470,17 @@ void __init mem_init(void) | |||
466 | totalram_pages += free_all_bootmem_node(NODE_DATA(i)); | 470 | totalram_pages += free_all_bootmem_node(NODE_DATA(i)); |
467 | } | 471 | } |
468 | #endif | 472 | #endif |
473 | codesize = (unsigned long) &_etext - (unsigned long) &_text; | ||
474 | datasize = (unsigned long) &_edata - (unsigned long) &_etext; | ||
475 | initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; | ||
469 | 476 | ||
470 | printk(KERN_INFO "Memory: %luk available\n", num_physpages << (PAGE_SHIFT-10)); | 477 | reservedpages = 0; |
478 | for (tmp = 0; tmp < max_low_pfn; tmp++) | ||
479 | /* | ||
480 | * Only count reserved RAM pages | ||
481 | */ | ||
482 | if (PageReserved(pfn_to_page(tmp))) | ||
483 | reservedpages++; | ||
471 | 484 | ||
472 | #ifdef CONFIG_PA11 | 485 | #ifdef CONFIG_PA11 |
473 | if (hppa_dma_ops == &pcxl_dma_ops) { | 486 | if (hppa_dma_ops == &pcxl_dma_ops) { |
@@ -481,6 +494,39 @@ void __init mem_init(void) | |||
481 | vmalloc_start = SET_MAP_OFFSET(MAP_START); | 494 | vmalloc_start = SET_MAP_OFFSET(MAP_START); |
482 | #endif | 495 | #endif |
483 | 496 | ||
497 | printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init, %ldk highmem)\n", | ||
498 | (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), | ||
499 | num_physpages << (PAGE_SHIFT-10), | ||
500 | codesize >> 10, | ||
501 | reservedpages << (PAGE_SHIFT-10), | ||
502 | datasize >> 10, | ||
503 | initsize >> 10, | ||
504 | (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10)) | ||
505 | ); | ||
506 | |||
507 | #ifdef CONFIG_DEBUG_KERNEL /* double-sanity-check paranoia */ | ||
508 | printk("virtual kernel memory layout:\n" | ||
509 | " vmalloc : 0x%p - 0x%p (%4ld MB)\n" | ||
510 | " lowmem : 0x%p - 0x%p (%4ld MB)\n" | ||
511 | " .init : 0x%p - 0x%p (%4ld kB)\n" | ||
512 | " .data : 0x%p - 0x%p (%4ld kB)\n" | ||
513 | " .text : 0x%p - 0x%p (%4ld kB)\n", | ||
514 | |||
515 | (void*)VMALLOC_START, (void*)VMALLOC_END, | ||
516 | (VMALLOC_END - VMALLOC_START) >> 20, | ||
517 | |||
518 | __va(0), high_memory, | ||
519 | ((unsigned long)high_memory - (unsigned long)__va(0)) >> 20, | ||
520 | |||
521 | &__init_begin, &__init_end, | ||
522 | ((unsigned long)&__init_end - (unsigned long)&__init_begin) >> 10, | ||
523 | |||
524 | &_etext, &_edata, | ||
525 | ((unsigned long)&_edata - (unsigned long)&_etext) >> 10, | ||
526 | |||
527 | &_text, &_etext, | ||
528 | ((unsigned long)&_etext - (unsigned long)&_text) >> 10); | ||
529 | #endif | ||
484 | } | 530 | } |
485 | 531 | ||
486 | unsigned long *empty_zero_page __read_mostly; | 532 | unsigned long *empty_zero_page __read_mostly; |