函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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")

函数原型:static int remap_pte_range(struct mm_struct *mm, pmd_t *pmd, unsigned long addr, unsigned long end, unsigned long pfn, pgprot_t prot)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
pmd_t *pmd
unsigned longaddr
unsigned longend
unsigned longpfn
pgprot_tprot
1815  err等于0
1817  pte等于pte_alloc_map_lock(mm, pmd, addr, & ptl)
1818  如果非pte则返回:负ENOMEM
1820  A facility to provide lazy MMU batching()
1821  循环
1822  BUG_ON(!pte_none( * pte))
1823  如果非pfn_modify_allowed(pfn, prot)则
1824  err等于负EACCES
1825  退出
1827  set_pte_at(mm, addr, pte, pte_mkspecial(pfn_pte(pfn, prot)))
1828  pfn自加
1829 pte自加, addr加等于PAGE_SIZE, addr不等于end循环
1830  arch_leave_lazy_mmu_mode()
1831  pte_unmap_unlock(pte - 1, ptl)
1832  返回:err
调用者
名称描述
remap_pmd_range