Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
cddece4b
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看板
提交
cddece4b
编写于
3月 20, 2007
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Pull c2 into release branch
上级
b25e8442
25496cae
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
9 deletion
+29
-9
drivers/acpi/processor_idle.c
drivers/acpi/processor_idle.c
+29
-9
未找到文件。
drivers/acpi/processor_idle.c
浏览文件 @
cddece4b
...
@@ -89,6 +89,12 @@ module_param(nocst, uint, 0000);
...
@@ -89,6 +89,12 @@ module_param(nocst, uint, 0000);
static
unsigned
int
bm_history
__read_mostly
=
static
unsigned
int
bm_history
__read_mostly
=
(
HZ
>=
800
?
0xFFFFFFFF
:
((
1U
<<
(
HZ
/
25
))
-
1
));
(
HZ
>=
800
?
0xFFFFFFFF
:
((
1U
<<
(
HZ
/
25
))
-
1
));
module_param
(
bm_history
,
uint
,
0644
);
module_param
(
bm_history
,
uint
,
0644
);
static
unsigned
use_ipi
=
2
;
module_param
(
use_ipi
,
uint
,
0644
);
MODULE_PARM_DESC
(
use_ipi
,
"IPI (vs. LAPIC) irqs for not waking up from C2/C3"
" machines. 0=apic, 1=ipi, 2=auto
\n
"
);
/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
Power Management
Power Management
-------------------------------------------------------------------------- */
-------------------------------------------------------------------------- */
...
@@ -260,9 +266,8 @@ static void acpi_cstate_enter(struct acpi_processor_cx *cstate)
...
@@ -260,9 +266,8 @@ static void acpi_cstate_enter(struct acpi_processor_cx *cstate)
/*
/*
* Some BIOS implementations switch to C3 in the published C2 state.
* Some BIOS implementations switch to C3 in the published C2 state.
* This seems to be a common problem on AMD boxen, but other vendors
* This seems to be a common problem on AMD boxen and Intel Dothan/Banias
* are affected too. We pick the most conservative approach: we assume
* Pentium M machines.
* that the local APIC stops in both C2 and C3.
*/
*/
static
void
acpi_timer_check_state
(
int
state
,
struct
acpi_processor
*
pr
,
static
void
acpi_timer_check_state
(
int
state
,
struct
acpi_processor
*
pr
,
struct
acpi_processor_cx
*
cx
)
struct
acpi_processor_cx
*
cx
)
...
@@ -276,8 +281,17 @@ static void acpi_timer_check_state(int state, struct acpi_processor *pr,
...
@@ -276,8 +281,17 @@ static void acpi_timer_check_state(int state, struct acpi_processor *pr,
if
(
pwr
->
timer_broadcast_on_state
<
state
)
if
(
pwr
->
timer_broadcast_on_state
<
state
)
return
;
return
;
if
(
cx
->
type
>=
ACPI_STATE_C2
)
if
(
cx
->
type
>=
ACPI_STATE_C2
)
{
pr
->
power
.
timer_broadcast_on_state
=
state
;
if
(
boot_cpu_data
.
x86_vendor
==
X86_VENDOR_AMD
)
pr
->
power
.
timer_broadcast_on_state
=
state
;
else
if
((
boot_cpu_data
.
x86_vendor
==
X86_VENDOR_INTEL
&&
boot_cpu_data
.
x86
==
6
)
&&
(
boot_cpu_data
.
x86_model
==
13
||
boot_cpu_data
.
x86_model
==
9
))
{
pr
->
power
.
timer_broadcast_on_state
=
state
;
}
}
}
}
static
void
acpi_propagate_timer_broadcast
(
struct
acpi_processor
*
pr
)
static
void
acpi_propagate_timer_broadcast
(
struct
acpi_processor
*
pr
)
...
@@ -292,10 +306,16 @@ static void acpi_propagate_timer_broadcast(struct acpi_processor *pr)
...
@@ -292,10 +306,16 @@ static void acpi_propagate_timer_broadcast(struct acpi_processor *pr)
#else
#else
cpumask_t
mask
=
cpumask_of_cpu
(
pr
->
id
);
cpumask_t
mask
=
cpumask_of_cpu
(
pr
->
id
);
if
(
pr
->
power
.
timer_broadcast_on_state
<
INT_MAX
)
if
(
use_ipi
==
0
)
on_each_cpu
(
switch_APIC_timer_to_ipi
,
&
mask
,
1
,
1
);
on_each_cpu
(
switch_APIC_timer_to_ipi
,
&
mask
,
1
,
1
);
else
else
if
(
use_ipi
==
1
)
on_each_cpu
(
switch_ipi_to_APIC_timer
,
&
mask
,
1
,
1
);
on_each_cpu
(
switch_ipi_to_APIC_timer
,
&
mask
,
1
,
1
);
else
{
if
(
pr
->
power
.
timer_broadcast_on_state
<
INT_MAX
)
on_each_cpu
(
switch_APIC_timer_to_ipi
,
&
mask
,
1
,
1
);
else
on_each_cpu
(
switch_ipi_to_APIC_timer
,
&
mask
,
1
,
1
);
}
#endif
#endif
}
}
...
@@ -1013,13 +1033,13 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
...
@@ -1013,13 +1033,13 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
case
ACPI_STATE_C2
:
case
ACPI_STATE_C2
:
acpi_processor_power_verify_c2
(
cx
);
acpi_processor_power_verify_c2
(
cx
);
if
(
cx
->
valid
)
if
(
cx
->
valid
&&
use_ipi
!=
0
&&
use_ipi
!=
1
)
acpi_timer_check_state
(
i
,
pr
,
cx
);
acpi_timer_check_state
(
i
,
pr
,
cx
);
break
;
break
;
case
ACPI_STATE_C3
:
case
ACPI_STATE_C3
:
acpi_processor_power_verify_c3
(
pr
,
cx
);
acpi_processor_power_verify_c3
(
pr
,
cx
);
if
(
cx
->
valid
)
if
(
cx
->
valid
&&
use_ipi
!=
0
&&
use_ipi
!=
1
)
acpi_timer_check_state
(
i
,
pr
,
cx
);
acpi_timer_check_state
(
i
,
pr
,
cx
);
break
;
break
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录