aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/dec/prom/memory.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2007-02-12 21:17:37 -0600
committerKumar Gala <galak@kernel.crashing.org>2007-02-12 21:17:37 -0600
commit06d8bf64ba25db42fcc60d2da2268ac22af94e77 (patch)
treeeb80eebf368957df18c2a4c0ee02897e0a9b06d2 /arch/mips/dec/prom/memory.c
parent8f68abbfd9703e58920ff07d314a48654ed0bc3b (diff)
parent5986a2ec35836a878350c54af4bd91b1de6abc59 (diff)
Merge branch 'master' into for_paulus
Diffstat (limited to 'arch/mips/dec/prom/memory.c')
-rw-r--r--arch/mips/dec/prom/memory.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c
index 3aa01d268f2..5a557e268f7 100644
--- a/arch/mips/dec/prom/memory.c
+++ b/arch/mips/dec/prom/memory.c
@@ -92,9 +92,9 @@ void __init prom_meminit(u32 magic)
rex_setup_memory_region();
}
-unsigned long __init prom_free_prom_memory(void)
+void __init prom_free_prom_memory(void)
{
- unsigned long addr, end;
+ unsigned long end;
/*
* Free everything below the kernel itself but leave
@@ -114,16 +114,5 @@ unsigned long __init prom_free_prom_memory(void)
#endif
end = __pa(&_text);
- addr = PAGE_SIZE;
- while (addr < end) {
- ClearPageReserved(virt_to_page(__va(addr)));
- init_page_count(virt_to_page(__va(addr)));
- free_page((unsigned long)__va(addr));
- addr += PAGE_SIZE;
- }
-
- printk("Freeing unused PROM memory: %ldkb freed\n",
- (end - PAGE_SIZE) >> 10);
-
- return end - PAGE_SIZE;
+ free_init_pages("unused PROM memory", PAGE_SIZE, end);
}