Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\gup.c Create Date:2022-07-28 14:35:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Like get_user_pages_fast() except it's IRQ-safe in that it won't fall back to* the regular GUP

Proto:int __get_user_pages_fast(unsigned long start, int nr_pages, int write, struct page **pages)

Type:int

Parameter:

TypeParameterName
unsigned longstart
intnr_pages
intwrite
struct page **pages
2339  nr = 0
2341  start = Architectures that support memory tagging (assigning tags to memory regions,* embedding these tags into addresses that point to these memory regions, and* checking that the memory and the pointer tags match on memory accesses)(start) & PAGE_MASK
2342  len = nr_pages << PAGE_SHIFT determines the page size
2343  end = start + len
2345  If end <= start Then Return 0
2347  If Value for the false possibility is greater at compile time(!access_ok - Checks if a user space pointer is valid*@addr: User space pointer to start of block to check*@size: Size of block to check* Context: User context only. This function may sleep if pagefaults are* enabled.((void__user * )start, len)) Then Return 0
2362  If IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_HAVE_FAST_GUP) && Check if it's allowed to use __get_user_pages_fast() for the range, or* we need to fall back to the slow version: Then
2364  local_irq_save(flags)
2365  gup_pgd_range(start, end, write ? check pte is writable : 0, pages, & nr)
2366  local_irq_restore(flags)
2369  Return nr