Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\huge_memory.c Create Date:2022-07-28 16:01:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:vmf_insert_pfn_pmd

Proto:vm_fault_t vmf_insert_pfn_pmd(struct vm_fault *vmf, pfn_t pfn, bool write)

Type:vm_fault_t

Parameter:

TypeParameterName
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  If addr < Our start address within vm_mm. || addr >= The first byte after our end addresswithin vm_mm. Then Return VM_FAULT_SIGBUS
837  If arch_needs_pgtable_deposit() Then
838  pgtable = pte_alloc_one(The address space we belong to. )
839  If Not pgtable Then Return 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  Return VM_FAULT_NOPAGE