函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:hmm_vma_handle_pte

函数原型:static int hmm_vma_handle_pte(struct mm_walk *walk, unsigned long addr, unsigned long end, pmd_t *pmdp, pte_t *ptep, uint64_t *pfn)

返回类型:int

参数:

类型参数名称
struct mm_walk *walk
unsigned longaddr
unsigned longend
pmd_t *pmdp
pte_t *ptep
uint64_t *pfn
268  hmm_vma_walk等于private
269  range等于range
272  pte等于ptep
273  orig_pfn等于pfn
275  pfn等于values[ corresponding CPU page table entry is pte_none()]
276  fault = write_fault = false
278  如果pte_none(pte)则
279  hmm_pte_need_fault(hmm_vma_walk, orig_pfn, 0, & fault, & write_fault)
281  如果faultwrite_fault则转到:fault
283  返回:0
286  如果非pte_present(pte)则
287  entry等于Convert the arch-dependent pte representation of a swp_entry_t into an* arch-independent swp_entry_t.
289  如果非non_swap_entry(entry)则
293  如果faultwrite_fault则转到:fault
295  返回:0
302  如果is_device_private_entry(entry)则
309  如果faultwrite_fault则转到:fault
313  pfn或等于cpu_flags
314  返回:0
317  如果is_migration_entry(entry)则
318  如果faultwrite_fault
319  pte_unmap(ptep)
320  last等于addr
322  返回:负EBUSY
324  返回:0
328  pfn等于values[ corresponding CPU page table entry points to poisoned memory]
329  返回:负EFAULT
330  否则
331  cpu_flags等于pte_to_hmm_pfn_flags(range, pte)
332  hmm_pte_need_fault(hmm_vma_walk, orig_pfn, cpu_flags, & fault, & write_fault)
336  如果faultwrite_fault则转到:fault
339  如果pte_devmap(pte)则
340  pgmap等于get_dev_pagemap(pte_pfn(pte), pgmap)
342  如果此条件成立可能性小(为编译器优化)(!pgmap)则返回:负EBUSY
344  否则如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_ARCH_HAS_PTE_SPECIAL)且pte_special(pte)则
345  如果非is_zero_pfn(pte_pfn(pte))则
347  返回:负EFAULT
355  pfn等于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
356  返回:0
358  fault :
359  如果pgmap
360  put_dev_pagemap(pgmap)
361  pgmap = NULL
363  pte_unmap(ptep)
365  返回: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
调用者
名称描述
hmm_vma_walk_pmd