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 f2690cf49827..fd599f4bb846 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -962,6 +962,8 @@ int invalidate_inode_page(struct page *page); | |||
962 | #ifdef CONFIG_MMU | 962 | #ifdef CONFIG_MMU |
963 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 963 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
964 | unsigned long address, unsigned int flags); | 964 | unsigned long address, unsigned int flags); |
965 | extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, | ||
966 | unsigned long address, unsigned int fault_flags); | ||
965 | #else | 967 | #else |
966 | static inline int handle_mm_fault(struct mm_struct *mm, | 968 | static inline int handle_mm_fault(struct mm_struct *mm, |
967 | struct vm_area_struct *vma, unsigned long address, | 969 | struct vm_area_struct *vma, unsigned long address, |
@@ -971,6 +973,14 @@ static inline int handle_mm_fault(struct mm_struct *mm, | |||
971 | BUG(); | 973 | BUG(); |
972 | return VM_FAULT_SIGBUS; | 974 | return VM_FAULT_SIGBUS; |
973 | } | 975 | } |
976 | static inline int fixup_user_fault(struct task_struct *tsk, | ||
977 | struct mm_struct *mm, unsigned long address, | ||
978 | unsigned int fault_flags) | ||
979 | { | ||
980 | /* should never happen if there's no MMU */ | ||
981 | BUG(); | ||
982 | return -EFAULT; | ||
983 | } | ||
974 | #endif | 984 | #endif |
975 | 985 | ||
976 | extern int make_pages_present(unsigned long addr, unsigned long end); | 986 | extern int make_pages_present(unsigned long addr, unsigned long end); |
@@ -988,8 +998,6 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
988 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | 998 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, |
989 | struct page **pages); | 999 | struct page **pages); |
990 | struct page *get_dump_page(unsigned long addr); | 1000 | struct page *get_dump_page(unsigned long addr); |
991 | extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, | ||
992 | unsigned long address, unsigned int fault_flags); | ||
993 | 1001 | ||
994 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); | 1002 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); |
995 | extern void do_invalidatepage(struct page *page, unsigned long offset); | 1003 | extern void do_invalidatepage(struct page *page, unsigned long offset); |