函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mtrr_file_add

函数原型:static int mtrr_file_add(unsigned long base, unsigned long size, unsigned int type, bool increment, struct file *file, int page)

返回类型:int

参数:

类型参数名称
unsigned longbase
unsigned longsize
unsigned inttype
boolincrement
struct file *file
intpage
41  fcount等于FILE_FCOUNT(file)
44  max等于num_var_ranges
45  如果(fcount == NULL)则
46  fcount等于分配数组内存并置零
47  如果非fcount则返回:负ENOMEM
49  FILE_FCOUNT(file)等于fcount
51  如果非page
52  如果base按位与PAGE_SIZE减1或size按位与PAGE_SIZE减1则返回:负EINVAL
54  base右移等于PAGE_SHIFT determines the page size
55  size右移等于PAGE_SHIFT determines the page size
57  reg等于mtrr_add_page - Add a memory type region*@base: Physical base address of region in pages (in units of 4 kB!)*@size: Physical size of region in pages (4 kB)*@type: Type of MTRR desired*@increment: If this is true do usage counting on the region* Memory
58  如果reg大于等于0则fcount[reg]先自加
60  返回:reg
调用者
名称描述
mtrr_ioctl