Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
3a58df35
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看板
提交
3a58df35
编写于
1月 17, 2009
作者:
D
Dave Jones
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CPUFREQ] checkpatch cleanups for acpi-cpufreq
Signed-off-by:
N
Dave Jones
<
davej@redhat.com
>
上级
79cc56af
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
18 deletion
+18
-18
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+18
-18
未找到文件。
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
浏览文件 @
3a58df35
/*
* acpi-cpufreq.c - ACPI Processor P-States Driver
($Revision: 1.4 $)
* acpi-cpufreq.c - ACPI Processor P-States Driver
*
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...
...
@@ -36,16 +36,18 @@
#include <linux/ftrace.h>
#include <linux/acpi.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/uaccess.h>
#include <acpi/processor.h>
#include <asm/io.h>
#include <asm/msr.h>
#include <asm/processor.h>
#include <asm/cpufeature.h>
#include <asm/delay.h>
#include <asm/uaccess.h>
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "acpi-cpufreq", msg)
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \
"acpi-cpufreq", msg)
MODULE_AUTHOR
(
"Paul Diefenbaugh, Dominik Brodowski"
);
MODULE_DESCRIPTION
(
"ACPI Processor P-States Driver"
);
...
...
@@ -95,7 +97,7 @@ static unsigned extract_io(u32 value, struct acpi_cpufreq_data *data)
perf
=
data
->
acpi_data
;
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
{
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
{
if
(
value
==
perf
->
states
[
i
].
status
)
return
data
->
freq_table
[
i
].
frequency
;
}
...
...
@@ -110,7 +112,7 @@ static unsigned extract_msr(u32 msr, struct acpi_cpufreq_data *data)
msr
&=
INTEL_MSR_RANGE
;
perf
=
data
->
acpi_data
;
for
(
i
=
0
;
data
->
freq_table
[
i
].
frequency
!=
CPUFREQ_TABLE_END
;
i
++
)
{
for
(
i
=
0
;
data
->
freq_table
[
i
].
frequency
!=
CPUFREQ_TABLE_END
;
i
++
)
{
if
(
msr
==
perf
->
states
[
data
->
freq_table
[
i
].
index
].
status
)
return
data
->
freq_table
[
i
].
frequency
;
}
...
...
@@ -138,15 +140,13 @@ struct io_addr {
u8
bit_width
;
};
typedef
union
{
struct
msr_addr
msr
;
struct
io_addr
io
;
}
drv_addr_union
;
struct
drv_cmd
{
unsigned
int
type
;
const
struct
cpumask
*
mask
;
drv_addr_union
addr
;
union
{
struct
msr_addr
msr
;
struct
io_addr
io
;
}
addr
;
u32
val
;
};
...
...
@@ -369,7 +369,7 @@ static unsigned int check_freqs(const struct cpumask *mask, unsigned int freq,
unsigned
int
cur_freq
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
100
;
i
++
)
{
for
(
i
=
0
;
i
<
100
;
i
++
)
{
cur_freq
=
extract_freq
(
get_cur_val
(
mask
),
data
);
if
(
cur_freq
==
freq
)
return
1
;
...
...
@@ -494,7 +494,7 @@ acpi_cpufreq_guess_freq(struct acpi_cpufreq_data *data, unsigned int cpu)
unsigned
long
freq
;
unsigned
long
freqn
=
perf
->
states
[
0
].
core_frequency
*
1000
;
for
(
i
=
0
;
i
<
(
perf
->
state_count
-
1
);
i
++
)
{
for
(
i
=
0
;
i
<
(
perf
->
state_count
-
1
);
i
++
)
{
freq
=
freqn
;
freqn
=
perf
->
states
[
i
+
1
].
core_frequency
*
1000
;
if
((
2
*
cpu_khz
)
>
(
freqn
+
freq
))
{
...
...
@@ -673,7 +673,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
/* detect transition latency */
policy
->
cpuinfo
.
transition_latency
=
0
;
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
{
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
{
if
((
perf
->
states
[
i
].
transition_latency
*
1000
)
>
policy
->
cpuinfo
.
transition_latency
)
policy
->
cpuinfo
.
transition_latency
=
...
...
@@ -682,8 +682,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
data
->
max_freq
=
perf
->
states
[
0
].
core_frequency
*
1000
;
/* table init */
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
{
if
(
i
>
0
&&
perf
->
states
[
i
].
core_frequency
>=
for
(
i
=
0
;
i
<
perf
->
state_count
;
i
++
)
{
if
(
i
>
0
&&
perf
->
states
[
i
].
core_frequency
>=
data
->
freq_table
[
valid_states
-
1
].
frequency
/
1000
)
continue
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录