Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
27196c30
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
27196c30
编写于
8月 12, 2007
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Pull processor into release branch
上级
ad17b209
50109292
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
29 addition
and
34 deletion
+29
-34
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+15
-26
drivers/acpi/processor_idle.c
drivers/acpi/processor_idle.c
+10
-4
drivers/acpi/processor_perflib.c
drivers/acpi/processor_perflib.c
+3
-3
include/acpi/processor.h
include/acpi/processor.h
+1
-1
未找到文件。
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
浏览文件 @
27196c30
...
...
@@ -68,7 +68,8 @@ struct acpi_cpufreq_data {
};
static
struct
acpi_cpufreq_data
*
drv_data
[
NR_CPUS
];
static
struct
acpi_processor_performance
*
acpi_perf_data
[
NR_CPUS
];
/* acpi_perf_data is a pointer to percpu data. */
static
struct
acpi_processor_performance
*
acpi_perf_data
;
static
struct
cpufreq_driver
acpi_cpufreq_driver
;
...
...
@@ -508,24 +509,14 @@ acpi_cpufreq_guess_freq(struct acpi_cpufreq_data *data, unsigned int cpu)
* do _PDC and _PSD and find out the processor dependency for the
* actual init that will happen later...
*/
static
int
acpi_cpufreq_early_init
(
void
)
static
int
__init
acpi_cpufreq_early_init
(
void
)
{
struct
acpi_processor_performance
*
data
;
unsigned
int
i
,
j
;
dprintk
(
"acpi_cpufreq_early_init
\n
"
);
for_each_possible_cpu
(
i
)
{
data
=
kzalloc
(
sizeof
(
struct
acpi_processor_performance
),
GFP_KERNEL
);
if
(
!
data
)
{
for_each_possible_cpu
(
j
)
{
kfree
(
acpi_perf_data
[
j
]);
acpi_perf_data
[
j
]
=
NULL
;
}
return
-
ENOMEM
;
}
acpi_perf_data
[
i
]
=
data
;
acpi_perf_data
=
alloc_percpu
(
struct
acpi_processor_performance
);
if
(
!
acpi_perf_data
)
{
dprintk
(
"Memory allocation error for acpi_perf_data.
\n
"
);
return
-
ENOMEM
;
}
/* Do initialization in ACPI core */
...
...
@@ -574,14 +565,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
dprintk
(
"acpi_cpufreq_cpu_init
\n
"
);
if
(
!
acpi_perf_data
[
cpu
])
return
-
ENODEV
;
data
=
kzalloc
(
sizeof
(
struct
acpi_cpufreq_data
),
GFP_KERNEL
);
if
(
!
data
)
return
-
ENOMEM
;
data
->
acpi_data
=
acpi_perf_data
[
cpu
]
;
data
->
acpi_data
=
percpu_ptr
(
acpi_perf_data
,
cpu
)
;
drv_data
[
cpu
]
=
data
;
if
(
cpu_has
(
c
,
X86_FEATURE_CONSTANT_TSC
))
...
...
@@ -778,24 +766,25 @@ static struct cpufreq_driver acpi_cpufreq_driver = {
static
int
__init
acpi_cpufreq_init
(
void
)
{
int
ret
;
dprintk
(
"acpi_cpufreq_init
\n
"
);
acpi_cpufreq_early_init
();
ret
=
acpi_cpufreq_early_init
();
if
(
ret
)
return
ret
;
return
cpufreq_register_driver
(
&
acpi_cpufreq_driver
);
}
static
void
__exit
acpi_cpufreq_exit
(
void
)
{
unsigned
int
i
;
dprintk
(
"acpi_cpufreq_exit
\n
"
);
cpufreq_unregister_driver
(
&
acpi_cpufreq_driver
);
for_each_possible_cpu
(
i
)
{
kfree
(
acpi_perf_data
[
i
]);
acpi_perf_data
[
i
]
=
NULL
;
}
free_percpu
(
acpi_perf_data
);
return
;
}
...
...
drivers/acpi/processor_idle.c
浏览文件 @
27196c30
...
...
@@ -969,11 +969,17 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
}
if
(
pr
->
flags
.
bm_check
)
{
/* bus mastering control is necessary */
if
(
!
pr
->
flags
.
bm_control
)
{
/* In this case we enter C3 without bus mastering */
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"C3 support without bus mastering control
\n
"
));
if
(
pr
->
flags
.
has_cst
!=
1
)
{
/* bus mastering control is necessary */
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"C3 support requires BM control
\n
"
));
return
;
}
else
{
/* Here we enter C3 without bus mastering */
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"C3 support without BM control
\n
"
));
}
}
}
else
{
/*
...
...
drivers/acpi/processor_perflib.c
浏览文件 @
27196c30
...
...
@@ -539,7 +539,7 @@ static int acpi_processor_get_psd(struct acpi_processor *pr)
}
int
acpi_processor_preregister_performance
(
struct
acpi_processor_performance
*
*
performance
)
struct
acpi_processor_performance
*
performance
)
{
int
count
,
count_target
;
int
retval
=
0
;
...
...
@@ -567,12 +567,12 @@ int acpi_processor_preregister_performance(
continue
;
}
if
(
!
performance
||
!
per
formance
[
i
]
)
{
if
(
!
performance
||
!
per
cpu_ptr
(
performance
,
i
)
)
{
retval
=
-
EINVAL
;
continue
;
}
pr
->
performance
=
per
formance
[
i
]
;
pr
->
performance
=
per
cpu_ptr
(
performance
,
i
)
;
cpu_set
(
i
,
pr
->
performance
->
shared_cpu_map
);
if
(
acpi_processor_get_psd
(
pr
))
{
retval
=
-
EINVAL
;
...
...
include/acpi/processor.h
浏览文件 @
27196c30
...
...
@@ -232,7 +232,7 @@ struct acpi_processor_errata {
extern
int
acpi_processor_preregister_performance
(
struct
acpi_processor_performance
*
*
performance
);
*
performance
);
extern
int
acpi_processor_register_performance
(
struct
acpi_processor_performance
*
performance
,
unsigned
int
cpu
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录