aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/mm/init.c')
-rw-r--r--arch/parisc/mm/init.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 3ac462de53a4..157b931e7b09 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -505,7 +505,6 @@ static void __init map_pages(unsigned long start_vaddr,
505 505
506void free_initmem(void) 506void free_initmem(void)
507{ 507{
508 unsigned long addr;
509 unsigned long init_begin = (unsigned long)__init_begin; 508 unsigned long init_begin = (unsigned long)__init_begin;
510 unsigned long init_end = (unsigned long)__init_end; 509 unsigned long init_end = (unsigned long)__init_end;
511 510
@@ -533,19 +532,10 @@ void free_initmem(void)
533 * pages are no-longer executable */ 532 * pages are no-longer executable */
534 flush_icache_range(init_begin, init_end); 533 flush_icache_range(init_begin, init_end);
535 534
536 for (addr = init_begin; addr < init_end; addr += PAGE_SIZE) { 535 num_physpages += free_initmem_default(0);
537 ClearPageReserved(virt_to_page(addr));
538 init_page_count(virt_to_page(addr));
539 free_page(addr);
540 num_physpages++;
541 totalram_pages++;
542 }
543 536
544 /* set up a new led state on systems shipped LED State panel */ 537 /* set up a new led state on systems shipped LED State panel */
545 pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE); 538 pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE);
546
547 printk(KERN_INFO "Freeing unused kernel memory: %luk freed\n",
548 (init_end - init_begin) >> 10);
549} 539}
550 540
551 541
@@ -697,6 +687,8 @@ void show_mem(unsigned int filter)
697 687
698 printk(KERN_INFO "Mem-info:\n"); 688 printk(KERN_INFO "Mem-info:\n");
699 show_free_areas(filter); 689 show_free_areas(filter);
690 if (filter & SHOW_MEM_FILTER_PAGE_COUNT)
691 return;
700#ifndef CONFIG_DISCONTIGMEM 692#ifndef CONFIG_DISCONTIGMEM
701 i = max_mapnr; 693 i = max_mapnr;
702 while (i-- > 0) { 694 while (i-- > 0) {
@@ -1107,15 +1099,6 @@ void flush_tlb_all(void)
1107#ifdef CONFIG_BLK_DEV_INITRD 1099#ifdef CONFIG_BLK_DEV_INITRD
1108void free_initrd_mem(unsigned long start, unsigned long end) 1100void free_initrd_mem(unsigned long start, unsigned long end)
1109{ 1101{
1110 if (start >= end) 1102 num_physpages += free_reserved_area(start, end, 0, "initrd");
1111 return;
1112 printk(KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
1113 for (; start < end; start += PAGE_SIZE) {
1114 ClearPageReserved(virt_to_page(start));
1115 init_page_count(virt_to_page(start));
1116 free_page(start);
1117 num_physpages++;
1118 totalram_pages++;
1119 }
1120} 1103}
1121#endif 1104#endif