diff options
Diffstat (limited to 'arch/mips/dec/prom/memory.c')
-rw-r--r-- | arch/mips/dec/prom/memory.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c index 3aa01d268f2d..5a557e268f78 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) | |||
92 | rex_setup_memory_region(); | 92 | rex_setup_memory_region(); |
93 | } | 93 | } |
94 | 94 | ||
95 | unsigned long __init prom_free_prom_memory(void) | 95 | void __init prom_free_prom_memory(void) |
96 | { | 96 | { |
97 | unsigned long addr, end; | 97 | unsigned long end; |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * Free everything below the kernel itself but leave | 100 | * Free everything below the kernel itself but leave |
@@ -114,16 +114,5 @@ unsigned long __init prom_free_prom_memory(void) | |||
114 | #endif | 114 | #endif |
115 | end = __pa(&_text); | 115 | end = __pa(&_text); |
116 | 116 | ||
117 | addr = PAGE_SIZE; | 117 | free_init_pages("unused PROM memory", PAGE_SIZE, end); |
118 | while (addr < end) { | ||
119 | ClearPageReserved(virt_to_page(__va(addr))); | ||
120 | init_page_count(virt_to_page(__va(addr))); | ||
121 | free_page((unsigned long)__va(addr)); | ||
122 | addr += PAGE_SIZE; | ||
123 | } | ||
124 | |||
125 | printk("Freeing unused PROM memory: %ldkb freed\n", | ||
126 | (end - PAGE_SIZE) >> 10); | ||
127 | |||
128 | return end - PAGE_SIZE; | ||
129 | } | 118 | } |