]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/x86: use free_highmem_page() to free highmem pages into buddy system
authorJiang Liu <liuj97@gmail.com>
Wed, 20 Mar 2013 04:07:20 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Mar 2013 04:22:48 +0000 (15:22 +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: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Attilio Rao <attilio.rao@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/mm/highmem_32.c
arch/x86/mm/init_32.c

index 6f31ee56c00849f14cd94454b9c5d2067388a74d..252b8f5489ba6e1b84152545d211ba31121ffb7f 100644 (file)
@@ -137,5 +137,4 @@ void __init set_highmem_pages_init(void)
                add_highpages_with_active_regions(nid, zone_start_pfn,
                                 zone_end_pfn);
        }
-       totalram_pages += totalhigh_pages;
 }
index 2d19001151d5c4bd6435cd3a0b622579179b8280..3ac7e319918d413bef5a48bfd38740dc9aa34118 100644 (file)
@@ -427,14 +427,6 @@ static void __init permanent_kmaps_init(pgd_t *pgd_base)
        pkmap_page_table = pte;
 }
 
-static void __init add_one_highpage_init(struct page *page)
-{
-       ClearPageReserved(page);
-       init_page_count(page);
-       __free_page(page);
-       totalhigh_pages++;
-}
-
 void __init add_highpages_with_active_regions(int nid,
                         unsigned long start_pfn, unsigned long end_pfn)
 {
@@ -448,7 +440,7 @@ void __init add_highpages_with_active_regions(int nid,
                                              start_pfn, end_pfn);
                for ( ; pfn < e_pfn; pfn++)
                        if (pfn_valid(pfn))
-                               add_one_highpage_init(pfn_to_page(pfn));
+                               free_highmem_page(pfn_to_page(pfn));
        }
 }
 #else