函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:energy_perf_bias_store

函数原型:static ssize_t energy_perf_bias_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)

返回类型:ssize_t

参数:

类型参数名称
struct device *dev
struct device_attribute *attr
const char *buf
size_tcount
139  cpu等于id
143  ret等于__sysfs_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*@str: string to match with* Returns index of @str in the @array or -EINVAL, just like match_string().
145  如果ret大于等于0则val等于energ_perf_values[ret]
147  否则如果kstrtou64(buf, 0, & val)或val大于MAX_EPB则返回:负EINVAL
150  ret等于rdmsrl_on_cpu(cpu, MSR_IA32_ENERGY_PERF_BIAS, & epb)
151  如果ret小于0则返回:ret
154  ret等于wrmsrl_on_cpu(cpu, MSR_IA32_ENERGY_PERF_BIAS, (epb & ~EPB_MASK) | val)
156  如果ret小于0则返回:ret
159  返回:count