]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/metag: use free_highmem_page() to free highmem pages into buddy system
authorJiang Liu <liuj97@gmail.com>
Tue, 26 Mar 2013 23:24:32 +0000 (10:24 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Apr 2013 07:29:05 +0000 (18:29 +1100)
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>
arch/metag/mm/init.c

index c6784fb3a334608a4258f7bee27b187c7ce9f7fe..d05b8455c44cb9ac356c33da7473478c7047c44d 100644 (file)
@@ -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 */