diff options
Diffstat (limited to 'arch/mips/mips-boards/generic/memory.c')
-rw-r--r-- | arch/mips/mips-boards/generic/memory.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c index eeed944e0f83..ebf0e16c5a0d 100644 --- a/arch/mips/mips-boards/generic/memory.c +++ b/arch/mips/mips-boards/generic/memory.c | |||
@@ -166,9 +166,8 @@ void __init prom_meminit(void) | |||
166 | } | 166 | } |
167 | } | 167 | } |
168 | 168 | ||
169 | unsigned long __init prom_free_prom_memory(void) | 169 | void __init prom_free_prom_memory(void) |
170 | { | 170 | { |
171 | unsigned long freed = 0; | ||
172 | unsigned long addr; | 171 | unsigned long addr; |
173 | int i; | 172 | int i; |
174 | 173 | ||
@@ -176,17 +175,8 @@ unsigned long __init prom_free_prom_memory(void) | |||
176 | if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA) | 175 | if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA) |
177 | continue; | 176 | continue; |
178 | 177 | ||
179 | addr = PAGE_ALIGN(boot_mem_map.map[i].addr); | 178 | addr = boot_mem_map.map[i].addr; |
180 | while (addr < boot_mem_map.map[i].addr | 179 | free_init_pages("prom memory", |
181 | + boot_mem_map.map[i].size) { | 180 | addr, addr + boot_mem_map.map[i].size); |
182 | ClearPageReserved(virt_to_page(__va(addr))); | ||
183 | init_page_count(virt_to_page(__va(addr))); | ||
184 | free_page((unsigned long)__va(addr)); | ||
185 | addr += PAGE_SIZE; | ||
186 | freed += PAGE_SIZE; | ||
187 | } | ||
188 | } | 181 | } |
189 | printk("Freeing prom memory: %ldkb freed\n", freed >> 10); | ||
190 | |||
191 | return freed; | ||
192 | } | 182 | } |