aboutsummaryrefslogtreecommitdiffstats
path: root/mm/util.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2010-08-22 07:08:57 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:51:24 -0400
commit45888a0c6edc305495b6bd72a30e66bc40b324c6 (patch)
tree0f25d2133c8e7d80e7daca039ed383371562ee8e /mm/util.c
parentf392eb2546170e539668a5ab8df6c1254d15a201 (diff)
export __get_user_pages_fast() function
This function is used by KVM to pin process's page in the atomic context. Define the 'weak' function to avoid other architecture not support it Acked-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'mm/util.c')
-rw-r--r--mm/util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mm/util.c b/mm/util.c
index 4735ea481816..73dac81e9f78 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -245,6 +245,19 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
245} 245}
246#endif 246#endif
247 247
248/*
249 * Like get_user_pages_fast() except its IRQ-safe in that it won't fall
250 * back to the regular GUP.
251 * If the architecture not support this fucntion, simply return with no
252 * page pinned
253 */
254int __attribute__((weak)) __get_user_pages_fast(unsigned long start,
255 int nr_pages, int write, struct page **pages)
256{
257 return 0;
258}
259EXPORT_SYMBOL_GPL(__get_user_pages_fast);
260
248/** 261/**
249 * get_user_pages_fast() - pin user pages in memory 262 * get_user_pages_fast() - pin user pages in memory
250 * @start: starting user address 263 * @start: starting user address