mm/metag: use free_highmem_page() to free highmem pages into buddy system

Use helper function free_highmem_page() to free highmem pages into
the buddy system.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Jiang Liu 2013-04-29 15:07:05 -07:00 committed by Linus Torvalds
parent 8b2888c756
commit a564496e2c

View File

@ -380,14 +380,8 @@ void __init mem_init(void)
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
unsigned long tmp; unsigned long tmp;
for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) { for (tmp = highstart_pfn; tmp < highend_pfn; tmp++)
struct page *page = pfn_to_page(tmp); free_highmem_page(pfn_to_page(tmp));
ClearPageReserved(page);
init_page_count(page);
__free_page(page);
totalhigh_pages++;
}
totalram_pages += totalhigh_pages;
num_physpages += totalhigh_pages; num_physpages += totalhigh_pages;
#endif /* CONFIG_HIGHMEM */ #endif /* CONFIG_HIGHMEM */