Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
ac0849fb
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看板
提交
ac0849fb
编写于
4月 24, 2009
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'bugzilla-13041' into release
上级
09041dae
96f15efc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
53 addition
and
17 deletion
+53
-17
drivers/acpi/acpica/hwsleep.c
drivers/acpi/acpica/hwsleep.c
+26
-17
drivers/acpi/sleep.c
drivers/acpi/sleep.c
+27
-0
未找到文件。
drivers/acpi/acpica/hwsleep.c
浏览文件 @
ac0849fb
...
...
@@ -211,6 +211,12 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
ACPI_EXPORT_SYMBOL
(
acpi_enter_sleep_state_prep
)
static
unsigned
int
gts
,
bfs
;
module_param
(
gts
,
uint
,
0644
);
module_param
(
bfs
,
uint
,
0644
);
MODULE_PARM_DESC
(
gts
,
"Enable evaluation of _GTS on suspend."
);
MODULE_PARM_DESC
(
bfs
,
"Enable evaluation of _BFS on resume"
.);
/*******************************************************************************
*
* FUNCTION: acpi_enter_sleep_state
...
...
@@ -278,16 +284,18 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
return_ACPI_STATUS
(
status
);
}
/* Execute the _GTS method */
if
(
gts
)
{
/* Execute the _GTS method */
arg_list
.
count
=
1
;
arg_list
.
pointer
=
&
arg
;
arg
.
type
=
ACPI_TYPE_INTEGER
;
arg
.
integer
.
value
=
sleep_state
;
arg_list
.
count
=
1
;
arg_list
.
pointer
=
&
arg
;
arg
.
type
=
ACPI_TYPE_INTEGER
;
arg
.
integer
.
value
=
sleep_state
;
status
=
acpi_evaluate_object
(
NULL
,
METHOD_NAME__GTS
,
&
arg_list
,
NULL
);
if
(
ACPI_FAILURE
(
status
)
&&
status
!=
AE_NOT_FOUND
)
{
return_ACPI_STATUS
(
status
);
status
=
acpi_evaluate_object
(
NULL
,
METHOD_NAME__GTS
,
&
arg_list
,
NULL
);
if
(
ACPI_FAILURE
(
status
)
&&
status
!=
AE_NOT_FOUND
)
{
return_ACPI_STATUS
(
status
);
}
}
/* Get current value of PM1A control */
...
...
@@ -513,18 +521,19 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state)
}
}
/* Execute the _BFS method */
if
(
bfs
)
{
/* Execute the _BFS method */
arg_list
.
count
=
1
;
arg_list
.
pointer
=
&
arg
;
arg
.
type
=
ACPI_TYPE_INTEGER
;
arg
.
integer
.
value
=
sleep_state
;
arg_list
.
count
=
1
;
arg_list
.
pointer
=
&
arg
;
arg
.
type
=
ACPI_TYPE_INTEGER
;
arg
.
integer
.
value
=
sleep_state
;
status
=
acpi_evaluate_object
(
NULL
,
METHOD_NAME__BFS
,
&
arg_list
,
NULL
);
if
(
ACPI_FAILURE
(
status
)
&&
status
!=
AE_NOT_FOUND
)
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"During Method _BFS"
));
status
=
acpi_evaluate_object
(
NULL
,
METHOD_NAME__BFS
,
&
arg_list
,
NULL
);
if
(
ACPI_FAILURE
(
status
)
&&
status
!=
AE_NOT_FOUND
)
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"During Method _BFS"
));
}
}
return_ACPI_STATUS
(
status
);
}
...
...
drivers/acpi/sleep.c
浏览文件 @
ac0849fb
...
...
@@ -713,6 +713,32 @@ static void acpi_power_off(void)
acpi_enter_sleep_state
(
ACPI_STATE_S5
);
}
/*
* ACPI 2.0 created the optional _GTS and _BFS,
* but industry adoption has been neither rapid nor broad.
*
* Linux gets into trouble when it executes poorly validated
* paths through the BIOS, so disable _GTS and _BFS by default,
* but do speak up and offer the option to enable them.
*/
void
__init
acpi_gts_bfs_check
(
void
)
{
acpi_handle
dummy
;
if
(
ACPI_SUCCESS
(
acpi_get_handle
(
ACPI_ROOT_OBJECT
,
METHOD_NAME__GTS
,
&
dummy
)))
{
printk
(
KERN_NOTICE
PREFIX
"BIOS offers _GTS
\n
"
);
printk
(
KERN_NOTICE
PREFIX
"If
\"
acpi.gts=1
\"
improves suspend, "
"please notify linux-acpi@vger.kernel.org
\n
"
);
}
if
(
ACPI_SUCCESS
(
acpi_get_handle
(
ACPI_ROOT_OBJECT
,
METHOD_NAME__BFS
,
&
dummy
)))
{
printk
(
KERN_NOTICE
PREFIX
"BIOS offers _BFS
\n
"
);
printk
(
KERN_NOTICE
PREFIX
"If
\"
acpi.bfs=1
\"
improves resume, "
"please notify linux-acpi@vger.kernel.org
\n
"
);
}
}
int
__init
acpi_sleep_init
(
void
)
{
acpi_status
status
;
...
...
@@ -771,5 +797,6 @@ int __init acpi_sleep_init(void)
* object can also be evaluated when the system enters S5.
*/
register_reboot_notifier
(
&
tts_notifier
);
acpi_gts_bfs_check
();
return
0
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录