summaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorRafael J. Wysocki2008-02-20 01:47:44 +0100
committerLen Brown2008-02-21 08:15:28 +0100
commit8a235efad548abd2ab5ebea45a9ffa750c814375 (patch)
tree9b8c6c1fa3d2e28d9bb198d7019cba8883d5299e /include/linux/mm.h
parentFRV: Change the timerfd syscalls to be the same as i386 (diff)
downloadkernel-qcow2-linux-8a235efad548abd2ab5ebea45a9ffa750c814375.tar.gz
kernel-qcow2-linux-8a235efad548abd2ab5ebea45a9ffa750c814375.tar.xz
kernel-qcow2-linux-8a235efad548abd2ab5ebea45a9ffa750c814375.zip
Hibernation: Handle DEBUG_PAGEALLOC on x86
Make hibernation work with CONFIG_DEBUG_PAGEALLOC set on x86, by checking if the pages to be copied are marked as present in the kernel mapping and temporarily marking them as present if that's not the case. No functional modifications are introduced if CONFIG_DEBUG_PAGEALLOC is unset. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 26c7124b841a..3b3e1341163f 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1171,12 +1171,18 @@ static inline void enable_debug_pagealloc(void)
{
debug_pagealloc_enabled = 1;
}
+#ifdef CONFIG_HIBERNATION
+extern bool kernel_page_present(struct page *page);
+#endif /* CONFIG_HIBERNATION */
#else
static inline void
kernel_map_pages(struct page *page, int numpages, int enable) {}
static inline void enable_debug_pagealloc(void)
{
}
+#ifdef CONFIG_HIBERNATION
+static inline bool kernel_page_present(struct page *page) { return true; }
+#endif /* CONFIG_HIBERNATION */
#endif
extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);