Skip to content

Commit

Permalink
[S390] pm: add kernel_page_present
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans-Joachim Picht authored and Martin Schwidefsky committed Jun 16, 2009
1 parent d41dd12 commit 7db11a3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions arch/s390/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,22 @@ int s390_enable_sie(void)
return 0;
}
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 */

0 comments on commit 7db11a3

Please sign in to comment.