mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
prom_free_prom_memory is useless
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6625 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -130,25 +130,6 @@ void __init prom_meminit(void)
|
|||||||
|
|
||||||
unsigned long __init prom_free_prom_memory(void)
|
unsigned long __init prom_free_prom_memory(void)
|
||||||
{
|
{
|
||||||
unsigned long freed = 0;
|
/* We do not have to prom memory to free */
|
||||||
unsigned long addr;
|
return;
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < boot_mem_map.nr_map; i++) {
|
|
||||||
if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
addr = PAGE_ALIGN(boot_mem_map.map[i].addr);
|
|
||||||
while (addr < boot_mem_map.map[i].addr
|
|
||||||
+ boot_mem_map.map[i].size) {
|
|
||||||
ClearPageReserved(virt_to_page(__va(addr)));
|
|
||||||
init_page_count(virt_to_page(__va(addr)));
|
|
||||||
free_page((unsigned long)__va(addr));
|
|
||||||
addr += PAGE_SIZE;
|
|
||||||
freed += PAGE_SIZE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
printk("Freeing prom memory: %ldkb freed\n", freed >> 10);
|
|
||||||
|
|
||||||
return freed;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user