函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:hmm_vma_walk_pmd

函数原型:static int hmm_vma_walk_pmd(pmd_t *pmdp, unsigned long start, unsigned long end, struct mm_walk *walk)

返回类型:int

参数:

类型参数名称
pmd_t *pmdp
unsigned longstart
unsigned longend
struct mm_walk *walk
373  hmm_vma_walk等于private
374  range等于range
375  pfns等于pfns
376  addr等于start
380  again :
381  pmd等于READ_ONCE( * pmdp)
382  如果pmd_none(pmd)则返回:hmm_vma_walk_hole(start, end, walk)
385  如果thp_migration_supported()且is_pmd_migration_entry(pmd)则
390  i等于addrstart右移PAGE_SHIFT determines the page size
391  npages等于endaddr右移PAGE_SHIFT determines the page size
392  pfns等于pfns[i]
394  hmm_range_need_fault(hmm_vma_walk, pfns, npages, 0, & fault, & write_fault)
396  如果faultwrite_fault
397  last等于addr
399  返回:负EBUSY
401  返回:0
402  否则如果非pmd_present(pmd)则返回:hmm_pfns_fill(start, end, range, corresponding CPU page table entry points to poisoned memory)
405  如果pmd_devmap(pmd)或pmd_trans_huge(pmd)则
415  pmd等于pmd_read_atomic(pmdp)
416  The "volatile" is due to gcc bugs ()
417  如果非pmd_devmap(pmd)且非pmd_trans_huge(pmd)则转到:again
420  i等于addrstart右移PAGE_SHIFT determines the page size
421  返回:hmm_vma_handle_pmd(walk, addr, end, & pfns[i], pmd)
430  如果pmd_bad(pmd)则返回:hmm_pfns_fill(start, end, range, corresponding CPU page table entry points to poisoned memory)
433  ptep等于pte_offset_map(pmdp, addr)
434  i等于addrstart右移PAGE_SHIFT determines the page size
435 addr小于end循环
438  r等于hmm_vma_handle_pte(walk, addr, end, pmdp, ptep, & pfns[i])
439  如果r
441  last等于addr
442  返回:r
445  如果pgmap
452  put_dev_pagemap(pgmap)
453  pgmap = NULL
455  pte_unmap(ptep - 1)
457  last等于addr
458  返回:0