]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/ARM: use free_highmem_page() to free highmem pages into buddy system
authorJiang Liu <liuj97@gmail.com>
Wed, 20 Mar 2013 04:07:18 +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: Russell King <linux@arm.linux.org.uk>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/arm/mm/init.c

index 611f21772fa8d8ef220760928b5b82f30dcffc44..9a5cdc01fcdfef7315ec97687c35ae28adcb7688 100644 (file)
@@ -522,10 +522,8 @@ static void __init free_unused_memmap(struct meminfo *mi)
 #ifdef CONFIG_HIGHMEM
 static inline void free_area_high(unsigned long pfn, unsigned long end)
 {
-       for (; pfn < end; pfn++) {
-               __free_reserved_page(pfn_to_page(pfn));
-               totalhigh_pages++;
-       }
+       for (; pfn < end; pfn++)
+               free_highmem_page(pfn_to_page(pfn));
 }
 #endif
 
@@ -574,7 +572,6 @@ static void __init free_highpages(void)
                if (start < end)
                        free_area_high(start, end);
        }
-       totalram_pages += totalhigh_pages;
 #endif
 }