函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vmf_insert_pfn_pmd

函数原型:vm_fault_t vmf_insert_pfn_pmd(struct vm_fault *vmf, pfn_t pfn, bool write)

返回类型:vm_fault_t

参数:

类型参数名称
struct vm_fault *vmf
pfn_tpfn
boolwrite
818  addr等于Faulting virtual address 按位与PMD_MASK
819  vma等于Target VMA
820  pgprot等于Access permissions of this VMA.
821  pgtable_t pgtable = NULL
828  BUG_ON(!(Flags, see mm.h. & (Page-ranges managed without "struct page", just pure PFN | Can contain "struct page" and pure PFN pages )) && !pfn_t_devmap(pfn))
830  BUG_ON((Flags, see mm.h. & (Page-ranges managed without "struct page", just pure PFN | Can contain "struct page" and pure PFN pages )) == (Page-ranges managed without "struct page", just pure PFN | Can contain "struct page" and pure PFN pages ))
832  BUG_ON((Flags, see mm.h. & Page-ranges managed without "struct page", just pure PFN ) && is_cow_mapping(Flags, see mm.h. ))
834  如果addr小于Our start address within vm_mm. addr大于等于The first byte after our end addresswithin vm_mm. 则返回:VM_FAULT_SIGBUS
837  如果arch_needs_pgtable_deposit()则
838  pgtable等于pte_alloc_one(The address space we belong to. )
839  如果非pgtable则返回:VM_FAULT_OOM
843  track_pfn_insert(vma, & pgprot, pfn)
845  insert_pfn_pmd(vma, addr, Pointer to pmd entry matching* the 'address' , pfn, pgprot, write, pgtable)
846  返回:VM_FAULT_NOPAGE