Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
2b03f891
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
2b03f891
编写于
1月 18, 2009
作者:
D
Dave Jones
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CPUFREQ] checkpatch cleanups for ondemand governor.
Signed-off-by:
N
Dave Jones
<
davej@redhat.com
>
上级
b9e7638a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
16 deletion
+13
-16
drivers/cpufreq/cpufreq_ondemand.c
drivers/cpufreq/cpufreq_ondemand.c
+13
-16
未找到文件。
drivers/cpufreq/cpufreq_ondemand.c
浏览文件 @
2b03f891
...
...
@@ -65,14 +65,14 @@ struct cpu_dbs_info_s {
cputime64_t
prev_cpu_wall
;
cputime64_t
prev_cpu_nice
;
struct
cpufreq_policy
*
cur_policy
;
struct
delayed_work
work
;
struct
delayed_work
work
;
struct
cpufreq_frequency_table
*
freq_table
;
unsigned
int
freq_lo
;
unsigned
int
freq_lo_jiffies
;
unsigned
int
freq_hi_jiffies
;
int
cpu
;
unsigned
int
enable
:
1
,
sample_type:
1
;
sample_type:
1
;
};
static
DEFINE_PER_CPU
(
struct
cpu_dbs_info_s
,
cpu_dbs_info
);
...
...
@@ -203,12 +203,12 @@ static void ondemand_powersave_bias_init(void)
/************************** sysfs interface ************************/
static
ssize_t
show_sampling_rate_max
(
struct
cpufreq_policy
*
policy
,
char
*
buf
)
{
return
sprintf
(
buf
,
"%u
\n
"
,
MAX_SAMPLING_RATE
);
return
sprintf
(
buf
,
"%u
\n
"
,
MAX_SAMPLING_RATE
);
}
static
ssize_t
show_sampling_rate_min
(
struct
cpufreq_policy
*
policy
,
char
*
buf
)
{
return
sprintf
(
buf
,
"%u
\n
"
,
MIN_SAMPLING_RATE
);
return
sprintf
(
buf
,
"%u
\n
"
,
MIN_SAMPLING_RATE
);
}
#define define_one_ro(_name) \
...
...
@@ -279,14 +279,14 @@ static ssize_t store_ignore_nice_load(struct cpufreq_policy *policy,
unsigned
int
j
;
ret
=
sscanf
(
buf
,
"%u"
,
&
input
);
if
(
ret
!=
1
)
if
(
ret
!=
1
)
return
-
EINVAL
;
if
(
input
>
1
)
if
(
input
>
1
)
input
=
1
;
mutex_lock
(
&
dbs_mutex
);
if
(
input
==
dbs_tuners_ins
.
ignore_nice
)
{
/* nothing to do */
if
(
input
==
dbs_tuners_ins
.
ignore_nice
)
{
/* nothing to do */
mutex_unlock
(
&
dbs_mutex
);
return
count
;
}
...
...
@@ -337,7 +337,7 @@ define_one_rw(up_threshold);
define_one_rw
(
ignore_nice_load
);
define_one_rw
(
powersave_bias
);
static
struct
attribute
*
dbs_attributes
[]
=
{
static
struct
attribute
*
dbs_attributes
[]
=
{
&
sampling_rate_max
.
attr
,
&
sampling_rate_min
.
attr
,
&
sampling_rate
.
attr
,
...
...
@@ -512,8 +512,7 @@ static void do_dbs_timer(struct work_struct *work)
}
}
else
{
__cpufreq_driver_target
(
dbs_info
->
cur_policy
,
dbs_info
->
freq_lo
,
CPUFREQ_RELATION_H
);
dbs_info
->
freq_lo
,
CPUFREQ_RELATION_H
);
}
queue_delayed_work_on
(
cpu
,
kondemand_wq
,
&
dbs_info
->
work
,
delay
);
unlock_policy_rwsem_write
(
cpu
);
...
...
@@ -530,7 +529,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info)
dbs_info
->
sample_type
=
DBS_NORMAL_SAMPLE
;
INIT_DELAYED_WORK_DEFERRABLE
(
&
dbs_info
->
work
,
do_dbs_timer
);
queue_delayed_work_on
(
dbs_info
->
cpu
,
kondemand_wq
,
&
dbs_info
->
work
,
delay
);
delay
);
}
static
inline
void
dbs_timer_exit
(
struct
cpu_dbs_info_s
*
dbs_info
)
...
...
@@ -617,12 +616,10 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
mutex_lock
(
&
dbs_mutex
);
if
(
policy
->
max
<
this_dbs_info
->
cur_policy
->
cur
)
__cpufreq_driver_target
(
this_dbs_info
->
cur_policy
,
policy
->
max
,
CPUFREQ_RELATION_H
);
policy
->
max
,
CPUFREQ_RELATION_H
);
else
if
(
policy
->
min
>
this_dbs_info
->
cur_policy
->
cur
)
__cpufreq_driver_target
(
this_dbs_info
->
cur_policy
,
policy
->
min
,
CPUFREQ_RELATION_L
);
policy
->
min
,
CPUFREQ_RELATION_L
);
mutex_unlock
(
&
dbs_mutex
);
break
;
}
...
...
@@ -677,7 +674,7 @@ static void __exit cpufreq_gov_dbs_exit(void)
MODULE_AUTHOR
(
"Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>"
);
MODULE_AUTHOR
(
"Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>"
);
MODULE_DESCRIPTION
(
"'cpufreq_ondemand' - A dynamic cpufreq governor for "
"Low Latency Frequency Transition capable processors"
);
"Low Latency Frequency Transition capable processors"
);
MODULE_LICENSE
(
"GPL"
);
#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录