aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h12
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)
235struct page *vmalloc_to_page(const void *addr); 235struct page *vmalloc_to_page(const void *addr);
236unsigned long vmalloc_to_pfn(const void *addr); 236unsigned 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 */
239static inline int is_vmalloc_addr(const void *x) 240static 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
246static inline struct page *compound_head(struct page *page) 248static inline struct page *compound_head(struct page *page)
247{ 249{
@@ -786,7 +788,7 @@ int __set_page_dirty_nobuffers(struct page *page);
786int __set_page_dirty_no_writeback(struct page *page); 788int __set_page_dirty_no_writeback(struct page *page);
787int redirty_page_for_writepage(struct writeback_control *wbc, 789int redirty_page_for_writepage(struct writeback_control *wbc,
788 struct page *page); 790 struct page *page);
789int FASTCALL(set_page_dirty(struct page *page)); 791int set_page_dirty(struct page *page);
790int set_page_dirty_lock(struct page *page); 792int set_page_dirty_lock(struct page *page);
791int clear_page_dirty_for_io(struct page *page); 793int clear_page_dirty_for_io(struct page *page);
792 794
@@ -829,7 +831,7 @@ extern void unregister_shrinker(struct shrinker *);
829 831
830int vma_wants_writenotify(struct vm_area_struct *vma); 832int vma_wants_writenotify(struct vm_area_struct *vma);
831 833
832extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)); 834extern 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
835static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, 837static 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
1177extern bool kernel_page_present(struct page *page);
1178#endif /* CONFIG_HIBERNATION */
1174#else 1179#else
1175static inline void 1180static inline void
1176kernel_map_pages(struct page *page, int numpages, int enable) {} 1181kernel_map_pages(struct page *page, int numpages, int enable) {}
1177static inline void enable_debug_pagealloc(void) 1182static inline void enable_debug_pagealloc(void)
1178{ 1183{
1179} 1184}
1185#ifdef CONFIG_HIBERNATION
1186static inline bool kernel_page_present(struct page *page) { return true; }
1187#endif /* CONFIG_HIBERNATION */
1180#endif 1188#endif
1181 1189
1182extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); 1190extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);