Skip to content

Commit

Permalink
mm/metag: use free_highmem_page() to free highmem pages into buddy sy…
Browse files Browse the repository at this point in the history
…stem

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>
  • Loading branch information
Jiang Liu authored and Linus Torvalds committed Apr 29, 2013
1 parent 8b2888c commit a564496
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions arch/metag/mm/init.c
Original file line number Diff line number Diff line change
@@ -380,14 +380,8 @@ void __init mem_init(void)

#ifdef CONFIG_HIGHMEM
unsigned long tmp;
for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) {
struct page *page = pfn_to_page(tmp);
ClearPageReserved(page);
init_page_count(page);
__free_page(page);
totalhigh_pages++;
}
totalram_pages += totalhigh_pages;
for (tmp = highstart_pfn; tmp < highend_pfn; tmp++)
free_highmem_page(pfn_to_page(tmp));
num_physpages += totalhigh_pages;
#endif /* CONFIG_HIGHMEM */

0 comments on commit a564496

Please sign in to comment.