函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:max_time_store

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

返回类型:ssize_t

参数:

类型参数名称
struct device *kobj
struct device_attribute *attr
const char *buf
size_tcount
178  ret等于kstrtou32(buf, 0, & max_time)
179  如果ret则返回:ret
183  如果max_time按位与The time field is bit[31:2], but representing a 32bit value with* bit[1:0] zero.的反则返回:负EINVAL
186  mutex_lock( & Serialize access to umwait_control_cached and IA32_UMWAIT_CONTROL MSR in* the sysfs write functions.)
188  ctrl等于READ_ONCE(Cache IA32_UMWAIT_CONTROL MSR. This is a systemwide control. By default,* umwait max time is 100000 in TSC-quanta and C0.2 is enabled)
189  如果max_time不等于umwait_ctrl_max_time(ctrl)则umwait_update_control(max_time, When bit 0 in IA32_UMWAIT_CONTROL MSR is 1, C0.2 is disabled.* Otherwise, C0.2 is enabled.)
192  mutex_unlock( & Serialize access to umwait_control_cached and IA32_UMWAIT_CONTROL MSR in* the sysfs write functions.)
194  返回:count