函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:hmm_vma_walk_hugetlb_entry

函数原型:static int hmm_vma_walk_hugetlb_entry(pte_t *pte, unsigned long hmask, unsigned long start, unsigned long end, struct mm_walk *walk)

返回类型:int

参数:

类型参数名称
pte_t *pte
unsigned longhmask
unsigned longstart
unsigned longend
struct mm_walk *walk
546  addr等于start
547  hmm_vma_walk等于private
548  range等于range
549  vma等于vma
554  ret等于0
556  ptl等于huge_pte_lock(hstate_vma(vma), mm, pte)
557  entry等于huge_ptep_get(pte)
559  i等于startstart右移PAGE_SHIFT determines the page size
560  orig_pfn等于pfns[i]
561  pfns[i]等于values[ corresponding CPU page table entry is pte_none()]
562  cpu_flags等于pte_to_hmm_pfn_flags(range, entry)
563  fault = write_fault = false
564  hmm_pte_need_fault(hmm_vma_walk, orig_pfn, cpu_flags, & fault, & write_fault)
566  如果faultwrite_fault
567  ret等于负ENOENT
568  转到:unlock
571  pfn等于pte_pfn(entry)加start按位与hmask的反的值右移PAGE_SHIFT determines the page size 位的值
572 addr小于end循环pfns[i]等于hmm_device_entry_from_pfn() - create a valid device entry value from pfn*@range: range use to encode HMM pfn value*@pfn: pfn value for which to create the device entry* Return: valid device entry for the pfn按位或cpu_flags
575  last等于end
577  unlock :
578  自旋锁解锁
580  如果ret恒等于负ENOENT则返回:hmm_vma_walk_hole_() - handle a range lacking valid pmd or pte(s)*@addr: range virtual start address (inclusive)*@end: range virtual end address (exclusive)*@fault: should we fault or not ?*@write_fault: write fault ?*@walk: mm_walk structure* Return: 0
583  返回:ret