aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2007-02-12 03:51:38 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:27 -0500
commit22cd25ed31bbf849acaa06ab220dc4f526153f13 (patch)
treebffc0fa86b3734d89afb3eccb19249663de34ce2 /mm/memory.c
parente0dc0d8f4a327d033bfb63d43f113d5f31d11b3c (diff)
[PATCH] Add NOPFN_REFAULT result from vm_ops->nopfn()
Add a NOPFN_REFAULT return code for vm_ops->nopfn() equivalent to NOPAGE_REFAULT for vmops->nopage() indicating that the handler requests a re-execution of the faulting instruction Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Arnd Bergmann <arnd.bergmann@de.ibm.com> Cc: Hugh Dickins <hugh@veritas.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 8b8f0d2b453d..e7066e71dfa3 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2355,10 +2355,12 @@ static noinline int do_no_pfn(struct mm_struct *mm, struct vm_area_struct *vma,
2355 BUG_ON(is_cow_mapping(vma->vm_flags)); 2355 BUG_ON(is_cow_mapping(vma->vm_flags));
2356 2356
2357 pfn = vma->vm_ops->nopfn(vma, address & PAGE_MASK); 2357 pfn = vma->vm_ops->nopfn(vma, address & PAGE_MASK);
2358 if (pfn == NOPFN_OOM) 2358 if (unlikely(pfn == NOPFN_OOM))
2359 return VM_FAULT_OOM; 2359 return VM_FAULT_OOM;
2360 if (pfn == NOPFN_SIGBUS) 2360 else if (unlikely(pfn == NOPFN_SIGBUS))
2361 return VM_FAULT_SIGBUS; 2361 return VM_FAULT_SIGBUS;
2362 else if (unlikely(pfn == NOPFN_REFAULT))
2363 return VM_FAULT_MINOR;
2362 2364
2363 page_table = pte_offset_map_lock(mm, pmd, address, &ptl); 2365 page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
2364 2366