diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2008-02-19 19:47:44 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-21 02:15:28 -0500 |
commit | 8a235efad548abd2ab5ebea45a9ffa750c814375 (patch) | |
tree | 9b8c6c1fa3d2e28d9bb198d7019cba8883d5299e /include/linux/mm.h | |
parent | e80af3a8dbbbf431b2070cc760699f01c5a6ac69 (diff) |
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.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 26c7124b841..3b3e1341163 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1171,12 +1171,18 @@ static inline void enable_debug_pagealloc(void) | |||
1171 | { | 1171 | { |
1172 | debug_pagealloc_enabled = 1; | 1172 | debug_pagealloc_enabled = 1; |
1173 | } | 1173 | } |
1174 | #ifdef CONFIG_HIBERNATION | ||
1175 | extern bool kernel_page_present(struct page *page); | ||
1176 | #endif /* CONFIG_HIBERNATION */ | ||
1174 | #else | 1177 | #else |
1175 | static inline void | 1178 | static inline void |
1176 | kernel_map_pages(struct page *page, int numpages, int enable) {} | 1179 | kernel_map_pages(struct page *page, int numpages, int enable) {} |
1177 | static inline void enable_debug_pagealloc(void) | 1180 | static inline void enable_debug_pagealloc(void) |
1178 | { | 1181 | { |
1179 | } | 1182 | } |
1183 | #ifdef CONFIG_HIBERNATION | ||
1184 | static inline bool kernel_page_present(struct page *page) { return true; } | ||
1185 | #endif /* CONFIG_HIBERNATION */ | ||
1180 | #endif | 1186 | #endif |
1181 | 1187 | ||
1182 | extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); | 1188 | extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); |