函数逻辑报告

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:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:seq_file can seek but we ignore it.* Format of control line:* "base=%Lx size=%Lx type=%s" or "disable=%d"

函数原型:static ssize_t mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
const char __user *buf
size_tlen
loff_t *ppos
104  如果非操作权限检查则返回:负EPERM
107  memset(line, 0, LINE_SIZE)
109  len等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(size_t, len, LINE_SIZE - 1)
110  length等于复制用户字符串
111  如果length小于0则返回:length
114  linelen等于strlen - Find the length of a string*@s: The string to be sized
115  ptr等于linelinelen减1
116  如果linelenptr恒等于'\n'则ptr等于'\0'
119  如果非字符串指定长度比较
120  reg等于转换字符串为无符号整形
121  err等于mtrr_del_page - delete a memory type region*@reg: Register returned by mtrr_add*@base: Physical base address*@size: Size of region* If register is supplied then base and size are ignored. This is* how drivers should call it.* Releases an MTRR region
122  如果err小于0则返回:err
124  返回:len
127  如果字符串指定长度比较则返回:负EINVAL
130  base等于十六进制串转换为长整数
131  ptr等于字符串删除空格
133  如果字符串指定长度比较则返回:负EINVAL
136  size等于十六进制串转换为长整数
137  如果base按位与0xfff或size按位与0xfff则返回:负EINVAL
139  ptr等于字符串删除空格
141  如果字符串指定长度比较则返回:负EINVAL
143  ptr等于字符串删除空格
145  i等于match_string - matches given string in an array*@array: array of strings*@n: number of strings in the array or -1 for NULL terminated arrays*@string: string to match with* Return:* index of a @string in the @array if matches, or %-EINVAL otherwise.
146  如果i小于0则返回:i
149  base右移等于PAGE_SHIFT determines the page size
150  size右移等于PAGE_SHIFT determines the page size
151  err等于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
152  如果err小于0则返回:err
154  返回:len