diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index e8abb3814209..3f3ccfe42de0 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -235,6 +235,7 @@ static inline int get_page_unless_zero(struct page *page) | |||
235 | struct page *vmalloc_to_page(const void *addr); | 235 | struct page *vmalloc_to_page(const void *addr); |
236 | unsigned long vmalloc_to_pfn(const void *addr); | 236 | unsigned long vmalloc_to_pfn(const void *addr); |
237 | 237 | ||
238 | #ifdef CONFIG_MMU | ||
238 | /* Determine if an address is within the vmalloc range */ | 239 | /* Determine if an address is within the vmalloc range */ |
239 | static inline int is_vmalloc_addr(const void *x) | 240 | static inline int is_vmalloc_addr(const void *x) |
240 | { | 241 | { |
@@ -242,6 +243,7 @@ static inline int is_vmalloc_addr(const void *x) | |||
242 | 243 | ||
243 | return addr >= VMALLOC_START && addr < VMALLOC_END; | 244 | return addr >= VMALLOC_START && addr < VMALLOC_END; |
244 | } | 245 | } |
246 | #endif | ||
245 | 247 | ||
246 | static inline struct page *compound_head(struct page *page) | 248 | static inline struct page *compound_head(struct page *page) |
247 | { | 249 | { |
@@ -786,7 +788,7 @@ int __set_page_dirty_nobuffers(struct page *page); | |||
786 | int __set_page_dirty_no_writeback(struct page *page); | 788 | int __set_page_dirty_no_writeback(struct page *page); |
787 | int redirty_page_for_writepage(struct writeback_control *wbc, | 789 | int redirty_page_for_writepage(struct writeback_control *wbc, |
788 | struct page *page); | 790 | struct page *page); |
789 | int FASTCALL(set_page_dirty(struct page *page)); | 791 | int set_page_dirty(struct page *page); |
790 | int set_page_dirty_lock(struct page *page); | 792 | int set_page_dirty_lock(struct page *page); |
791 | int clear_page_dirty_for_io(struct page *page); | 793 | int clear_page_dirty_for_io(struct page *page); |
792 | 794 | ||
@@ -829,7 +831,7 @@ extern void unregister_shrinker(struct shrinker *); | |||
829 | 831 | ||
830 | int vma_wants_writenotify(struct vm_area_struct *vma); | 832 | int vma_wants_writenotify(struct vm_area_struct *vma); |
831 | 833 | ||
832 | extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)); | 834 | extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl); |
833 | 835 | ||
834 | #ifdef __PAGETABLE_PUD_FOLDED | 836 | #ifdef __PAGETABLE_PUD_FOLDED |
835 | static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, | 837 | static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, |
@@ -1171,12 +1173,18 @@ static inline void enable_debug_pagealloc(void) | |||
1171 | { | 1173 | { |
1172 | debug_pagealloc_enabled = 1; | 1174 | debug_pagealloc_enabled = 1; |
1173 | } | 1175 | } |
1176 | #ifdef CONFIG_HIBERNATION | ||
1177 | extern bool kernel_page_present(struct page *page); | ||
1178 | #endif /* CONFIG_HIBERNATION */ | ||
1174 | #else | 1179 | #else |
1175 | static inline void | 1180 | static inline void |
1176 | kernel_map_pages(struct page *page, int numpages, int enable) {} | 1181 | kernel_map_pages(struct page *page, int numpages, int enable) {} |
1177 | static inline void enable_debug_pagealloc(void) | 1182 | static inline void enable_debug_pagealloc(void) |
1178 | { | 1183 | { |
1179 | } | 1184 | } |
1185 | #ifdef CONFIG_HIBERNATION | ||
1186 | static inline bool kernel_page_present(struct page *page) { return true; } | ||
1187 | #endif /* CONFIG_HIBERNATION */ | ||
1180 | #endif | 1188 | #endif |
1181 | 1189 | ||
1182 | extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); | 1190 | extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); |