]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/PPC: use free_highmem_page() to free highmem pages into buddy system
authorJiang Liu <liuj97@gmail.com>
Wed, 20 Mar 2013 04:07:19 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 21 Mar 2013 05:33:49 +0000 (16:33 +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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: "Suzuki K. Poulose" <suzuki@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/powerpc/mm/mem.c

index c756713aaabab4cdd41f5895816aa306f8e86b54..cd76c454942fd51c943c64f33ae2e7e24d3143a5 100644 (file)
@@ -352,13 +352,9 @@ void __init mem_init(void)
                        struct page *page = pfn_to_page(pfn);
                        if (memblock_is_reserved(paddr))
                                continue;
-                       ClearPageReserved(page);
-                       init_page_count(page);
-                       __free_page(page);
-                       totalhigh_pages++;
+                       free_highmem_page(page);
                        reservedpages--;
                }
-               totalram_pages += totalhigh_pages;
                printk(KERN_DEBUG "High memory: %luk\n",
                       totalhigh_pages << (PAGE_SHIFT-10));
        }