aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2011-07-27 06:17:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-08-08 15:11:02 -0400
commit5c723ba5b7886909b2e430f2eae454c33f7fe5c6 (patch)
tree4111bfcba622b375d5dd6955fca5252753f283a1 /include
parent2f84dd70916ccadd25e94d28363182a978f569b6 (diff)
mm: Fix fixup_user_fault() for MMU=n
In commit 2efaca927f5c ("mm/futex: fix futex writes on archs with SW tracking of dirty & young") we forgot about MMU=n. This patch fixes that. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: David Howells <dhowells@redhat.com> Link: http://lkml.kernel.org/r/1311761831.24752.413.camel@twins Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-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 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
963extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, 963extern 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);
965extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
966 unsigned long address, unsigned int fault_flags);
965#else 967#else
966static inline int handle_mm_fault(struct mm_struct *mm, 968static 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}
976static 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
976extern int make_pages_present(unsigned long addr, unsigned long end); 986extern 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,
988int get_user_pages_fast(unsigned long start, int nr_pages, int write, 998int get_user_pages_fast(unsigned long start, int nr_pages, int write,
989 struct page **pages); 999 struct page **pages);
990struct page *get_dump_page(unsigned long addr); 1000struct page *get_dump_page(unsigned long addr);
991extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
992 unsigned long address, unsigned int fault_flags);
993 1001
994extern int try_to_release_page(struct page * page, gfp_t gfp_mask); 1002extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
995extern void do_invalidatepage(struct page *page, unsigned long offset); 1003extern void do_invalidatepage(struct page *page, unsigned long offset);