函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\resctrl\pseudo_lock.c Create Date:2022-07-27 09:14:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pseudo_lock_dev_mmap

函数原型:static int pseudo_lock_dev_mmap(struct file *filp, struct vm_area_struct *vma)

返回类型:int

参数:

类型参数名称
struct file *filp
struct vm_area_struct *vma
1473  vsize等于The first byte after our end addresswithin vm_mm. Our start address within vm_mm.
1474  off等于Offset (within vm_file) in PAGE_SIZEunits 左移PAGE_SHIFT determines the page size
1480  mutex_lock( & Mutex to protect rdtgroup access. )
1482  rdtgrp等于 needed for tty driver, and maybe others
1483  WARN_ON(!rdtgrp)
1484  如果非rdtgrp
1485  mutex_unlock( & Mutex to protect rdtgroup access. )
1486  返回:负ENODEV
1489  plr等于plr
1491  如果非d
1492  mutex_unlock( & Mutex to protect rdtgroup access. )
1493  返回:负ENODEV
1502  如果非pumask_subset - (*src1p & ~*src2p) == 0*@src1p: the first input*@src2p: the second input* Returns 1 if *@src1p is a subset of *@src2p, else returns 0
1503  mutex_unlock( & Mutex to protect rdtgroup access. )
1504  返回:负EINVAL
1507  physical等于__pa(kmem)右移PAGE_SHIFT determines the page size
1508  psize等于sizeoff
1510  如果off大于size
1511  mutex_unlock( & Mutex to protect rdtgroup access. )
1512  返回:负ENOSPC
1519  如果非Flags, see mm.h. 按位与VM_SHARED的值则
1520  mutex_unlock( & Mutex to protect rdtgroup access. )
1521  返回:负EINVAL
1524  如果vsize大于psize
1525  mutex_unlock( & Mutex to protect rdtgroup access. )
1526  返回:负ENOSPC
1529  memset(kmem + off, 0, vsize)
1531  如果remap_pfn_range(vma, Our start address within vm_mm. , physical + Offset (within vm_file) in PAGE_SIZEunits , vsize, Access permissions of this VMA. )则
1533  mutex_unlock( & Mutex to protect rdtgroup access. )
1534  返回:负EAGAIN
1536  Function pointers to deal with this struct. 等于pseudo_mmap_ops
1537  mutex_unlock( & Mutex to protect rdtgroup access. )
1538  返回:0