diff options
Diffstat (limited to 'mm/util.c')
-rw-r--r-- | mm/util.c | 47 |
1 files changed, 0 insertions, 47 deletions
@@ -300,53 +300,6 @@ void arch_pick_mmap_layout(struct mm_struct *mm, struct rlimit *rlim_stack) | |||
300 | } | 300 | } |
301 | #endif | 301 | #endif |
302 | 302 | ||
303 | /* | ||
304 | * Like get_user_pages_fast() except its IRQ-safe in that it won't fall | ||
305 | * back to the regular GUP. | ||
306 | * Note a difference with get_user_pages_fast: this always returns the | ||
307 | * number of pages pinned, 0 if no pages were pinned. | ||
308 | * If the architecture does not support this function, simply return with no | ||
309 | * pages pinned. | ||
310 | */ | ||
311 | int __weak __get_user_pages_fast(unsigned long start, | ||
312 | int nr_pages, int write, struct page **pages) | ||
313 | { | ||
314 | return 0; | ||
315 | } | ||
316 | EXPORT_SYMBOL_GPL(__get_user_pages_fast); | ||
317 | |||
318 | /** | ||
319 | * get_user_pages_fast() - pin user pages in memory | ||
320 | * @start: starting user address | ||
321 | * @nr_pages: number of pages from start to pin | ||
322 | * @gup_flags: flags modifying pin behaviour | ||
323 | * @pages: array that receives pointers to the pages pinned. | ||
324 | * Should be at least nr_pages long. | ||
325 | * | ||
326 | * get_user_pages_fast provides equivalent functionality to get_user_pages, | ||
327 | * operating on current and current->mm, with force=0 and vma=NULL. However | ||
328 | * unlike get_user_pages, it must be called without mmap_sem held. | ||
329 | * | ||
330 | * get_user_pages_fast may take mmap_sem and page table locks, so no | ||
331 | * assumptions can be made about lack of locking. get_user_pages_fast is to be | ||
332 | * implemented in a way that is advantageous (vs get_user_pages()) when the | ||
333 | * user memory area is already faulted in and present in ptes. However if the | ||
334 | * pages have to be faulted in, it may turn out to be slightly slower so | ||
335 | * callers need to carefully consider what to use. On many architectures, | ||
336 | * get_user_pages_fast simply falls back to get_user_pages. | ||
337 | * | ||
338 | * Return: number of pages pinned. This may be fewer than the number | ||
339 | * requested. If nr_pages is 0 or negative, returns 0. If no pages | ||
340 | * were pinned, returns -errno. | ||
341 | */ | ||
342 | int __weak get_user_pages_fast(unsigned long start, | ||
343 | int nr_pages, unsigned int gup_flags, | ||
344 | struct page **pages) | ||
345 | { | ||
346 | return get_user_pages_unlocked(start, nr_pages, pages, gup_flags); | ||
347 | } | ||
348 | EXPORT_SYMBOL_GPL(get_user_pages_fast); | ||
349 | |||
350 | unsigned long vm_mmap_pgoff(struct file *file, unsigned long addr, | 303 | unsigned long vm_mmap_pgoff(struct file *file, unsigned long addr, |
351 | unsigned long len, unsigned long prot, | 304 | unsigned long len, unsigned long prot, |
352 | unsigned long flag, unsigned long pgoff) | 305 | unsigned long flag, unsigned long pgoff) |