diff options
author | Jiang Liu <liuj97@gmail.com> | 2013-07-03 18:03:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:07:33 -0400 |
commit | abd1b6d65fc49b7b95724c94a4e5892a3b3fc618 (patch) | |
tree | 81b8a324fdf7ff6d498d37f9cce5462821cdd2be /arch/tile | |
parent | c88442ec45f30d587b38b935a14acde4e217a926 (diff) |
mm/tile: use common help functions to free reserved pages
Use common help functions to free reserved pages.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: <sworddragon2@aol.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: Joonsoo Kim <js1304@gmail.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Michel Lespinasse <walken@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/tile')
-rw-r--r-- | arch/tile/mm/init.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/tile/mm/init.c b/arch/tile/mm/init.c index 2749515a0547..ccfeb3f2e769 100644 --- a/arch/tile/mm/init.c +++ b/arch/tile/mm/init.c | |||
@@ -720,7 +720,7 @@ static void __init init_free_pfn_range(unsigned long start, unsigned long end) | |||
720 | } | 720 | } |
721 | init_page_count(page); | 721 | init_page_count(page); |
722 | __free_pages(page, order); | 722 | __free_pages(page, order); |
723 | totalram_pages += count; | 723 | adjust_managed_page_count(page, count); |
724 | 724 | ||
725 | page += count; | 725 | page += count; |
726 | pfn += count; | 726 | pfn += count; |
@@ -1024,16 +1024,13 @@ static void free_init_pages(char *what, unsigned long begin, unsigned long end) | |||
1024 | pte_clear(&init_mm, addr, ptep); | 1024 | pte_clear(&init_mm, addr, ptep); |
1025 | continue; | 1025 | continue; |
1026 | } | 1026 | } |
1027 | __ClearPageReserved(page); | ||
1028 | init_page_count(page); | ||
1029 | if (pte_huge(*ptep)) | 1027 | if (pte_huge(*ptep)) |
1030 | BUG_ON(!kdata_huge); | 1028 | BUG_ON(!kdata_huge); |
1031 | else | 1029 | else |
1032 | set_pte_at(&init_mm, addr, ptep, | 1030 | set_pte_at(&init_mm, addr, ptep, |
1033 | pfn_pte(pfn, PAGE_KERNEL)); | 1031 | pfn_pte(pfn, PAGE_KERNEL)); |
1034 | memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); | 1032 | memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); |
1035 | free_page(addr); | 1033 | free_reserved_page(page); |
1036 | totalram_pages++; | ||
1037 | } | 1034 | } |
1038 | pr_info("Freeing %s: %ldk freed\n", what, (end - begin) >> 10); | 1035 | pr_info("Freeing %s: %ldk freed\n", what, (end - begin) >> 10); |
1039 | } | 1036 | } |