函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:insert_pfn_pmd

函数原型:static void insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, pfn_t pfn, pgprot_t prot, bool write, pgtable_t pgtable)

返回类型:void

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longaddr
pmd_t *pmd
pfn_tpfn
pgprot_tprot
boolwrite
pgtable_tpgtable
773  mm等于The address space we belong to.
777  ptl等于pmd_lock(mm, pmd)
778  如果非pmd_none( * pmd)则
779  如果write
780  如果pmd_pfn( * pmd)不等于pfn_t_to_pfn(pfn)则
782  转到:out_unlock
784  entry等于pmd_mkyoung( * pmd)
790  转到:out_unlock
793  entry等于pmd_mkhuge(pfn_t_pmd(pfn, prot))
794  如果pfn_t_devmap(pfn)则entry等于pmd_mkdevmap(entry)
796  如果write
797  entry等于pmd_mkyoung(pmd_mkdirty(entry))
798  entry等于maybe_pmd_mkwrite(entry, vma)
801  如果pgtable
802  pgtable_trans_huge_deposit(mm, pmd, pgtable)
803  mm_inc_nr_ptes(mm)
804  pgtable = NULL
807  set_pmd_at(mm, addr, pmd, entry)
808  update_mmu_cache_pmd(vma, addr, pmd)
810  out_unlock :
811  自旋锁解锁
812  如果pgtablepte_free - free PTE-level user page table page*@mm: the mm_struct of the current context*@pte_page: the `struct page` representing the page table
调用者
名称描述
vmf_insert_pfn_pmd