aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kexec.c
diff options
context:
space:
mode:
authorJiang Liu <liuj97@gmail.com>2013-04-29 18:06:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 18:54:31 -0400
commite07cee23e64137f7da2fb35d7b7c0ad26cc0edec (patch)
tree24dd1390f705818c95c11bd44942c44c02712398 /kernel/kexec.c
parentc941836819569abd5319f93f68638b65e2dfecc5 (diff)
mm,kexec: 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: Eric Biederman <ebiederm@xmission.com> Reviewed-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kexec.c')
-rw-r--r--kernel/kexec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index ffd4e111fd67..b19181d44201 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1118,12 +1118,8 @@ void __weak crash_free_reserved_phys_range(unsigned long begin,
1118{ 1118{
1119 unsigned long addr; 1119 unsigned long addr;
1120 1120
1121 for (addr = begin; addr < end; addr += PAGE_SIZE) { 1121 for (addr = begin; addr < end; addr += PAGE_SIZE)
1122 ClearPageReserved(pfn_to_page(addr >> PAGE_SHIFT)); 1122 free_reserved_page(pfn_to_page(addr >> PAGE_SHIFT));
1123 init_page_count(pfn_to_page(addr >> PAGE_SHIFT));
1124 free_page((unsigned long)__va(addr));
1125 totalram_pages++;
1126 }
1127} 1123}
1128 1124
1129int crash_shrink_memory(unsigned long new_size) 1125int crash_shrink_memory(unsigned long new_size)