函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:remap_pmd_range

函数原型:static inline int remap_pmd_range(struct mm_struct *mm, pud_t *pud, unsigned long addr, unsigned long end, unsigned long pfn, pgprot_t prot)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
pud_t *pud
unsigned longaddr
unsigned longend
unsigned longpfn
pgprot_tprot
1843  pfn减等于addr右移PAGE_SHIFT determines the page size
1844  pmd等于pmd_alloc(mm, pud, addr)
1845  如果非pmd则返回:负ENOMEM
1847  VM_BUG_ON(pmd_trans_huge( * pmd))
1848  循环
1849  next等于pmd_addr_end(addr, end)
1850  err等于maps a range of physical memory into the requested pages. the old* mappings are removed. any references to nonexistent pages results* in null mappings (currently treated as "copy-on-access")
1852  如果err则返回:err
1854 pmd自加, addr等于next, addr不等于end循环
1855  返回:0
调用者
名称描述
remap_pud_range