函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\vmalloc.c Create Date:2022-07-27 16:27:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Set up page tables in kva (addr, end). The ptes shall have prot "prot", and* will have pfns corresponding to the "pages" array.* Ie. pte at addr+N*PAGE_SIZE shall point to pfn corresponding to pages[N]

函数原型:static int vmap_page_range_noflush(unsigned long start, unsigned long end, pgprot_t prot, struct page **pages)

返回类型:int

参数:

类型参数名称
unsigned longstart
unsigned longend
pgprot_tprot
struct page **pages
225  addr等于start
226  err等于0
227  nr等于0
229  BUG_ON(addr >= end)
230  pgd等于a shortcut which implies the use of the kernel's pgd, instead* of a process's(addr)
231  循环
232  next等于When walking page tables, get the address of the next boundary,* or the end address of the range if that comes earlier. Although no* vma end wraps to 0, rounded up __boundary may wrap to 0 throughout.(addr, end)
233  err等于vmap_p4d_range(pgd, addr, next, prot, pages, & nr)
234  如果err则返回:err
236 pgd自加, addr等于next, addr不等于end循环
238  返回:nr
调用者
名称描述
vmap_page_range
map_kernel_range_noflushmap_kernel_range_noflush - map kernel VM area with the specified pages*@addr: start of the VM area to map*@size: size of the VM area to map*@prot: page protection flags to use*@pages: pages to map* Map PFN_UP(@size) pages at @addr