提交 e07cee23 编写于 作者: J Jiang Liu 提交者: Linus Torvalds

mm,kexec: use common help functions to free reserved pages

Use common help functions to free reserved pages.
Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Reviewed-by: NZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 c9418368
...@@ -1118,12 +1118,8 @@ void __weak crash_free_reserved_phys_range(unsigned long begin, ...@@ -1118,12 +1118,8 @@ void __weak crash_free_reserved_phys_range(unsigned long begin,
{ {
unsigned long addr; unsigned long addr;
for (addr = begin; addr < end; addr += PAGE_SIZE) { for (addr = begin; addr < end; addr += PAGE_SIZE)
ClearPageReserved(pfn_to_page(addr >> PAGE_SHIFT)); free_reserved_page(pfn_to_page(addr >> PAGE_SHIFT));
init_page_count(pfn_to_page(addr >> PAGE_SHIFT));
free_page((unsigned long)__va(addr));
totalram_pages++;
}
} }
int crash_shrink_memory(unsigned long new_size) int crash_shrink_memory(unsigned long new_size)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册