函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:apply_to_pmd_range

函数原型:static int apply_to_pmd_range(struct mm_struct *mm, pud_t *pud, unsigned long addr, unsigned long end, pte_fn_t fn, void *data, bool create)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
pud_t *pud
unsigned longaddr
unsigned longend
pte_fn_tfn
void *data
boolcreate
2067  err等于0
2069  BUG_ON(pud_huge( * pud))
2071  如果create
2072  pmd等于pmd_alloc(mm, pud, addr)
2073  如果非pmd则返回:负ENOMEM
2075  否则
2076  pmd等于pmd_offset(pud, addr)
2078  循环
2079  next等于pmd_addr_end(addr, end)
2080  如果create或非pmd_none_or_clear_bad(pmd)则
2083  如果err退出
2086 pmd自加, addr等于next, addr不等于end循环
2087  返回:err
调用者
名称描述
apply_to_pud_range