Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\intel_epb.c Create Date:2022-07-28 07:57:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:energy_perf_bias_store

Proto:static ssize_t energy_perf_bias_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)

Type:ssize_t

Parameter:

TypeParameterName
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  If ret >= 0 Then val = energ_perf_values[ret]
147  Else if kstrtou64(buf, 0, & val) || val > MAX_EPB Then Return -EINVAL
150  ret = rdmsrl_on_cpu(cpu, MSR_IA32_ENERGY_PERF_BIAS, & epb)
151  If ret < 0 Then Return ret
154  ret = wrmsrl_on_cpu(cpu, MSR_IA32_ENERGY_PERF_BIAS, (epb & ~EPB_MASK) | val)
156  If ret < 0 Then Return ret
159  Return count