Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
09041dae
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
09041dae
编写于
4月 24, 2009
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'cpufreq' into release
上级
f752a091
d876dfbb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
14 deletion
+16
-14
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+16
-14
未找到文件。
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
浏览文件 @
09041dae
...
...
@@ -65,14 +65,18 @@ enum {
struct
acpi_cpufreq_data
{
struct
acpi_processor_performance
*
acpi_data
;
struct
cpufreq_frequency_table
*
freq_table
;
unsigned
int
max_freq
;
unsigned
int
resume
;
unsigned
int
cpu_feature
;
u64
saved_aperf
,
saved_mperf
;
};
static
DEFINE_PER_CPU
(
struct
acpi_cpufreq_data
*
,
drv_data
);
struct
acpi_msr_data
{
u64
saved_aperf
,
saved_mperf
;
};
static
DEFINE_PER_CPU
(
struct
acpi_msr_data
,
msr_data
);
DEFINE_TRACE
(
power_mark
);
/* acpi_perf_data is a pointer to percpu data. */
...
...
@@ -287,11 +291,11 @@ static unsigned int get_measured_perf(struct cpufreq_policy *policy,
return
0
;
cur
.
aperf
.
whole
=
readin
.
aperf
.
whole
-
per_cpu
(
drv_data
,
cpu
)
->
saved_aperf
;
per_cpu
(
msr_data
,
cpu
).
saved_aperf
;
cur
.
mperf
.
whole
=
readin
.
mperf
.
whole
-
per_cpu
(
drv_data
,
cpu
)
->
saved_mperf
;
per_cpu
(
drv_data
,
cpu
)
->
saved_aperf
=
readin
.
aperf
.
whole
;
per_cpu
(
drv_data
,
cpu
)
->
saved_mperf
=
readin
.
mperf
.
whole
;
per_cpu
(
msr_data
,
cpu
).
saved_mperf
;
per_cpu
(
msr_data
,
cpu
).
saved_aperf
=
readin
.
aperf
.
whole
;
per_cpu
(
msr_data
,
cpu
).
saved_mperf
=
readin
.
mperf
.
whole
;
#ifdef __i386__
/*
...
...
@@ -335,7 +339,7 @@ static unsigned int get_measured_perf(struct cpufreq_policy *policy,
#endif
retval
=
per_cpu
(
drv_data
,
policy
->
cpu
)
->
max_freq
*
perf_percent
/
100
;
retval
=
(
policy
->
cpuinfo
.
max_freq
*
perf_percent
)
/
100
;
return
retval
;
}
...
...
@@ -688,16 +692,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
/* Check for high latency (>20uS) from buggy BIOSes, like on T42 */
if
(
perf
->
control_register
.
space_id
==
ACPI_ADR_SPACE_FIXED_HARDWARE
&&
policy
->
cpuinfo
.
transition_latency
>
20
*
1000
)
{
static
int
print_once
;
policy
->
cpuinfo
.
transition_latency
=
20
*
1000
;
if
(
!
print_once
)
{
print_once
=
1
;
printk
(
KERN_INFO
"Capping off P-state tranision latency"
" at 20 uS
\n
"
);
}
printk_once
(
KERN_INFO
"Capping off P-state tranision"
" latency at 20 uS
\n
"
);
}
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
>=
...
...
@@ -716,6 +715,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
if
(
result
)
goto
err_freqfree
;
if
(
perf
->
states
[
0
].
core_frequency
*
1000
!=
policy
->
cpuinfo
.
max_freq
)
printk
(
KERN_WARNING
FW_WARN
"P-state 0 is not max freq
\n
"
);
switch
(
perf
->
control_register
.
space_id
)
{
case
ACPI_ADR_SPACE_SYSTEM_IO
:
/* Current speed is unknown and not detectable by IO port */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录