From e1d6d01ab491bee6cfa02f2c10db50f31de85e79 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Fri, 12 Dec 2014 16:55:27 -0800 Subject: [PATCH] mm: export find_extend_vma() and handle_mm_fault() for driver use This lets drivers like the AMD IOMMUv2 driver handle faults a bit more simply, rather than doing tricks with page refs and get_user_pages(). Signed-off-by: Jesse Barnes Cc: Oded Gabbay Cc: Joerg Roedel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/memory.c | 1 + mm/mmap.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/mm/memory.c b/mm/memory.c index 5afdb5b8d4e2..fbf74112de5b 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3365,6 +3365,7 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, return ret; } +EXPORT_SYMBOL_GPL(handle_mm_fault); #ifndef __PAGETABLE_PUD_FOLDED /* diff --git a/mm/mmap.c b/mm/mmap.c index 0d84b2f86f3b..7b36aa7cc89a 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2362,6 +2362,8 @@ find_extend_vma(struct mm_struct *mm, unsigned long addr) } #endif +EXPORT_SYMBOL_GPL(find_extend_vma); + /* * Ok - we have the memory areas we should free on the vma list, * so release them, and do the vma updates. -- 2.20.1