diff options
author | Hans-Joachim Picht <hans@linux.vnet.ibm.com> | 2009-06-16 04:30:26 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-06-16 04:31:11 -0400 |
commit | 7db11a363fc41cec170a94a3542031e5e64bb333 (patch) | |
tree | 26cf776715697fcfdc903c919972b7ff095af23a /arch/s390 | |
parent | d41dd122acf960db78c9ddc87684b43751dd36d9 (diff) |
[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: Hans-Joachim Picht <hans@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/mm/pgtable.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 4ca8e826bf30..565667207985 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -313,3 +313,22 @@ int s390_enable_sie(void) | |||
313 | return 0; | 313 | return 0; |
314 | } | 314 | } |
315 | EXPORT_SYMBOL_GPL(s390_enable_sie); | 315 | EXPORT_SYMBOL_GPL(s390_enable_sie); |
316 | |||
317 | #ifdef CONFIG_DEBUG_PAGEALLOC | ||
318 | #ifdef CONFIG_HIBERNATION | ||
319 | bool kernel_page_present(struct page *page) | ||
320 | { | ||
321 | unsigned long addr; | ||
322 | int cc; | ||
323 | |||
324 | addr = page_to_phys(page); | ||
325 | asm("lra %1,0(%1)\n" | ||
326 | "ipm %0\n" | ||
327 | "srl %0,28" | ||
328 | :"=d"(cc),"+a"(addr)::"cc"); | ||
329 | return cc == 0; | ||
330 | } | ||
331 | |||
332 | #endif /* CONFIG_HIBERNATION */ | ||
333 | #endif /* CONFIG_DEBUG_PAGEALLOC */ | ||
334 | |||