函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vmap_pte_range

函数原型:static int vmap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, pgprot_t prot, struct page **pages, int *nr)

返回类型:int

参数:

类型参数名称
pmd_t *pmd
unsigned longaddr
unsigned longend
pgprot_tprot
struct page **pages
int *nr
147  pte等于pte_alloc_kernel(pmd, addr)
148  如果非pte则返回:负ENOMEM
150  循环
151  page等于pages[ * nr]
153  如果WARN_ON(!pte_none( * pte))则返回:负EBUSY
155  如果WARN_ON(!page)则返回:负ENOMEM
157  set_pte_at( & init_mm, addr, pte, Conversion functions: convert a page and protection to a page entry,* and a page entry and page directory to the page they refer to.* (Currently stuck as a macro because of indirect forward reference* to linux/mm.h:page_to_nid())(page, prot))
158  nr自加
159 pte自加, addr加等于PAGE_SIZE, addr不等于end循环
160  返回:0
调用者
名称描述
vmap_pmd_range