提交 7db11a36 编写于 作者: H Hans-Joachim Picht 提交者: Martin Schwidefsky

[S390] pm: add kernel_page_present

Fix the following build failure caused by make allyesconfig using
CONFIG_HIBERNATION and CONFIG_DEBUG_PAGEALLOC

kernel/built-in.o: In function `saveable_page':
kernel/power/snapshot.c:897: undefined reference to `kernel_page_present'
kernel/built-in.o: In function `safe_copy_page':
kernel/power/snapshot.c:948: undefined reference to `kernel_page_present'
make: *** [.tmp_vmlinux1] Error 1
Signed-off-by: NHans-Joachim Picht <hans@linux.vnet.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 d41dd122
...@@ -313,3 +313,22 @@ int s390_enable_sie(void) ...@@ -313,3 +313,22 @@ int s390_enable_sie(void)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(s390_enable_sie); EXPORT_SYMBOL_GPL(s390_enable_sie);
#ifdef CONFIG_DEBUG_PAGEALLOC
#ifdef CONFIG_HIBERNATION
bool kernel_page_present(struct page *page)
{
unsigned long addr;
int cc;
addr = page_to_phys(page);
asm("lra %1,0(%1)\n"
"ipm %0\n"
"srl %0,28"
:"=d"(cc),"+a"(addr)::"cc");
return cc == 0;
}
#endif /* CONFIG_HIBERNATION */
#endif /* CONFIG_DEBUG_PAGEALLOC */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册