Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
48ee923a
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看板
提交
48ee923a
编写于
1月 17, 2009
作者:
D
Dave Jones
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CPUFREQ] checkpatch cleanups for longrun
Signed-off-by:
N
Dave Jones
<
davej@redhat.com
>
上级
ac617bd0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
11 deletion
+14
-11
arch/x86/kernel/cpu/cpufreq/longrun.c
arch/x86/kernel/cpu/cpufreq/longrun.c
+14
-11
未找到文件。
arch/x86/kernel/cpu/cpufreq/longrun.c
浏览文件 @
48ee923a
...
...
@@ -11,12 +11,13 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/cpufreq.h>
#include <linux/timex.h>
#include <asm/msr.h>
#include <asm/processor.h>
#include <asm/timex.h>
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longrun", msg)
#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, \
"longrun", msg)
static
struct
cpufreq_driver
longrun_driver
;
...
...
@@ -51,7 +52,7 @@ static void __init longrun_get_policy(struct cpufreq_policy *policy)
msr_lo
&=
0x0000007F
;
msr_hi
&=
0x0000007F
;
if
(
longrun_high_freq
<=
longrun_low_freq
)
{
if
(
longrun_high_freq
<=
longrun_low_freq
)
{
/* Assume degenerate Longrun table */
policy
->
min
=
policy
->
max
=
longrun_high_freq
;
}
else
{
...
...
@@ -79,7 +80,7 @@ static int longrun_set_policy(struct cpufreq_policy *policy)
if
(
!
policy
)
return
-
EINVAL
;
if
(
longrun_high_freq
<=
longrun_low_freq
)
{
if
(
longrun_high_freq
<=
longrun_low_freq
)
{
/* Assume degenerate Longrun table */
pctg_lo
=
pctg_hi
=
100
;
}
else
{
...
...
@@ -152,7 +153,7 @@ static unsigned int longrun_get(unsigned int cpu)
cpuid
(
0x80860007
,
&
eax
,
&
ebx
,
&
ecx
,
&
edx
);
dprintk
(
"cpuid eax is %u
\n
"
,
eax
);
return
(
eax
*
1000
)
;
return
eax
*
1000
;
}
/**
...
...
@@ -196,7 +197,8 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
rdmsr
(
MSR_TMTA_LRTI_VOLT_MHZ
,
msr_lo
,
msr_hi
);
*
high_freq
=
msr_lo
*
1000
;
/* to kHz */
dprintk
(
"longrun table interface told %u - %u kHz
\n
"
,
*
low_freq
,
*
high_freq
);
dprintk
(
"longrun table interface told %u - %u kHz
\n
"
,
*
low_freq
,
*
high_freq
);
if
(
*
low_freq
>
*
high_freq
)
*
low_freq
=
*
high_freq
;
...
...
@@ -219,7 +221,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
cpuid
(
0x80860007
,
&
eax
,
&
ebx
,
&
ecx
,
&
edx
);
/* try decreasing in 10% steps, some processors react only
* on some barrier values */
for
(
try_hi
=
80
;
try_hi
>
0
&&
ecx
>
90
;
try_hi
-=
10
)
{
for
(
try_hi
=
80
;
try_hi
>
0
&&
ecx
>
90
;
try_hi
-=
10
)
{
/* set to 0 to try_hi perf_pctg */
msr_lo
&=
0xFFFFFF80
;
msr_hi
&=
0xFFFFFF80
;
...
...
@@ -236,7 +238,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
/* performance_pctg = (current_freq - low_freq)/(high_freq - low_freq)
* eqals
* low_freq * (
1 - perf_pctg) = (cur_freq - high_freq * perf_pctg)
* low_freq * (1 - perf_pctg) = (cur_freq - high_freq * perf_pctg)
*
* high_freq * perf_pctg is stored tempoarily into "ebx".
*/
...
...
@@ -317,9 +319,10 @@ static void __exit longrun_exit(void)
}
MODULE_AUTHOR
(
"Dominik Brodowski <linux@brodo.de>"
);
MODULE_DESCRIPTION
(
"LongRun driver for Transmeta Crusoe and Efficeon processors."
);
MODULE_LICENSE
(
"GPL"
);
MODULE_AUTHOR
(
"Dominik Brodowski <linux@brodo.de>"
);
MODULE_DESCRIPTION
(
"LongRun driver for Transmeta Crusoe and "
"Efficeon processors."
);
MODULE_LICENSE
(
"GPL"
);
module_init
(
longrun_init
);
module_exit
(
longrun_exit
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录