From: Jiang Liu Date: Mon, 29 Apr 2013 22:07:05 +0000 (-0700) Subject: mm/metag: use free_highmem_page() to free highmem pages into buddy system X-Git-Tag: firefly_0821_release~3680^2~665^2~82 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a564496e2cf9ea37a553d27c8ca4cef78015b2e2;p=firefly-linux-kernel-4.4.55.git 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 Cc: James Hogan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/metag/mm/init.c b/arch/metag/mm/init.c index c6784fb3a334..d05b8455c44c 100644 --- a/arch/metag/mm/init.c +++ b/arch/metag/mm/init.c @@ -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 */