Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
b3899c66
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
b3899c66
编写于
6月 15, 2006
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Pull acpica into release branch
上级
553698f9
4c90ece2
变更
143
展开全部
隐藏空白更改
内联
并排
Showing
143 changed file
with
5182 addition
and
4508 deletion
+5182
-4508
arch/i386/kernel/acpi/boot.c
arch/i386/kernel/acpi/boot.c
+2
-2
arch/ia64/hp/common/sba_iommu.c
arch/ia64/hp/common/sba_iommu.c
+1
-1
drivers/acpi/asus_acpi.c
drivers/acpi/asus_acpi.c
+1
-1
drivers/acpi/bus.c
drivers/acpi/bus.c
+4
-4
drivers/acpi/dispatcher/dsfield.c
drivers/acpi/dispatcher/dsfield.c
+7
-6
drivers/acpi/dispatcher/dsinit.c
drivers/acpi/dispatcher/dsinit.c
+3
-3
drivers/acpi/dispatcher/dsmethod.c
drivers/acpi/dispatcher/dsmethod.c
+142
-90
drivers/acpi/dispatcher/dsmthdat.c
drivers/acpi/dispatcher/dsmthdat.c
+22
-21
drivers/acpi/dispatcher/dsobject.c
drivers/acpi/dispatcher/dsobject.c
+16
-9
drivers/acpi/dispatcher/dsopcode.c
drivers/acpi/dispatcher/dsopcode.c
+44
-19
drivers/acpi/dispatcher/dsutils.c
drivers/acpi/dispatcher/dsutils.c
+15
-10
drivers/acpi/dispatcher/dswexec.c
drivers/acpi/dispatcher/dswexec.c
+14
-12
drivers/acpi/dispatcher/dswload.c
drivers/acpi/dispatcher/dswload.c
+53
-14
drivers/acpi/dispatcher/dswscope.c
drivers/acpi/dispatcher/dswscope.c
+6
-4
drivers/acpi/dispatcher/dswstate.c
drivers/acpi/dispatcher/dswstate.c
+39
-33
drivers/acpi/ec.c
drivers/acpi/ec.c
+2
-3
drivers/acpi/events/evevent.c
drivers/acpi/events/evevent.c
+6
-4
drivers/acpi/events/evgpe.c
drivers/acpi/events/evgpe.c
+56
-29
drivers/acpi/events/evgpeblk.c
drivers/acpi/events/evgpeblk.c
+55
-41
drivers/acpi/events/evmisc.c
drivers/acpi/events/evmisc.c
+25
-16
drivers/acpi/events/evregion.c
drivers/acpi/events/evregion.c
+68
-47
drivers/acpi/events/evrgnini.c
drivers/acpi/events/evrgnini.c
+33
-15
drivers/acpi/events/evsci.c
drivers/acpi/events/evsci.c
+4
-4
drivers/acpi/events/evxface.c
drivers/acpi/events/evxface.c
+22
-27
drivers/acpi/events/evxfevnt.c
drivers/acpi/events/evxfevnt.c
+33
-34
drivers/acpi/events/evxfregn.c
drivers/acpi/events/evxfregn.c
+7
-8
drivers/acpi/executer/exconfig.c
drivers/acpi/executer/exconfig.c
+30
-24
drivers/acpi/executer/exconvrt.c
drivers/acpi/executer/exconvrt.c
+7
-5
drivers/acpi/executer/excreate.c
drivers/acpi/executer/excreate.c
+13
-12
drivers/acpi/executer/exdump.c
drivers/acpi/executer/exdump.c
+20
-16
drivers/acpi/executer/exfield.c
drivers/acpi/executer/exfield.c
+10
-8
drivers/acpi/executer/exfldio.c
drivers/acpi/executer/exfldio.c
+44
-23
drivers/acpi/executer/exmisc.c
drivers/acpi/executer/exmisc.c
+20
-5
drivers/acpi/executer/exmutex.c
drivers/acpi/executer/exmutex.c
+9
-6
drivers/acpi/executer/exnames.c
drivers/acpi/executer/exnames.c
+17
-11
drivers/acpi/executer/exoparg1.c
drivers/acpi/executer/exoparg1.c
+68
-33
drivers/acpi/executer/exoparg2.c
drivers/acpi/executer/exoparg2.c
+55
-34
drivers/acpi/executer/exoparg3.c
drivers/acpi/executer/exoparg3.c
+9
-8
drivers/acpi/executer/exoparg6.c
drivers/acpi/executer/exoparg6.c
+2
-1
drivers/acpi/executer/exprep.c
drivers/acpi/executer/exprep.c
+29
-16
drivers/acpi/executer/exregion.c
drivers/acpi/executer/exregion.c
+17
-23
drivers/acpi/executer/exresnte.c
drivers/acpi/executer/exresnte.c
+11
-6
drivers/acpi/executer/exresolv.c
drivers/acpi/executer/exresolv.c
+33
-44
drivers/acpi/executer/exresop.c
drivers/acpi/executer/exresop.c
+8
-4
drivers/acpi/executer/exstore.c
drivers/acpi/executer/exstore.c
+8
-7
drivers/acpi/executer/exstoren.c
drivers/acpi/executer/exstoren.c
+5
-2
drivers/acpi/executer/exstorob.c
drivers/acpi/executer/exstorob.c
+10
-7
drivers/acpi/executer/exsystem.c
drivers/acpi/executer/exsystem.c
+7
-5
drivers/acpi/executer/exutils.c
drivers/acpi/executer/exutils.c
+10
-7
drivers/acpi/hardware/hwacpi.c
drivers/acpi/hardware/hwacpi.c
+3
-3
drivers/acpi/hardware/hwgpe.c
drivers/acpi/hardware/hwgpe.c
+5
-3
drivers/acpi/hardware/hwregs.c
drivers/acpi/hardware/hwregs.c
+64
-82
drivers/acpi/hardware/hwsleep.c
drivers/acpi/hardware/hwsleep.c
+17
-14
drivers/acpi/hardware/hwtimer.c
drivers/acpi/hardware/hwtimer.c
+10
-10
drivers/acpi/namespace/nsaccess.c
drivers/acpi/namespace/nsaccess.c
+27
-19
drivers/acpi/namespace/nsalloc.c
drivers/acpi/namespace/nsalloc.c
+23
-95
drivers/acpi/namespace/nsdump.c
drivers/acpi/namespace/nsdump.c
+11
-4
drivers/acpi/namespace/nsdumpdv.c
drivers/acpi/namespace/nsdumpdv.c
+3
-3
drivers/acpi/namespace/nseval.c
drivers/acpi/namespace/nseval.c
+117
-367
drivers/acpi/namespace/nsinit.c
drivers/acpi/namespace/nsinit.c
+215
-83
drivers/acpi/namespace/nsload.c
drivers/acpi/namespace/nsload.c
+15
-12
drivers/acpi/namespace/nsnames.c
drivers/acpi/namespace/nsnames.c
+4
-10
drivers/acpi/namespace/nsobject.c
drivers/acpi/namespace/nsobject.c
+9
-6
drivers/acpi/namespace/nsparse.c
drivers/acpi/namespace/nsparse.c
+3
-3
drivers/acpi/namespace/nssearch.c
drivers/acpi/namespace/nssearch.c
+88
-60
drivers/acpi/namespace/nsutils.c
drivers/acpi/namespace/nsutils.c
+55
-49
drivers/acpi/namespace/nswalk.c
drivers/acpi/namespace/nswalk.c
+5
-1
drivers/acpi/namespace/nsxfeval.c
drivers/acpi/namespace/nsxfeval.c
+103
-100
drivers/acpi/namespace/nsxfname.c
drivers/acpi/namespace/nsxfname.c
+9
-13
drivers/acpi/namespace/nsxfobj.c
drivers/acpi/namespace/nsxfobj.c
+4
-7
drivers/acpi/osl.c
drivers/acpi/osl.c
+112
-47
drivers/acpi/parser/psargs.c
drivers/acpi/parser/psargs.c
+16
-9
drivers/acpi/parser/psloop.c
drivers/acpi/parser/psloop.c
+22
-3
drivers/acpi/parser/psopcode.c
drivers/acpi/parser/psopcode.c
+4
-2
drivers/acpi/parser/psparse.c
drivers/acpi/parser/psparse.c
+16
-19
drivers/acpi/parser/psscope.c
drivers/acpi/parser/psscope.c
+9
-8
drivers/acpi/parser/pstree.c
drivers/acpi/parser/pstree.c
+7
-1
drivers/acpi/parser/psutils.c
drivers/acpi/parser/psutils.c
+3
-2
drivers/acpi/parser/pswalk.c
drivers/acpi/parser/pswalk.c
+4
-1
drivers/acpi/parser/psxface.c
drivers/acpi/parser/psxface.c
+24
-22
drivers/acpi/resources/rscalc.c
drivers/acpi/resources/rscalc.c
+53
-55
drivers/acpi/resources/rscreate.c
drivers/acpi/resources/rscreate.c
+18
-15
drivers/acpi/resources/rsdump.c
drivers/acpi/resources/rsdump.c
+21
-21
drivers/acpi/resources/rsinfo.c
drivers/acpi/resources/rsinfo.c
+1
-0
drivers/acpi/resources/rslist.c
drivers/acpi/resources/rslist.c
+45
-57
drivers/acpi/resources/rsmisc.c
drivers/acpi/resources/rsmisc.c
+8
-4
drivers/acpi/resources/rsutils.c
drivers/acpi/resources/rsutils.c
+87
-68
drivers/acpi/resources/rsxface.c
drivers/acpi/resources/rsxface.c
+221
-174
drivers/acpi/system.c
drivers/acpi/system.c
+3
-3
drivers/acpi/tables.c
drivers/acpi/tables.c
+2
-2
drivers/acpi/tables/tbconvrt.c
drivers/acpi/tables/tbconvrt.c
+23
-23
drivers/acpi/tables/tbget.c
drivers/acpi/tables/tbget.c
+25
-40
drivers/acpi/tables/tbgetall.c
drivers/acpi/tables/tbgetall.c
+6
-5
drivers/acpi/tables/tbinstal.c
drivers/acpi/tables/tbinstal.c
+24
-26
drivers/acpi/tables/tbrsdt.c
drivers/acpi/tables/tbrsdt.c
+24
-22
drivers/acpi/tables/tbutils.c
drivers/acpi/tables/tbutils.c
+95
-54
drivers/acpi/tables/tbxface.c
drivers/acpi/tables/tbxface.c
+23
-19
drivers/acpi/tables/tbxfroot.c
drivers/acpi/tables/tbxfroot.c
+45
-37
drivers/acpi/thermal.c
drivers/acpi/thermal.c
+1
-2
drivers/acpi/utilities/utalloc.c
drivers/acpi/utilities/utalloc.c
+62
-572
drivers/acpi/utilities/utcache.c
drivers/acpi/utilities/utcache.c
+10
-8
drivers/acpi/utilities/utcopy.c
drivers/acpi/utilities/utcopy.c
+20
-21
drivers/acpi/utilities/utdebug.c
drivers/acpi/utilities/utdebug.c
+41
-24
drivers/acpi/utilities/utdelete.c
drivers/acpi/utilities/utdelete.c
+35
-27
drivers/acpi/utilities/uteval.c
drivers/acpi/utilities/uteval.c
+101
-40
drivers/acpi/utilities/utglobal.c
drivers/acpi/utilities/utglobal.c
+17
-45
drivers/acpi/utilities/utinit.c
drivers/acpi/utilities/utinit.c
+10
-16
drivers/acpi/utilities/utmath.c
drivers/acpi/utilities/utmath.c
+4
-4
drivers/acpi/utilities/utmisc.c
drivers/acpi/utilities/utmisc.c
+173
-120
drivers/acpi/utilities/utmutex.c
drivers/acpi/utilities/utmutex.c
+26
-16
drivers/acpi/utilities/utobject.c
drivers/acpi/utilities/utobject.c
+13
-10
drivers/acpi/utilities/utresrc.c
drivers/acpi/utilities/utresrc.c
+159
-97
drivers/acpi/utilities/utstate.c
drivers/acpi/utilities/utstate.c
+21
-15
drivers/acpi/utilities/utxface.c
drivers/acpi/utilities/utxface.c
+24
-20
drivers/char/agp/hp-agp.c
drivers/char/agp/hp-agp.c
+1
-1
include/acpi/acconfig.h
include/acpi/acconfig.h
+5
-13
include/acpi/acdisasm.h
include/acpi/acdisasm.h
+165
-8
include/acpi/acdispat.h
include/acpi/acdispat.h
+4
-2
include/acpi/acevents.h
include/acpi/acevents.h
+2
-2
include/acpi/acexcep.h
include/acpi/acexcep.h
+4
-2
include/acpi/acglobal.h
include/acpi/acglobal.h
+13
-16
include/acpi/aclocal.h
include/acpi/aclocal.h
+152
-132
include/acpi/acmacros.h
include/acpi/acmacros.h
+47
-34
include/acpi/acnamesp.h
include/acpi/acnamesp.h
+14
-14
include/acpi/acobject.h
include/acpi/acobject.h
+98
-90
include/acpi/acopcode.h
include/acpi/acopcode.h
+1
-1
include/acpi/acoutput.h
include/acpi/acoutput.h
+5
-5
include/acpi/acparser.h
include/acpi/acparser.h
+2
-2
include/acpi/acpi_bus.h
include/acpi/acpi_bus.h
+1
-1
include/acpi/acpiosxf.h
include/acpi/acpiosxf.h
+18
-17
include/acpi/acpixf.h
include/acpi/acpixf.h
+2
-2
include/acpi/acresrc.h
include/acpi/acresrc.h
+12
-8
include/acpi/acstruct.h
include/acpi/acstruct.h
+71
-50
include/acpi/actables.h
include/acpi/actables.h
+5
-1
include/acpi/actbl.h
include/acpi/actbl.h
+227
-173
include/acpi/actbl1.h
include/acpi/actbl1.h
+573
-66
include/acpi/actbl2.h
include/acpi/actbl2.h
+1
-229
include/acpi/actypes.h
include/acpi/actypes.h
+44
-44
include/acpi/acutils.h
include/acpi/acutils.h
+59
-36
include/acpi/amlcode.h
include/acpi/amlcode.h
+4
-2
include/acpi/amlresrc.h
include/acpi/amlresrc.h
+46
-39
include/acpi/platform/acenv.h
include/acpi/platform/acenv.h
+25
-22
include/acpi/platform/aclinux.h
include/acpi/platform/aclinux.h
+11
-12
未找到文件。
arch/i386/kernel/acpi/boot.c
浏览文件 @
b3899c66
...
@@ -621,9 +621,9 @@ extern u32 pmtmr_ioport;
...
@@ -621,9 +621,9 @@ extern u32 pmtmr_ioport;
static
int
__init
acpi_parse_fadt
(
unsigned
long
phys
,
unsigned
long
size
)
static
int
__init
acpi_parse_fadt
(
unsigned
long
phys
,
unsigned
long
size
)
{
{
struct
fadt_descriptor
_rev2
*
fadt
=
NULL
;
struct
fadt_descriptor
*
fadt
=
NULL
;
fadt
=
(
struct
fadt_descriptor
_rev2
*
)
__acpi_map_table
(
phys
,
size
);
fadt
=
(
struct
fadt_descriptor
*
)
__acpi_map_table
(
phys
,
size
);
if
(
!
fadt
)
{
if
(
!
fadt
)
{
printk
(
KERN_WARNING
PREFIX
"Unable to map FADT
\n
"
);
printk
(
KERN_WARNING
PREFIX
"Unable to map FADT
\n
"
);
return
0
;
return
0
;
...
...
arch/ia64/hp/common/sba_iommu.c
浏览文件 @
b3899c66
...
@@ -1999,7 +1999,7 @@ acpi_sba_ioc_add(struct acpi_device *device)
...
@@ -1999,7 +1999,7 @@ acpi_sba_ioc_add(struct acpi_device *device)
if
(
!
iovp_shift
)
if
(
!
iovp_shift
)
iovp_shift
=
min
(
PAGE_SHIFT
,
16
);
iovp_shift
=
min
(
PAGE_SHIFT
,
16
);
}
}
ACPI_MEM_FREE
(
dev_info
);
kfree
(
dev_info
);
/*
/*
* default anything not caught above or specified on cmdline to 4k
* default anything not caught above or specified on cmdline to 4k
...
...
drivers/acpi/asus_acpi.c
浏览文件 @
b3899c66
...
@@ -970,7 +970,7 @@ static int __init asus_hotk_get_info(void)
...
@@ -970,7 +970,7 @@ static int __init asus_hotk_get_info(void)
* HID), this bit will be moved. A global variable asus_info contains
* HID), this bit will be moved. A global variable asus_info contains
* the DSDT header.
* the DSDT header.
*/
*/
status
=
acpi_get_table
(
ACPI_TABLE_DSDT
,
1
,
&
dsdt
);
status
=
acpi_get_table
(
ACPI_TABLE_
ID_
DSDT
,
1
,
&
dsdt
);
if
(
ACPI_FAILURE
(
status
))
if
(
ACPI_FAILURE
(
status
))
printk
(
KERN_WARNING
" Couldn't get the DSDT table header
\n
"
);
printk
(
KERN_WARNING
" Couldn't get the DSDT table header
\n
"
);
else
else
...
...
drivers/acpi/bus.c
浏览文件 @
b3899c66
...
@@ -43,7 +43,7 @@ ACPI_MODULE_NAME("acpi_bus")
...
@@ -43,7 +43,7 @@ ACPI_MODULE_NAME("acpi_bus")
extern
void
__init
acpi_pic_sci_set_trigger
(
unsigned
int
irq
,
u16
trigger
);
extern
void
__init
acpi_pic_sci_set_trigger
(
unsigned
int
irq
,
u16
trigger
);
#endif
#endif
FADT_DESCRIPTOR
acpi_fadt
;
struct
fadt_descriptor
acpi_fadt
;
EXPORT_SYMBOL
(
acpi_fadt
);
EXPORT_SYMBOL
(
acpi_fadt
);
struct
acpi_device
*
acpi_root
;
struct
acpi_device
*
acpi_root
;
...
@@ -596,6 +596,8 @@ void __init acpi_early_init(void)
...
@@ -596,6 +596,8 @@ void __init acpi_early_init(void)
if
(
acpi_disabled
)
if
(
acpi_disabled
)
return_VOID
;
return_VOID
;
printk
(
KERN_INFO
PREFIX
"Core revision %08x
\n
"
,
ACPI_CA_VERSION
);
/* enable workarounds, unless strict ACPI spec. compliance */
/* enable workarounds, unless strict ACPI spec. compliance */
if
(
!
acpi_strict
)
if
(
!
acpi_strict
)
acpi_gbl_enable_interpreter_slack
=
TRUE
;
acpi_gbl_enable_interpreter_slack
=
TRUE
;
...
@@ -617,7 +619,7 @@ void __init acpi_early_init(void)
...
@@ -617,7 +619,7 @@ void __init acpi_early_init(void)
/*
/*
* Get a separate copy of the FADT for use by other drivers.
* Get a separate copy of the FADT for use by other drivers.
*/
*/
status
=
acpi_get_table
(
ACPI_TABLE_FADT
,
1
,
&
buffer
);
status
=
acpi_get_table
(
ACPI_TABLE_
ID_
FADT
,
1
,
&
buffer
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
printk
(
KERN_ERR
PREFIX
"Unable to get the FADT
\n
"
);
printk
(
KERN_ERR
PREFIX
"Unable to get the FADT
\n
"
);
goto
error0
;
goto
error0
;
...
@@ -743,8 +745,6 @@ static int __init acpi_init(void)
...
@@ -743,8 +745,6 @@ static int __init acpi_init(void)
ACPI_FUNCTION_TRACE
(
"acpi_init"
);
ACPI_FUNCTION_TRACE
(
"acpi_init"
);
printk
(
KERN_INFO
PREFIX
"Subsystem revision %08x
\n
"
,
ACPI_CA_VERSION
);
if
(
acpi_disabled
)
{
if
(
acpi_disabled
)
{
printk
(
KERN_INFO
PREFIX
"Interpreter disabled.
\n
"
);
printk
(
KERN_INFO
PREFIX
"Interpreter disabled.
\n
"
);
return_VALUE
(
-
ENODEV
);
return_VALUE
(
-
ENODEV
);
...
...
drivers/acpi/dispatcher/dsfield.c
浏览文件 @
b3899c66
...
@@ -87,7 +87,7 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,
...
@@ -87,7 +87,7 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,
union
acpi_operand_object
*
second_desc
=
NULL
;
union
acpi_operand_object
*
second_desc
=
NULL
;
u32
flags
;
u32
flags
;
ACPI_FUNCTION_TRACE
(
"ds_create_buffer_field"
);
ACPI_FUNCTION_TRACE
(
ds_create_buffer_field
);
/* Get the name_string argument */
/* Get the name_string argument */
...
@@ -210,7 +210,7 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
...
@@ -210,7 +210,7 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
acpi_status
status
;
acpi_status
status
;
acpi_integer
position
;
acpi_integer
position
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_get_field_names"
,
info
);
ACPI_FUNCTION_TRACE_PTR
(
ds_get_field_names
,
info
);
/* First field starts at bit zero */
/* First field starts at bit zero */
...
@@ -342,7 +342,7 @@ acpi_ds_create_field(union acpi_parse_object *op,
...
@@ -342,7 +342,7 @@ acpi_ds_create_field(union acpi_parse_object *op,
union
acpi_parse_object
*
arg
;
union
acpi_parse_object
*
arg
;
struct
acpi_create_field_info
info
;
struct
acpi_create_field_info
info
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_create_field"
,
op
);
ACPI_FUNCTION_TRACE_PTR
(
ds_create_field
,
op
);
/* First arg is the name of the parent op_region (must already exist) */
/* First arg is the name of the parent op_region (must already exist) */
...
@@ -399,7 +399,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
...
@@ -399,7 +399,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
u8
type
=
0
;
u8
type
=
0
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_init_field_objects"
,
op
);
ACPI_FUNCTION_TRACE_PTR
(
ds_init_field_objects
,
op
);
switch
(
walk_state
->
opcode
)
{
switch
(
walk_state
->
opcode
)
{
case
AML_FIELD_OP
:
case
AML_FIELD_OP
:
...
@@ -425,6 +425,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
...
@@ -425,6 +425,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
* Walk the list of entries in the field_list
* Walk the list of entries in the field_list
*/
*/
while
(
arg
)
{
while
(
arg
)
{
/* Ignore OFFSET and ACCESSAS terms here */
/* Ignore OFFSET and ACCESSAS terms here */
if
(
arg
->
common
.
aml_opcode
==
AML_INT_NAMEDFIELD_OP
)
{
if
(
arg
->
common
.
aml_opcode
==
AML_INT_NAMEDFIELD_OP
)
{
...
@@ -481,7 +482,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op,
...
@@ -481,7 +482,7 @@ acpi_ds_create_bank_field(union acpi_parse_object *op,
union
acpi_parse_object
*
arg
;
union
acpi_parse_object
*
arg
;
struct
acpi_create_field_info
info
;
struct
acpi_create_field_info
info
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_create_bank_field"
,
op
);
ACPI_FUNCTION_TRACE_PTR
(
ds_create_bank_field
,
op
);
/* First arg is the name of the parent op_region (must already exist) */
/* First arg is the name of the parent op_region (must already exist) */
...
@@ -554,7 +555,7 @@ acpi_ds_create_index_field(union acpi_parse_object *op,
...
@@ -554,7 +555,7 @@ acpi_ds_create_index_field(union acpi_parse_object *op,
union
acpi_parse_object
*
arg
;
union
acpi_parse_object
*
arg
;
struct
acpi_create_field_info
info
;
struct
acpi_create_field_info
info
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_create_index_field"
,
op
);
ACPI_FUNCTION_TRACE_PTR
(
ds_create_index_field
,
op
);
/* First arg is the name of the Index register (must already exist) */
/* First arg is the name of the Index register (must already exist) */
...
...
drivers/acpi/dispatcher/dsinit.c
浏览文件 @
b3899c66
...
@@ -184,7 +184,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
...
@@ -184,7 +184,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
*
*
* RETURN: Status
* RETURN: Status
*
*
* DESCRIPTION: Walk the namespace starting at "
start_n
ode" and perform any
* DESCRIPTION: Walk the namespace starting at "
StartN
ode" and perform any
* necessary initialization on the objects found therein
* necessary initialization on the objects found therein
*
*
******************************************************************************/
******************************************************************************/
...
@@ -196,7 +196,7 @@ acpi_ds_initialize_objects(struct acpi_table_desc * table_desc,
...
@@ -196,7 +196,7 @@ acpi_ds_initialize_objects(struct acpi_table_desc * table_desc,
acpi_status
status
;
acpi_status
status
;
struct
acpi_init_walk_info
info
;
struct
acpi_init_walk_info
info
;
ACPI_FUNCTION_TRACE
(
"ds_initialize_objects"
);
ACPI_FUNCTION_TRACE
(
ds_initialize_objects
);
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"**** Starting initialization of namespace objects ****
\n
"
));
"**** Starting initialization of namespace objects ****
\n
"
));
...
@@ -213,7 +213,7 @@ acpi_ds_initialize_objects(struct acpi_table_desc * table_desc,
...
@@ -213,7 +213,7 @@ acpi_ds_initialize_objects(struct acpi_table_desc * table_desc,
status
=
acpi_walk_namespace
(
ACPI_TYPE_ANY
,
start_node
,
ACPI_UINT32_MAX
,
status
=
acpi_walk_namespace
(
ACPI_TYPE_ANY
,
start_node
,
ACPI_UINT32_MAX
,
acpi_ds_init_one_object
,
&
info
,
NULL
);
acpi_ds_init_one_object
,
&
info
,
NULL
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"During
walk_n
amespace"
));
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"During
WalkN
amespace"
));
}
}
ACPI_DEBUG_PRINT_RAW
((
ACPI_DB_INIT
,
ACPI_DEBUG_PRINT_RAW
((
ACPI_DB_INIT
,
...
...
drivers/acpi/dispatcher/dsmethod.c
浏览文件 @
b3899c66
...
@@ -81,6 +81,7 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
...
@@ -81,6 +81,7 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
/* Invoke the global exception handler */
/* Invoke the global exception handler */
if
(
acpi_gbl_exception_handler
)
{
if
(
acpi_gbl_exception_handler
)
{
/* Exit the interpreter, allow handler to execute methods */
/* Exit the interpreter, allow handler to execute methods */
acpi_ex_exit_interpreter
();
acpi_ex_exit_interpreter
();
...
@@ -100,6 +101,7 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
...
@@ -100,6 +101,7 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
}
}
#ifdef ACPI_DISASSEMBLER
#ifdef ACPI_DISASSEMBLER
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
/* Display method locals/args if disassembler is present */
/* Display method locals/args if disassembler is present */
acpi_dm_dump_method_info
(
status
,
walk_state
,
walk_state
->
op
);
acpi_dm_dump_method_info
(
status
,
walk_state
,
walk_state
->
op
);
...
@@ -132,7 +134,7 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node,
...
@@ -132,7 +134,7 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node,
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_begin_method_execution"
,
method_node
);
ACPI_FUNCTION_TRACE_PTR
(
ds_begin_method_execution
,
method_node
);
if
(
!
method_node
)
{
if
(
!
method_node
)
{
return_ACPI_STATUS
(
AE_NULL_ENTRY
);
return_ACPI_STATUS
(
AE_NULL_ENTRY
);
...
@@ -168,11 +170,14 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node,
...
@@ -168,11 +170,14 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node,
/*
/*
* Get a unit from the method semaphore. This releases the
* Get a unit from the method semaphore. This releases the
* interpreter if we block
* interpreter if we block
(then reacquires it)
*/
*/
status
=
status
=
acpi_ex_system_wait_semaphore
(
obj_desc
->
method
.
semaphore
,
acpi_ex_system_wait_semaphore
(
obj_desc
->
method
.
semaphore
,
ACPI_WAIT_FOREVER
);
ACPI_WAIT_FOREVER
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
}
}
/*
/*
...
@@ -183,7 +188,7 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node,
...
@@ -183,7 +188,7 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node,
if
(
!
obj_desc
->
method
.
owner_id
)
{
if
(
!
obj_desc
->
method
.
owner_id
)
{
status
=
acpi_ut_allocate_owner_id
(
&
obj_desc
->
method
.
owner_id
);
status
=
acpi_ut_allocate_owner_id
(
&
obj_desc
->
method
.
owner_id
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
)
;
goto
cleanup
;
}
}
}
}
...
@@ -193,6 +198,14 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node,
...
@@ -193,6 +198,14 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node,
*/
*/
obj_desc
->
method
.
thread_count
++
;
obj_desc
->
method
.
thread_count
++
;
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
cleanup:
/* On error, must signal the method semaphore if present */
if
(
obj_desc
->
method
.
semaphore
)
{
(
void
)
acpi_os_signal_semaphore
(
obj_desc
->
method
.
semaphore
,
1
);
}
return_ACPI_STATUS
(
status
);
}
}
/*******************************************************************************
/*******************************************************************************
...
@@ -218,10 +231,10 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
...
@@ -218,10 +231,10 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
struct
acpi_namespace_node
*
method_node
;
struct
acpi_namespace_node
*
method_node
;
struct
acpi_walk_state
*
next_walk_state
=
NULL
;
struct
acpi_walk_state
*
next_walk_state
=
NULL
;
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
struct
acpi_
parameter_info
info
;
struct
acpi_
evaluate_info
*
info
;
u32
i
;
u32
i
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_call_control_method"
,
this_walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ds_call_control_method
,
this_walk_state
);
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Execute method %p, currentstate=%p
\n
"
,
"Execute method %p, currentstate=%p
\n
"
,
...
@@ -240,25 +253,31 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
...
@@ -240,25 +253,31 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
return_ACPI_STATUS
(
AE_NULL_OBJECT
);
return_ACPI_STATUS
(
AE_NULL_OBJECT
);
}
}
/* Init for new method, wait on concurrency semaphore */
/* Init for new method,
possibly
wait on concurrency semaphore */
status
=
acpi_ds_begin_method_execution
(
method_node
,
obj_desc
,
status
=
acpi_ds_begin_method_execution
(
method_node
,
obj_desc
,
this_walk_state
->
method_node
);
this_walk_state
->
method_node
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
goto
cleanup
;
return_ACPI_STATUS
(
status
)
;
}
}
/*
* 1) Parse the method. All "normal" methods are parsed for each execution.
* Internal methods (_OSI, etc.) do not require parsing.
*/
if
(
!
(
obj_desc
->
method
.
method_flags
&
AML_METHOD_INTERNAL_ONLY
))
{
if
(
!
(
obj_desc
->
method
.
method_flags
&
AML_METHOD_INTERNAL_ONLY
))
{
/* 1) Parse: Create a new walk state for the preempting walk */
/* Create a new walk state for the parse */
next_walk_state
=
next_walk_state
=
acpi_ds_create_walk_state
(
obj_desc
->
method
.
owner_id
,
op
,
acpi_ds_create_walk_state
(
obj_desc
->
method
.
owner_id
,
op
,
obj_desc
,
NULL
);
obj_desc
,
NULL
);
if
(
!
next_walk_state
)
{
if
(
!
next_walk_state
)
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
status
=
AE_NO_MEMORY
;
goto
cleanup
;
}
}
/* Create and init a
Root Node
*/
/* Create and init a
parse tree root
*/
op
=
acpi_ps_create_scope_op
();
op
=
acpi_ps_create_scope_op
();
if
(
!
op
)
{
if
(
!
op
)
{
...
@@ -271,17 +290,20 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
...
@@ -271,17 +290,20 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
obj_desc
->
method
.
aml_length
,
obj_desc
->
method
.
aml_length
,
NULL
,
1
);
NULL
,
1
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
acpi_
ds_delete_walk_state
(
next_walk_state
);
acpi_
ps_delete_parse_tree
(
op
);
goto
cleanup
;
goto
cleanup
;
}
}
/* Begin AML parse */
/* Begin AML parse
(deletes next_walk_state)
*/
status
=
acpi_ps_parse_aml
(
next_walk_state
);
status
=
acpi_ps_parse_aml
(
next_walk_state
);
acpi_ps_delete_parse_tree
(
op
);
acpi_ps_delete_parse_tree
(
op
);
if
(
ACPI_FAILURE
(
status
))
{
goto
cleanup
;
}
}
}
/* 2)
Execute: Create a new state for the preempting walk
*/
/* 2)
Begin method execution. Create a new walk state
*/
next_walk_state
=
acpi_ds_create_walk_state
(
obj_desc
->
method
.
owner_id
,
next_walk_state
=
acpi_ds_create_walk_state
(
obj_desc
->
method
.
owner_id
,
NULL
,
obj_desc
,
thread
);
NULL
,
obj_desc
,
thread
);
...
@@ -289,6 +311,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
...
@@ -289,6 +311,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
status
=
AE_NO_MEMORY
;
status
=
AE_NO_MEMORY
;
goto
cleanup
;
goto
cleanup
;
}
}
/*
/*
* The resolved arguments were put on the previous walk state's operand
* The resolved arguments were put on the previous walk state's operand
* stack. Operands on the previous walk state stack always
* stack. Operands on the previous walk state stack always
...
@@ -296,12 +319,24 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
...
@@ -296,12 +319,24 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
*/
*/
this_walk_state
->
operands
[
this_walk_state
->
num_operands
]
=
NULL
;
this_walk_state
->
operands
[
this_walk_state
->
num_operands
]
=
NULL
;
info
.
parameters
=
&
this_walk_state
->
operands
[
0
];
/*
info
.
parameter_type
=
ACPI_PARAM_ARGS
;
* Allocate and initialize the evaluation information block
* TBD: this is somewhat inefficient, should change interface to
* ds_init_aml_walk. For now, keeps this struct off the CPU stack
*/
info
=
ACPI_ALLOCATE_ZEROED
(
sizeof
(
struct
acpi_evaluate_info
));
if
(
!
info
)
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
info
->
parameters
=
&
this_walk_state
->
operands
[
0
];
info
->
parameter_type
=
ACPI_PARAM_ARGS
;
status
=
acpi_ds_init_aml_walk
(
next_walk_state
,
NULL
,
method_node
,
status
=
acpi_ds_init_aml_walk
(
next_walk_state
,
NULL
,
method_node
,
obj_desc
->
method
.
aml_start
,
obj_desc
->
method
.
aml_start
,
obj_desc
->
method
.
aml_length
,
&
info
,
3
);
obj_desc
->
method
.
aml_length
,
info
,
3
);
ACPI_FREE
(
info
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
goto
cleanup
;
goto
cleanup
;
}
}
...
@@ -323,6 +358,8 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
...
@@ -323,6 +358,8 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
"Starting nested execution, newstate=%p
\n
"
,
"Starting nested execution, newstate=%p
\n
"
,
next_walk_state
));
next_walk_state
));
/* Invoke an internal method if necessary */
if
(
obj_desc
->
method
.
method_flags
&
AML_METHOD_INTERNAL_ONLY
)
{
if
(
obj_desc
->
method
.
method_flags
&
AML_METHOD_INTERNAL_ONLY
)
{
status
=
obj_desc
->
method
.
implementation
(
next_walk_state
);
status
=
obj_desc
->
method
.
implementation
(
next_walk_state
);
}
}
...
@@ -330,16 +367,14 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
...
@@ -330,16 +367,14 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
cleanup:
cleanup:
/* Decrement the thread count on the method parse tree */
if
(
next_walk_state
&&
(
next_walk_state
->
method_desc
))
{
/* On error, we must terminate the method properly */
next_walk_state
->
method_desc
->
method
.
thread_count
--
;
}
/* On error, we must delete the new walk state */
acpi_ds_terminate_control_method
(
obj_desc
,
next_walk_state
);
if
(
next_walk_state
)
{
acpi_ds_delete_walk_state
(
next_walk_state
);
}
acpi_ds_terminate_control_method
(
next_walk_state
);
acpi_ds_delete_walk_state
(
next_walk_state
);
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
@@ -362,25 +397,33 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
...
@@ -362,25 +397,33 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
union
acpi_operand_object
*
return_desc
)
union
acpi_operand_object
*
return_desc
)
{
{
acpi_status
status
;
acpi_status
status
;
int
same_as_implicit_return
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_restart_control_method"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ds_restart_control_method
,
walk_state
);
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"****Restart [%4.4s] Op %p
return_value_from_c
allee %p
\n
"
,
"****Restart [%4.4s] Op %p
ReturnValueFromC
allee %p
\n
"
,
(
char
*
)
&
walk_state
->
method_node
->
name
,
(
char
*
)
&
walk_state
->
method_node
->
name
,
walk_state
->
method_call_op
,
return_desc
));
walk_state
->
method_call_op
,
return_desc
));
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"
return_from_this_method_used?=%X res_s
tack %p Walk %p
\n
"
,
"
ReturnFromThisMethodUsed?=%X ResS
tack %p Walk %p
\n
"
,
walk_state
->
return_used
,
walk_state
->
return_used
,
walk_state
->
results
,
walk_state
));
walk_state
->
results
,
walk_state
));
/* Did the called method return a value? */
/* Did the called method return a value? */
if
(
return_desc
)
{
if
(
return_desc
)
{
/* Is the implicit return object the same as the return desc? */
same_as_implicit_return
=
(
walk_state
->
implicit_return_obj
==
return_desc
);
/* Are we actually going to use the return value? */
/* Are we actually going to use the return value? */
if
(
walk_state
->
return_used
)
{
if
(
walk_state
->
return_used
)
{
/* Save the return value from the previous method */
/* Save the return value from the previous method */
status
=
acpi_ds_result_push
(
return_desc
,
walk_state
);
status
=
acpi_ds_result_push
(
return_desc
,
walk_state
);
...
@@ -397,18 +440,23 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
...
@@ -397,18 +440,23 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
}
}
/*
/*
* The following code is the
* The following code is the optional support for the so-called
* optional support for a so-called "implicit return". Some AML code
* "implicit return". Some AML code assumes that the last value of the
* assumes that the last value of the method is "implicitly" returned
* method is "implicitly" returned to the caller, in the absence of an
* to the caller. Just save the last result as the return value.
* explicit return value.
*
* Just save the last result of the method as the return value.
*
* NOTE: this is optional because the ASL language does not actually
* NOTE: this is optional because the ASL language does not actually
* support this behavior.
* support this behavior.
*/
*/
else
if
(
!
acpi_ds_do_implicit_return
else
if
(
!
acpi_ds_do_implicit_return
(
return_desc
,
walk_state
,
FALSE
))
{
(
return_desc
,
walk_state
,
FALSE
)
||
same_as_implicit_return
)
{
/*
/*
* Delete the return value if it will not be used by the
* Delete the return value if it will not be used by the
* calling method
* calling method or remove one reference if the explicit return
* is the same as the implicit return value.
*/
*/
acpi_ut_remove_reference
(
return_desc
);
acpi_ut_remove_reference
(
return_desc
);
}
}
...
@@ -421,7 +469,8 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
...
@@ -421,7 +469,8 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
*
*
* FUNCTION: acpi_ds_terminate_control_method
* FUNCTION: acpi_ds_terminate_control_method
*
*
* PARAMETERS: walk_state - State of the method
* PARAMETERS: method_desc - Method object
* walk_state - State associated with the method
*
*
* RETURN: None
* RETURN: None
*
*
...
@@ -431,95 +480,100 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
...
@@ -431,95 +480,100 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
*
*
******************************************************************************/
******************************************************************************/
void
acpi_ds_terminate_control_method
(
struct
acpi_walk_state
*
walk_state
)
void
acpi_ds_terminate_control_method
(
union
acpi_operand_object
*
method_desc
,
struct
acpi_walk_state
*
walk_state
)
{
{
union
acpi_operand_object
*
obj_desc
;
struct
acpi_namespace_node
*
method_node
;
struct
acpi_namespace_node
*
method_node
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_terminate_control_method"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ds_terminate_control_method
,
walk_state
);
if
(
!
walk_state
)
{
/* method_desc is required, walk_state is optional */
return_VOID
;
}
/* The current method object was saved in the walk state */
if
(
!
method_desc
)
{
obj_desc
=
walk_state
->
method_desc
;
if
(
!
obj_desc
)
{
return_VOID
;
return_VOID
;
}
}
/* Delete all arguments and locals */
if
(
walk_state
)
{
acpi_ds_method_data_delete_all
(
walk_state
);
/* Delete all arguments and locals */
acpi_ds_method_data_delete_all
(
walk_state
);
}
/*
/*
* Lock the parser while we terminate this method.
* Lock the parser while we terminate this method.
* If this is the last thread executing the method,
* If this is the last thread executing the method,
* we have additional cleanup to perform
* we have additional cleanup to perform
*/
*/
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_
PARSER
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_
CONTROL_METHOD
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
return_VOID
;
return_VOID
;
}
}
/* Signal completion of the execution of this method if necessary */
/* Signal completion of the execution of this method if necessary */
if
(
walk_state
->
method_desc
->
method
.
semaphore
)
{
if
(
method_desc
->
method
.
semaphore
)
{
status
=
status
=
acpi_os_signal_semaphore
(
walk_state
->
method_desc
->
method
.
acpi_os_signal_semaphore
(
method_desc
->
method
.
semaphore
,
1
);
semaphore
,
1
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_ERROR
((
AE_INFO
,
"Could not signal method semaphore"
));
/* Ignore error and continue cleanup */
/* Ignore error and continue */
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"Could not signal method semaphore"
));
}
}
}
}
/*
if
(
walk_state
)
{
* There are no more threads executing this method. Perform
/*
* additional cleanup.
* Delete any objects created by this method during execution.
*
* The method Node is stored in the walk state
* The method Node is stored in the walk state
*/
*/
method_node
=
walk_state
->
method_node
;
method_node
=
walk_state
->
method_node
;
/* Lock namespace for possible update */
/* Lock namespace for possible update */
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_NAMESPACE
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_NAMESPACE
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
goto
exit
;
goto
exit
;
}
}
/*
/*
* Delete any namespace entries created immediately underneath
* Delete any namespace entries created immediately underneath
* the method
* the method
*/
*/
if
(
method_node
->
child
)
{
if
(
method_node
&&
method_node
->
child
)
{
acpi_ns_delete_namespace_subtree
(
method_node
);
acpi_ns_delete_namespace_subtree
(
method_node
);
}
/*
* Delete any namespace entries created anywhere else within
* the namespace by the execution of this method
*/
acpi_ns_delete_namespace_by_owner
(
method_desc
->
method
.
owner_id
);
status
=
acpi_ut_release_mutex
(
ACPI_MTX_NAMESPACE
);
}
}
/*
/*
Decrement the thread count on the method */
* Delete any namespace entries created anywhere else within
* the namespace by the execution of this method
if
(
method_desc
->
method
.
thread_count
)
{
*/
method_desc
->
method
.
thread_count
--
;
acpi_ns_delete_namespace_by_owner
(
walk_state
->
method_desc
->
method
.
}
else
{
owner_id
);
ACPI_ERROR
((
AE_INFO
,
"Invalid zero thread count in method"
)
);
status
=
acpi_ut_release_mutex
(
ACPI_MTX_NAMESPACE
);
}
/* Are there any other threads currently executing this method? */
/* Are there any other threads currently executing this method? */
if
(
walk_state
->
method_desc
->
method
.
thread_count
)
{
if
(
method_desc
->
method
.
thread_count
)
{
/*
/*
* Additional threads. Do not release the owner_id in this case,
* Additional threads. Do not release the owner_id in this case,
* we immediately reuse it for the next thread executing this method
* we immediately reuse it for the next thread executing this method
*/
*/
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"*** Completed execution of one thread, %d threads remaining
\n
"
,
"*** Completed execution of one thread, %d threads remaining
\n
"
,
walk_state
->
method_desc
->
method
.
method_desc
->
method
.
thread_count
));
thread_count
));
}
else
{
}
else
{
/* This is the only executing thread for this method */
/* This is the only executing thread for this method */
...
@@ -533,22 +587,20 @@ void acpi_ds_terminate_control_method(struct acpi_walk_state *walk_state)
...
@@ -533,22 +587,20 @@ void acpi_ds_terminate_control_method(struct acpi_walk_state *walk_state)
* This code is here because we must wait until the last thread exits
* This code is here because we must wait until the last thread exits
* before creating the synchronization semaphore.
* before creating the synchronization semaphore.
*/
*/
if
((
walk_state
->
method_desc
->
method
.
concurrency
==
1
)
&&
if
((
method_desc
->
method
.
concurrency
==
1
)
&&
(
!
walk_state
->
method_desc
->
method
.
semaphore
))
{
(
!
method_desc
->
method
.
semaphore
))
{
status
=
acpi_os_create_semaphore
(
1
,
1
,
status
=
acpi_os_create_semaphore
(
1
,
1
,
&
walk_state
->
&
method_desc
->
method
.
method_desc
->
method
.
semaphore
);
semaphore
);
}
}
/* No more threads, we can free the owner_id */
/* No more threads, we can free the owner_id */
acpi_ut_release_owner_id
(
&
walk_state
->
method_desc
->
method
.
acpi_ut_release_owner_id
(
&
method_desc
->
method
.
owner_id
);
owner_id
);
}
}
exit:
exit:
(
void
)
acpi_ut_release_mutex
(
ACPI_MTX_
PARSER
);
(
void
)
acpi_ut_release_mutex
(
ACPI_MTX_
CONTROL_METHOD
);
return_VOID
;
return_VOID
;
}
}
...
@@ -581,7 +633,7 @@ acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node)
...
@@ -581,7 +633,7 @@ acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node)
union
acpi_parse_object
*
op
;
union
acpi_parse_object
*
op
;
struct
acpi_walk_state
*
walk_state
;
struct
acpi_walk_state
*
walk_state
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_parse_method"
,
node
);
ACPI_FUNCTION_TRACE_PTR
(
ds_parse_method
,
node
);
/* Parameter Validation */
/* Parameter Validation */
...
@@ -590,7 +642,7 @@ acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node)
...
@@ -590,7 +642,7 @@ acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node)
}
}
ACPI_DEBUG_PRINT
((
ACPI_DB_PARSE
,
ACPI_DEBUG_PRINT
((
ACPI_DB_PARSE
,
"**** Parsing [%4.4s] ****
named_o
bj=%p
\n
"
,
"**** Parsing [%4.4s] ****
NamedO
bj=%p
\n
"
,
acpi_ut_get_node_name
(
node
),
node
));
acpi_ut_get_node_name
(
node
),
node
));
/* Extract the method object from the method Node */
/* Extract the method object from the method Node */
...
@@ -669,7 +721,7 @@ acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node)
...
@@ -669,7 +721,7 @@ acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node)
}
}
ACPI_DEBUG_PRINT
((
ACPI_DB_PARSE
,
ACPI_DEBUG_PRINT
((
ACPI_DB_PARSE
,
"**** [%4.4s] Parsed ****
named_o
bj=%p Op=%p
\n
"
,
"**** [%4.4s] Parsed ****
NamedO
bj=%p Op=%p
\n
"
,
acpi_ut_get_node_name
(
node
),
node
,
op
));
acpi_ut_get_node_name
(
node
),
node
,
op
));
/*
/*
...
...
drivers/acpi/dispatcher/dsmthdat.c
浏览文件 @
b3899c66
...
@@ -81,7 +81,7 @@ acpi_ds_method_data_get_type(u16 opcode,
...
@@ -81,7 +81,7 @@ acpi_ds_method_data_get_type(u16 opcode,
* special data types.
* special data types.
*
*
* NOTES: walk_state fields are initialized to zero by the
* NOTES: walk_state fields are initialized to zero by the
* ACPI_
MEM_CALLOCATE
().
* ACPI_
ALLOCATE_ZEROED
().
*
*
* A pseudo-Namespace Node is assigned to each argument and local
* A pseudo-Namespace Node is assigned to each argument and local
* so that ref_of() can return a pointer to the Node.
* so that ref_of() can return a pointer to the Node.
...
@@ -92,7 +92,7 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state)
...
@@ -92,7 +92,7 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state)
{
{
u32
i
;
u32
i
;
ACPI_FUNCTION_TRACE
(
"ds_method_data_init"
);
ACPI_FUNCTION_TRACE
(
ds_method_data_init
);
/* Init the method arguments */
/* Init the method arguments */
...
@@ -100,10 +100,10 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state)
...
@@ -100,10 +100,10 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state)
ACPI_MOVE_32_TO_32
(
&
walk_state
->
arguments
[
i
].
name
,
ACPI_MOVE_32_TO_32
(
&
walk_state
->
arguments
[
i
].
name
,
NAMEOF_ARG_NTE
);
NAMEOF_ARG_NTE
);
walk_state
->
arguments
[
i
].
name
.
integer
|=
(
i
<<
24
);
walk_state
->
arguments
[
i
].
name
.
integer
|=
(
i
<<
24
);
walk_state
->
arguments
[
i
].
descriptor
=
ACPI_DESC_TYPE_NAMED
;
walk_state
->
arguments
[
i
].
descriptor
_type
=
ACPI_DESC_TYPE_NAMED
;
walk_state
->
arguments
[
i
].
type
=
ACPI_TYPE_ANY
;
walk_state
->
arguments
[
i
].
type
=
ACPI_TYPE_ANY
;
walk_state
->
arguments
[
i
].
flags
=
ANOBJ_END_OF_PEER_LIST
|
walk_state
->
arguments
[
i
].
flags
=
ANOBJ_METHOD_ARG
;
ANOBJ_
END_OF_PEER_LIST
|
ANOBJ_
METHOD_ARG
;
}
}
/* Init the method locals */
/* Init the method locals */
...
@@ -113,11 +113,11 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state)
...
@@ -113,11 +113,11 @@ void acpi_ds_method_data_init(struct acpi_walk_state *walk_state)
NAMEOF_LOCAL_NTE
);
NAMEOF_LOCAL_NTE
);
walk_state
->
local_variables
[
i
].
name
.
integer
|=
(
i
<<
24
);
walk_state
->
local_variables
[
i
].
name
.
integer
|=
(
i
<<
24
);
walk_state
->
local_variables
[
i
].
descriptor
=
walk_state
->
local_variables
[
i
].
descriptor
_type
=
ACPI_DESC_TYPE_NAMED
;
ACPI_DESC_TYPE_NAMED
;
walk_state
->
local_variables
[
i
].
type
=
ACPI_TYPE_ANY
;
walk_state
->
local_variables
[
i
].
type
=
ACPI_TYPE_ANY
;
walk_state
->
local_variables
[
i
].
flags
=
ANOBJ_END_OF_PEER_LIST
|
walk_state
->
local_variables
[
i
].
flags
=
ANOBJ_METHOD_LOCAL
;
ANOBJ_
END_OF_PEER_LIST
|
ANOBJ_
METHOD_LOCAL
;
}
}
return_VOID
;
return_VOID
;
...
@@ -140,7 +140,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state)
...
@@ -140,7 +140,7 @@ void acpi_ds_method_data_delete_all(struct acpi_walk_state *walk_state)
{
{
u32
index
;
u32
index
;
ACPI_FUNCTION_TRACE
(
"ds_method_data_delete_all"
);
ACPI_FUNCTION_TRACE
(
ds_method_data_delete_all
);
/* Detach the locals */
/* Detach the locals */
...
@@ -199,7 +199,7 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params,
...
@@ -199,7 +199,7 @@ acpi_ds_method_data_init_args(union acpi_operand_object **params,
acpi_status
status
;
acpi_status
status
;
u32
index
=
0
;
u32
index
=
0
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_method_data_init_args"
,
params
);
ACPI_FUNCTION_TRACE_PTR
(
ds_method_data_init_args
,
params
);
if
(
!
params
)
{
if
(
!
params
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
...
@@ -251,7 +251,7 @@ acpi_ds_method_data_get_node(u16 opcode,
...
@@ -251,7 +251,7 @@ acpi_ds_method_data_get_node(u16 opcode,
struct
acpi_walk_state
*
walk_state
,
struct
acpi_walk_state
*
walk_state
,
struct
acpi_namespace_node
**
node
)
struct
acpi_namespace_node
**
node
)
{
{
ACPI_FUNCTION_TRACE
(
"ds_method_data_get_node"
);
ACPI_FUNCTION_TRACE
(
ds_method_data_get_node
);
/*
/*
* Method Locals and Arguments are supported
* Method Locals and Arguments are supported
...
@@ -318,10 +318,10 @@ acpi_ds_method_data_set_value(u16 opcode,
...
@@ -318,10 +318,10 @@ acpi_ds_method_data_set_value(u16 opcode,
acpi_status
status
;
acpi_status
status
;
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
ACPI_FUNCTION_TRACE
(
"ds_method_data_set_value"
);
ACPI_FUNCTION_TRACE
(
ds_method_data_set_value
);
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"
new_o
bj %p Opcode %X, Refs=%d [%s]
\n
"
,
object
,
"
NewO
bj %p Opcode %X, Refs=%d [%s]
\n
"
,
object
,
opcode
,
object
->
common
.
reference_count
,
opcode
,
object
->
common
.
reference_count
,
acpi_ut_get_type_name
(
object
->
common
.
type
)));
acpi_ut_get_type_name
(
object
->
common
.
type
)));
...
@@ -336,7 +336,7 @@ acpi_ds_method_data_set_value(u16 opcode,
...
@@ -336,7 +336,7 @@ acpi_ds_method_data_set_value(u16 opcode,
* Increment ref count so object can't be deleted while installed.
* Increment ref count so object can't be deleted while installed.
* NOTE: We do not copy the object in order to preserve the call by
* NOTE: We do not copy the object in order to preserve the call by
* reference semantics of ACPI Control Method invocation.
* reference semantics of ACPI Control Method invocation.
* (See ACPI
s
pecification 2.0_c)
* (See ACPI
S
pecification 2.0_c)
*/
*/
acpi_ut_add_reference
(
object
);
acpi_ut_add_reference
(
object
);
...
@@ -351,7 +351,7 @@ acpi_ds_method_data_set_value(u16 opcode,
...
@@ -351,7 +351,7 @@ acpi_ds_method_data_set_value(u16 opcode,
* FUNCTION: acpi_ds_method_data_get_value
* FUNCTION: acpi_ds_method_data_get_value
*
*
* PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
* PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
* Index -
w
hich local_var or argument to get
* Index -
W
hich local_var or argument to get
* walk_state - Current walk state object
* walk_state - Current walk state object
* dest_desc - Where Arg or Local value is returned
* dest_desc - Where Arg or Local value is returned
*
*
...
@@ -372,7 +372,7 @@ acpi_ds_method_data_get_value(u16 opcode,
...
@@ -372,7 +372,7 @@ acpi_ds_method_data_get_value(u16 opcode,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
union
acpi_operand_object
*
object
;
union
acpi_operand_object
*
object
;
ACPI_FUNCTION_TRACE
(
"ds_method_data_get_value"
);
ACPI_FUNCTION_TRACE
(
ds_method_data_get_value
);
/* Validate the object descriptor */
/* Validate the object descriptor */
...
@@ -459,7 +459,7 @@ acpi_ds_method_data_get_value(u16 opcode,
...
@@ -459,7 +459,7 @@ acpi_ds_method_data_get_value(u16 opcode,
* FUNCTION: acpi_ds_method_data_delete_value
* FUNCTION: acpi_ds_method_data_delete_value
*
*
* PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
* PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
* Index -
w
hich local_var or argument to delete
* Index -
W
hich local_var or argument to delete
* walk_state - Current walk state object
* walk_state - Current walk state object
*
*
* RETURN: None
* RETURN: None
...
@@ -477,7 +477,7 @@ acpi_ds_method_data_delete_value(u16 opcode,
...
@@ -477,7 +477,7 @@ acpi_ds_method_data_delete_value(u16 opcode,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
union
acpi_operand_object
*
object
;
union
acpi_operand_object
*
object
;
ACPI_FUNCTION_TRACE
(
"ds_method_data_delete_value"
);
ACPI_FUNCTION_TRACE
(
ds_method_data_delete_value
);
/* Get the namespace node for the arg/local */
/* Get the namespace node for the arg/local */
...
@@ -538,7 +538,7 @@ acpi_ds_store_object_to_local(u16 opcode,
...
@@ -538,7 +538,7 @@ acpi_ds_store_object_to_local(u16 opcode,
union
acpi_operand_object
*
current_obj_desc
;
union
acpi_operand_object
*
current_obj_desc
;
union
acpi_operand_object
*
new_obj_desc
;
union
acpi_operand_object
*
new_obj_desc
;
ACPI_FUNCTION_TRACE
(
"ds_store_object_to_local"
);
ACPI_FUNCTION_TRACE
(
ds_store_object_to_local
);
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Opcode=%X Index=%d Obj=%p
\n
"
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Opcode=%X Index=%d Obj=%p
\n
"
,
opcode
,
index
,
obj_desc
));
opcode
,
index
,
obj_desc
));
...
@@ -614,7 +614,7 @@ acpi_ds_store_object_to_local(u16 opcode,
...
@@ -614,7 +614,7 @@ acpi_ds_store_object_to_local(u16 opcode,
&&
(
current_obj_desc
->
reference
.
opcode
==
&&
(
current_obj_desc
->
reference
.
opcode
==
AML_REF_OF_OP
))
{
AML_REF_OF_OP
))
{
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Arg (%p) is an
obj_r
ef(Node), storing in node %p
\n
"
,
"Arg (%p) is an
ObjR
ef(Node), storing in node %p
\n
"
,
new_obj_desc
,
new_obj_desc
,
current_obj_desc
));
current_obj_desc
));
...
@@ -688,7 +688,7 @@ acpi_ds_method_data_get_type(u16 opcode,
...
@@ -688,7 +688,7 @@ acpi_ds_method_data_get_type(u16 opcode,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
union
acpi_operand_object
*
object
;
union
acpi_operand_object
*
object
;
ACPI_FUNCTION_TRACE
(
"ds_method_data_get_type"
);
ACPI_FUNCTION_TRACE
(
ds_method_data_get_type
);
/* Get the namespace node for the arg/local */
/* Get the namespace node for the arg/local */
...
@@ -701,6 +701,7 @@ acpi_ds_method_data_get_type(u16 opcode,
...
@@ -701,6 +701,7 @@ acpi_ds_method_data_get_type(u16 opcode,
object
=
acpi_ns_get_attached_object
(
node
);
object
=
acpi_ns_get_attached_object
(
node
);
if
(
!
object
)
{
if
(
!
object
)
{
/* Uninitialized local/arg, return TYPE_ANY */
/* Uninitialized local/arg, return TYPE_ANY */
return_VALUE
(
ACPI_TYPE_ANY
);
return_VALUE
(
ACPI_TYPE_ANY
);
...
...
drivers/acpi/dispatcher/dsobject.c
浏览文件 @
b3899c66
...
@@ -81,7 +81,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
...
@@ -81,7 +81,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ds_build_internal_object"
);
ACPI_FUNCTION_TRACE
(
ds_build_internal_object
);
*
obj_desc_ptr
=
NULL
;
*
obj_desc_ptr
=
NULL
;
if
(
op
->
common
.
aml_opcode
==
AML_INT_NAMEPATH_OP
)
{
if
(
op
->
common
.
aml_opcode
==
AML_INT_NAMEPATH_OP
)
{
...
@@ -103,6 +103,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
...
@@ -103,6 +103,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
common
.
common
.
node
)));
node
)));
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
/* Check if we are resolving a named reference within a package */
/* Check if we are resolving a named reference within a package */
if
((
status
==
AE_NOT_FOUND
)
if
((
status
==
AE_NOT_FOUND
)
...
@@ -186,7 +187,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
...
@@ -186,7 +187,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
union
acpi_parse_object
*
byte_list
;
union
acpi_parse_object
*
byte_list
;
u32
byte_list_length
=
0
;
u32
byte_list_length
=
0
;
ACPI_FUNCTION_TRACE
(
"ds_build_internal_buffer_obj"
);
ACPI_FUNCTION_TRACE
(
ds_build_internal_buffer_obj
);
/*
/*
* If we are evaluating a Named buffer object "Name (xxxx, Buffer)".
* If we are evaluating a Named buffer object "Name (xxxx, Buffer)".
...
@@ -195,6 +196,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
...
@@ -195,6 +196,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
*/
*/
obj_desc
=
*
obj_desc_ptr
;
obj_desc
=
*
obj_desc_ptr
;
if
(
!
obj_desc
)
{
if
(
!
obj_desc
)
{
/* Create a new buffer object */
/* Create a new buffer object */
obj_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_BUFFER
);
obj_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_BUFFER
);
...
@@ -243,7 +245,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
...
@@ -243,7 +245,7 @@ acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
"Buffer defined with zero length in AML, creating
\n
"
));
"Buffer defined with zero length in AML, creating
\n
"
));
}
else
{
}
else
{
obj_desc
->
buffer
.
pointer
=
obj_desc
->
buffer
.
pointer
=
ACPI_
MEM_CALLOCATE
(
obj_desc
->
buffer
.
length
);
ACPI_
ALLOCATE_ZEROED
(
obj_desc
->
buffer
.
length
);
if
(
!
obj_desc
->
buffer
.
pointer
)
{
if
(
!
obj_desc
->
buffer
.
pointer
)
{
acpi_ut_delete_object_desc
(
obj_desc
);
acpi_ut_delete_object_desc
(
obj_desc
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
...
@@ -291,7 +293,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
...
@@ -291,7 +293,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
acpi_native_uint
i
;
acpi_native_uint
i
;
ACPI_FUNCTION_TRACE
(
"ds_build_internal_package_obj"
);
ACPI_FUNCTION_TRACE
(
ds_build_internal_package_obj
);
/* Find the parent of a possibly nested package */
/* Find the parent of a possibly nested package */
...
@@ -339,9 +341,10 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
...
@@ -339,9 +341,10 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
* individual objects). Add an extra pointer slot so
* individual objects). Add an extra pointer slot so
* that the list is always null terminated.
* that the list is always null terminated.
*/
*/
obj_desc
->
package
.
elements
=
ACPI_MEM_CALLOCATE
(((
acpi_size
)
obj_desc
->
obj_desc
->
package
.
elements
=
ACPI_ALLOCATE_ZEROED
(((
acpi_size
)
package
.
count
+
obj_desc
->
package
.
1
)
*
sizeof
(
void
*
));
count
+
1
)
*
sizeof
(
void
*
));
if
(
!
obj_desc
->
package
.
elements
)
{
if
(
!
obj_desc
->
package
.
elements
)
{
acpi_ut_delete_object_desc
(
obj_desc
);
acpi_ut_delete_object_desc
(
obj_desc
);
...
@@ -355,6 +358,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
...
@@ -355,6 +358,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
arg
=
arg
->
common
.
next
;
arg
=
arg
->
common
.
next
;
for
(
i
=
0
;
arg
;
i
++
)
{
for
(
i
=
0
;
arg
;
i
++
)
{
if
(
arg
->
common
.
aml_opcode
==
AML_INT_RETURN_VALUE_OP
)
{
if
(
arg
->
common
.
aml_opcode
==
AML_INT_RETURN_VALUE_OP
)
{
/* Object (package or buffer) is already built */
/* Object (package or buffer) is already built */
obj_desc
->
package
.
elements
[
i
]
=
obj_desc
->
package
.
elements
[
i
]
=
...
@@ -396,7 +400,7 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state,
...
@@ -396,7 +400,7 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state,
acpi_status
status
;
acpi_status
status
;
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_create_node"
,
op
);
ACPI_FUNCTION_TRACE_PTR
(
ds_create_node
,
op
);
/*
/*
* Because of the execution pass through the non-control-method
* Because of the execution pass through the non-control-method
...
@@ -408,6 +412,7 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state,
...
@@ -408,6 +412,7 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state,
}
}
if
(
!
op
->
common
.
value
.
arg
)
{
if
(
!
op
->
common
.
value
.
arg
)
{
/* No arguments, there is nothing to do */
/* No arguments, there is nothing to do */
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -464,11 +469,12 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
...
@@ -464,11 +469,12 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE
(
"ds_init_object_from_op"
);
ACPI_FUNCTION_TRACE
(
ds_init_object_from_op
);
obj_desc
=
*
ret_obj_desc
;
obj_desc
=
*
ret_obj_desc
;
op_info
=
acpi_ps_get_opcode_info
(
opcode
);
op_info
=
acpi_ps_get_opcode_info
(
opcode
);
if
(
op_info
->
class
==
AML_CLASS_UNKNOWN
)
{
if
(
op_info
->
class
==
AML_CLASS_UNKNOWN
)
{
/* Unknown opcode */
/* Unknown opcode */
return_ACPI_STATUS
(
AE_TYPE
);
return_ACPI_STATUS
(
AE_TYPE
);
...
@@ -626,6 +632,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
...
@@ -626,6 +632,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,
default:
/* Other literals, etc.. */
default:
/* Other literals, etc.. */
if
(
op
->
common
.
aml_opcode
==
AML_INT_NAMEPATH_OP
)
{
if
(
op
->
common
.
aml_opcode
==
AML_INT_NAMEPATH_OP
)
{
/* Node was saved in Op */
/* Node was saved in Op */
obj_desc
->
reference
.
node
=
op
->
common
.
node
;
obj_desc
->
reference
.
node
=
op
->
common
.
node
;
...
...
drivers/acpi/dispatcher/dsopcode.c
浏览文件 @
b3899c66
...
@@ -91,7 +91,7 @@ acpi_ds_execute_arguments(struct acpi_namespace_node *node,
...
@@ -91,7 +91,7 @@ acpi_ds_execute_arguments(struct acpi_namespace_node *node,
union
acpi_parse_object
*
op
;
union
acpi_parse_object
*
op
;
struct
acpi_walk_state
*
walk_state
;
struct
acpi_walk_state
*
walk_state
;
ACPI_FUNCTION_TRACE
(
"ds_execute_arguments"
);
ACPI_FUNCTION_TRACE
(
ds_execute_arguments
);
/*
/*
* Allocate a new parser op to be the root of the parsed tree
* Allocate a new parser op to be the root of the parsed tree
...
@@ -193,7 +193,7 @@ acpi_ds_get_buffer_field_arguments(union acpi_operand_object *obj_desc)
...
@@ -193,7 +193,7 @@ acpi_ds_get_buffer_field_arguments(union acpi_operand_object *obj_desc)
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_get_buffer_field_arguments"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
ds_get_buffer_field_arguments
,
obj_desc
);
if
(
obj_desc
->
common
.
flags
&
AOPOBJ_DATA_VALID
)
{
if
(
obj_desc
->
common
.
flags
&
AOPOBJ_DATA_VALID
)
{
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -206,7 +206,7 @@ acpi_ds_get_buffer_field_arguments(union acpi_operand_object *obj_desc)
...
@@ -206,7 +206,7 @@ acpi_ds_get_buffer_field_arguments(union acpi_operand_object *obj_desc)
ACPI_DEBUG_EXEC
(
acpi_ut_display_init_pathname
ACPI_DEBUG_EXEC
(
acpi_ut_display_init_pathname
(
ACPI_TYPE_BUFFER_FIELD
,
node
,
NULL
));
(
ACPI_TYPE_BUFFER_FIELD
,
node
,
NULL
));
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"[%4.4s]
buffer_f
ield Arg Init
\n
"
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"[%4.4s]
BufferF
ield Arg Init
\n
"
,
acpi_ut_get_node_name
(
node
)));
acpi_ut_get_node_name
(
node
)));
/* Execute the AML code for the term_arg arguments */
/* Execute the AML code for the term_arg arguments */
...
@@ -235,7 +235,7 @@ acpi_status acpi_ds_get_buffer_arguments(union acpi_operand_object *obj_desc)
...
@@ -235,7 +235,7 @@ acpi_status acpi_ds_get_buffer_arguments(union acpi_operand_object *obj_desc)
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_get_buffer_arguments"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
ds_get_buffer_arguments
,
obj_desc
);
if
(
obj_desc
->
common
.
flags
&
AOPOBJ_DATA_VALID
)
{
if
(
obj_desc
->
common
.
flags
&
AOPOBJ_DATA_VALID
)
{
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -279,7 +279,7 @@ acpi_status acpi_ds_get_package_arguments(union acpi_operand_object *obj_desc)
...
@@ -279,7 +279,7 @@ acpi_status acpi_ds_get_package_arguments(union acpi_operand_object *obj_desc)
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_get_package_arguments"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
ds_get_package_arguments
,
obj_desc
);
if
(
obj_desc
->
common
.
flags
&
AOPOBJ_DATA_VALID
)
{
if
(
obj_desc
->
common
.
flags
&
AOPOBJ_DATA_VALID
)
{
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -324,7 +324,7 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc)
...
@@ -324,7 +324,7 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc)
acpi_status
status
;
acpi_status
status
;
union
acpi_operand_object
*
extra_desc
;
union
acpi_operand_object
*
extra_desc
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_get_region_arguments"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
ds_get_region_arguments
,
obj_desc
);
if
(
obj_desc
->
region
.
flags
&
AOPOBJ_DATA_VALID
)
{
if
(
obj_desc
->
region
.
flags
&
AOPOBJ_DATA_VALID
)
{
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -342,8 +342,7 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc)
...
@@ -342,8 +342,7 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc)
ACPI_DEBUG_EXEC
(
acpi_ut_display_init_pathname
ACPI_DEBUG_EXEC
(
acpi_ut_display_init_pathname
(
ACPI_TYPE_REGION
,
node
,
NULL
));
(
ACPI_TYPE_REGION
,
node
,
NULL
));
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"[%4.4s] OpRegion Arg Init at AML %p
\n
"
,
"[%4.4s] op_region Arg Init at AML %p
\n
"
,
acpi_ut_get_node_name
(
node
),
acpi_ut_get_node_name
(
node
),
extra_desc
->
extra
.
aml_start
));
extra_desc
->
extra
.
aml_start
));
...
@@ -352,6 +351,28 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc)
...
@@ -352,6 +351,28 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc)
status
=
acpi_ds_execute_arguments
(
node
,
acpi_ns_get_parent_node
(
node
),
status
=
acpi_ds_execute_arguments
(
node
,
acpi_ns_get_parent_node
(
node
),
extra_desc
->
extra
.
aml_length
,
extra_desc
->
extra
.
aml_length
,
extra_desc
->
extra
.
aml_start
);
extra_desc
->
extra
.
aml_start
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
/* Validate the region address/length via the host OS */
status
=
acpi_os_validate_address
(
obj_desc
->
region
.
space_id
,
obj_desc
->
region
.
address
,
(
acpi_size
)
obj_desc
->
region
.
length
);
if
(
ACPI_FAILURE
(
status
))
{
/*
* Invalid address/length. We will emit an error message and mark
* the region as invalid, so that it will cause an additional error if
* it is ever used. Then return AE_OK.
*/
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"During address validation of OpRegion [%4.4s]"
,
node
->
name
.
ascii
));
obj_desc
->
common
.
flags
|=
AOPOBJ_INVALID
;
status
=
AE_OK
;
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
@@ -411,7 +432,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
...
@@ -411,7 +432,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
u8
field_flags
;
u8
field_flags
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_init_buffer_field"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
ds_init_buffer_field
,
obj_desc
);
/* Host object must be a Buffer */
/* Host object must be a Buffer */
...
@@ -457,7 +478,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
...
@@ -457,7 +478,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
if
(
bit_count
==
0
)
{
if
(
bit_count
==
0
)
{
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Attempt to
create_f
ield of length zero"
));
"Attempt to
CreateF
ield of length zero"
));
status
=
AE_AML_OPERAND_VALUE
;
status
=
AE_AML_OPERAND_VALUE
;
goto
cleanup
;
goto
cleanup
;
}
}
...
@@ -595,7 +616,7 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
...
@@ -595,7 +616,7 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
union
acpi_parse_object
*
next_op
;
union
acpi_parse_object
*
next_op
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_eval_buffer_field_operands"
,
op
);
ACPI_FUNCTION_TRACE_PTR
(
ds_eval_buffer_field_operands
,
op
);
/*
/*
* This is where we evaluate the address and length fields of the
* This is where we evaluate the address and length fields of the
...
@@ -627,7 +648,7 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
...
@@ -627,7 +648,7 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
ACPI_DUMP_OPERANDS
(
ACPI_WALK_OPERANDS
,
ACPI_IMODE_EXECUTE
,
ACPI_DUMP_OPERANDS
(
ACPI_WALK_OPERANDS
,
ACPI_IMODE_EXECUTE
,
acpi_ps_get_opcode_name
(
op
->
common
.
aml_opcode
),
acpi_ps_get_opcode_name
(
op
->
common
.
aml_opcode
),
walk_state
->
num_operands
,
walk_state
->
num_operands
,
"after
acpi_ex_resolve_o
perands"
);
"after
AcpiExResolveO
perands"
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_ERROR
((
AE_INFO
,
"(%s) bad operand(s) (%X)"
,
ACPI_ERROR
((
AE_INFO
,
"(%s) bad operand(s) (%X)"
,
...
@@ -640,6 +661,7 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
...
@@ -640,6 +661,7 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
/* Initialize the Buffer Field */
/* Initialize the Buffer Field */
if
(
op
->
common
.
aml_opcode
==
AML_CREATE_FIELD_OP
)
{
if
(
op
->
common
.
aml_opcode
==
AML_CREATE_FIELD_OP
)
{
/* NOTE: Slightly different operands for this opcode */
/* NOTE: Slightly different operands for this opcode */
status
=
status
=
...
@@ -685,7 +707,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
...
@@ -685,7 +707,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
union
acpi_parse_object
*
next_op
;
union
acpi_parse_object
*
next_op
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_eval_region_operands"
,
op
);
ACPI_FUNCTION_TRACE_PTR
(
ds_eval_region_operands
,
op
);
/*
/*
* This is where we evaluate the address and length fields of the
* This is where we evaluate the address and length fields of the
...
@@ -718,7 +740,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
...
@@ -718,7 +740,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
ACPI_DUMP_OPERANDS
(
ACPI_WALK_OPERANDS
,
ACPI_IMODE_EXECUTE
,
ACPI_DUMP_OPERANDS
(
ACPI_WALK_OPERANDS
,
ACPI_IMODE_EXECUTE
,
acpi_ps_get_opcode_name
(
op
->
common
.
aml_opcode
),
acpi_ps_get_opcode_name
(
op
->
common
.
aml_opcode
),
1
,
"after
acpi_ex_resolve_o
perands"
);
1
,
"after
AcpiExResolveO
perands"
);
obj_desc
=
acpi_ns_get_attached_object
(
node
);
obj_desc
=
acpi_ns_get_attached_object
(
node
);
if
(
!
obj_desc
)
{
if
(
!
obj_desc
)
{
...
@@ -744,7 +766,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
...
@@ -744,7 +766,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
operand_desc
->
integer
.
value
;
operand_desc
->
integer
.
value
;
acpi_ut_remove_reference
(
operand_desc
);
acpi_ut_remove_reference
(
operand_desc
);
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"
rgn_o
bj %p Addr %8.8X%8.8X Len %X
\n
"
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"
RgnO
bj %p Addr %8.8X%8.8X Len %X
\n
"
,
obj_desc
,
obj_desc
,
ACPI_FORMAT_UINT64
(
obj_desc
->
region
.
address
),
ACPI_FORMAT_UINT64
(
obj_desc
->
region
.
address
),
obj_desc
->
region
.
length
));
obj_desc
->
region
.
length
));
...
@@ -780,7 +802,7 @@ acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state,
...
@@ -780,7 +802,7 @@ acpi_ds_eval_data_object_operands(struct acpi_walk_state *walk_state,
union
acpi_operand_object
*
arg_desc
;
union
acpi_operand_object
*
arg_desc
;
u32
length
;
u32
length
;
ACPI_FUNCTION_TRACE
(
"ds_eval_data_object_operands"
);
ACPI_FUNCTION_TRACE
(
ds_eval_data_object_operands
);
/* The first operand (for all of these data objects) is the length */
/* The first operand (for all of these data objects) is the length */
...
@@ -874,7 +896,7 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
...
@@ -874,7 +896,7 @@ acpi_ds_exec_begin_control_op(struct acpi_walk_state *walk_state,
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
union
acpi_generic_state
*
control_state
;
union
acpi_generic_state
*
control_state
;
ACPI_FUNCTION_NAME
(
"ds_exec_begin_control_op"
);
ACPI_FUNCTION_NAME
(
ds_exec_begin_control_op
);
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Op=%p Opcode=%2.2X State=%p
\n
"
,
op
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Op=%p Opcode=%2.2X State=%p
\n
"
,
op
,
op
->
common
.
aml_opcode
,
walk_state
));
op
->
common
.
aml_opcode
,
walk_state
));
...
@@ -952,7 +974,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
...
@@ -952,7 +974,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
union
acpi_generic_state
*
control_state
;
union
acpi_generic_state
*
control_state
;
ACPI_FUNCTION_NAME
(
"ds_exec_end_control_op"
);
ACPI_FUNCTION_NAME
(
ds_exec_end_control_op
);
switch
(
op
->
common
.
aml_opcode
)
{
switch
(
op
->
common
.
aml_opcode
)
{
case
AML_IF_OP
:
case
AML_IF_OP
:
...
@@ -984,6 +1006,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
...
@@ -984,6 +1006,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"[WHILE_OP] Op=%p
\n
"
,
op
));
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"[WHILE_OP] Op=%p
\n
"
,
op
));
if
(
walk_state
->
control_state
->
common
.
value
)
{
if
(
walk_state
->
control_state
->
common
.
value
)
{
/* Predicate was true, go back and evaluate it again! */
/* Predicate was true, go back and evaluate it again! */
status
=
AE_CTRL_PENDING
;
status
=
AE_CTRL_PENDING
;
...
@@ -1014,6 +1037,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
...
@@ -1014,6 +1037,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
* has been bubbled up the tree
* has been bubbled up the tree
*/
*/
if
(
op
->
common
.
value
.
arg
)
{
if
(
op
->
common
.
value
.
arg
)
{
/* Since we have a real Return(), delete any implicit return */
/* Since we have a real Return(), delete any implicit return */
acpi_ds_clear_implicit_return
(
walk_state
);
acpi_ds_clear_implicit_return
(
walk_state
);
...
@@ -1047,6 +1071,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
...
@@ -1047,6 +1071,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
walk_state
->
return_desc
=
walk_state
->
operands
[
0
];
walk_state
->
return_desc
=
walk_state
->
operands
[
0
];
}
else
if
((
walk_state
->
results
)
&&
}
else
if
((
walk_state
->
results
)
&&
(
walk_state
->
results
->
results
.
num_results
>
0
))
{
(
walk_state
->
results
->
results
.
num_results
>
0
))
{
/* Since we have a real Return(), delete any implicit return */
/* Since we have a real Return(), delete any implicit return */
acpi_ds_clear_implicit_return
(
walk_state
);
acpi_ds_clear_implicit_return
(
walk_state
);
...
@@ -1095,7 +1120,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
...
@@ -1095,7 +1120,7 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
}
}
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Completed RETURN_OP State=%p,
ret_v
al=%p
\n
"
,
"Completed RETURN_OP State=%p,
RetV
al=%p
\n
"
,
walk_state
,
walk_state
->
return_desc
));
walk_state
,
walk_state
->
return_desc
));
/* End the control method execution right now */
/* End the control method execution right now */
...
...
drivers/acpi/dispatcher/dsutils.c
浏览文件 @
b3899c66
...
@@ -68,7 +68,7 @@ ACPI_MODULE_NAME("dsutils")
...
@@ -68,7 +68,7 @@ ACPI_MODULE_NAME("dsutils")
******************************************************************************/
******************************************************************************/
void
acpi_ds_clear_implicit_return
(
struct
acpi_walk_state
*
walk_state
)
void
acpi_ds_clear_implicit_return
(
struct
acpi_walk_state
*
walk_state
)
{
{
ACPI_FUNCTION_NAME
(
"ds_clear_implicit_return"
);
ACPI_FUNCTION_NAME
(
ds_clear_implicit_return
);
/*
/*
* Slack must be enabled for this feature
* Slack must be enabled for this feature
...
@@ -115,7 +115,7 @@ u8
...
@@ -115,7 +115,7 @@ u8
acpi_ds_do_implicit_return
(
union
acpi_operand_object
*
return_desc
,
acpi_ds_do_implicit_return
(
union
acpi_operand_object
*
return_desc
,
struct
acpi_walk_state
*
walk_state
,
u8
add_reference
)
struct
acpi_walk_state
*
walk_state
,
u8
add_reference
)
{
{
ACPI_FUNCTION_NAME
(
"ds_do_implicit_return"
);
ACPI_FUNCTION_NAME
(
ds_do_implicit_return
);
/*
/*
* Slack must be enabled for this feature, and we must
* Slack must be enabled for this feature, and we must
...
@@ -171,7 +171,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
...
@@ -171,7 +171,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
{
{
const
struct
acpi_opcode_info
*
parent_info
;
const
struct
acpi_opcode_info
*
parent_info
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_is_result_used"
,
op
);
ACPI_FUNCTION_TRACE_PTR
(
ds_is_result_used
,
op
);
/* Must have both an Op and a Result Object */
/* Must have both an Op and a Result Object */
...
@@ -202,6 +202,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
...
@@ -202,6 +202,7 @@ acpi_ds_is_result_used(union acpi_parse_object * op,
*/
*/
if
((
!
op
->
common
.
parent
)
||
if
((
!
op
->
common
.
parent
)
||
(
op
->
common
.
parent
->
common
.
aml_opcode
==
AML_SCOPE_OP
))
{
(
op
->
common
.
parent
->
common
.
aml_opcode
==
AML_SCOPE_OP
))
{
/* No parent, the return value cannot possibly be used */
/* No parent, the return value cannot possibly be used */
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
...
@@ -340,7 +341,7 @@ acpi_ds_delete_result_if_not_used(union acpi_parse_object *op,
...
@@ -340,7 +341,7 @@ acpi_ds_delete_result_if_not_used(union acpi_parse_object *op,
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_delete_result_if_not_used"
,
result_obj
);
ACPI_FUNCTION_TRACE_PTR
(
ds_delete_result_if_not_used
,
result_obj
);
if
(
!
op
)
{
if
(
!
op
)
{
ACPI_ERROR
((
AE_INFO
,
"Null Op"
));
ACPI_ERROR
((
AE_INFO
,
"Null Op"
));
...
@@ -352,6 +353,7 @@ acpi_ds_delete_result_if_not_used(union acpi_parse_object *op,
...
@@ -352,6 +353,7 @@ acpi_ds_delete_result_if_not_used(union acpi_parse_object *op,
}
}
if
(
!
acpi_ds_is_result_used
(
op
,
walk_state
))
{
if
(
!
acpi_ds_is_result_used
(
op
,
walk_state
))
{
/* Must pop the result stack (obj_desc should be equal to result_obj) */
/* Must pop the result stack (obj_desc should be equal to result_obj) */
status
=
acpi_ds_result_pop
(
&
obj_desc
,
walk_state
);
status
=
acpi_ds_result_pop
(
&
obj_desc
,
walk_state
);
...
@@ -382,7 +384,7 @@ acpi_status acpi_ds_resolve_operands(struct acpi_walk_state *walk_state)
...
@@ -382,7 +384,7 @@ acpi_status acpi_ds_resolve_operands(struct acpi_walk_state *walk_state)
u32
i
;
u32
i
;
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_resolve_operands"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ds_resolve_operands
,
walk_state
);
/*
/*
* Attempt to resolve each of the valid operands
* Attempt to resolve each of the valid operands
...
@@ -417,7 +419,7 @@ void acpi_ds_clear_operands(struct acpi_walk_state *walk_state)
...
@@ -417,7 +419,7 @@ void acpi_ds_clear_operands(struct acpi_walk_state *walk_state)
{
{
u32
i
;
u32
i
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_clear_operands"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ds_clear_operands
,
walk_state
);
/* Remove a reference on each operand on the stack */
/* Remove a reference on each operand on the stack */
...
@@ -465,7 +467,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
...
@@ -465,7 +467,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
acpi_interpreter_mode
interpreter_mode
;
acpi_interpreter_mode
interpreter_mode
;
const
struct
acpi_opcode_info
*
op_info
;
const
struct
acpi_opcode_info
*
op_info
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_create_operand"
,
arg
);
ACPI_FUNCTION_TRACE_PTR
(
ds_create_operand
,
arg
);
/* A valid name must be looked up in the namespace */
/* A valid name must be looked up in the namespace */
...
@@ -498,7 +500,9 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
...
@@ -498,7 +500,9 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
*/
*/
if
((
walk_state
->
deferred_node
)
&&
if
((
walk_state
->
deferred_node
)
&&
(
walk_state
->
deferred_node
->
type
==
ACPI_TYPE_BUFFER_FIELD
)
(
walk_state
->
deferred_node
->
type
==
ACPI_TYPE_BUFFER_FIELD
)
&&
(
arg_index
!=
0
))
{
&&
(
arg_index
==
(
u32
)
((
walk_state
->
opcode
==
AML_CREATE_FIELD_OP
)
?
3
:
2
)))
{
obj_desc
=
obj_desc
=
ACPI_CAST_PTR
(
union
acpi_operand_object
,
ACPI_CAST_PTR
(
union
acpi_operand_object
,
walk_state
->
deferred_node
);
walk_state
->
deferred_node
);
...
@@ -521,6 +525,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
...
@@ -521,6 +525,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
&&
(
parent_op
->
common
.
aml_opcode
!=
AML_REGION_OP
)
&&
(
parent_op
->
common
.
aml_opcode
!=
AML_REGION_OP
)
&&
(
parent_op
->
common
.
aml_opcode
!=
&&
(
parent_op
->
common
.
aml_opcode
!=
AML_INT_NAMEPATH_OP
))
{
AML_INT_NAMEPATH_OP
))
{
/* Enter name into namespace if not found */
/* Enter name into namespace if not found */
interpreter_mode
=
ACPI_IMODE_LOAD_PASS2
;
interpreter_mode
=
ACPI_IMODE_LOAD_PASS2
;
...
@@ -572,7 +577,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
...
@@ -572,7 +577,7 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
/* Free the namestring created above */
/* Free the namestring created above */
ACPI_
MEM_
FREE
(
name_string
);
ACPI_FREE
(
name_string
);
/* Check status from the lookup */
/* Check status from the lookup */
...
@@ -696,7 +701,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
...
@@ -696,7 +701,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
union
acpi_parse_object
*
arg
;
union
acpi_parse_object
*
arg
;
u32
arg_count
=
0
;
u32
arg_count
=
0
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_create_operands"
,
first_arg
);
ACPI_FUNCTION_TRACE_PTR
(
ds_create_operands
,
first_arg
);
/* For all arguments in the list... */
/* For all arguments in the list... */
...
...
drivers/acpi/dispatcher/dswexec.c
浏览文件 @
b3899c66
...
@@ -49,7 +49,6 @@
...
@@ -49,7 +49,6 @@
#include <acpi/acinterp.h>
#include <acpi/acinterp.h>
#include <acpi/acnamesp.h>
#include <acpi/acnamesp.h>
#include <acpi/acdebug.h>
#include <acpi/acdebug.h>
#include <acpi/acdisasm.h>
#define _COMPONENT ACPI_DISPATCHER
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME
(
"dswexec"
)
ACPI_MODULE_NAME
(
"dswexec"
)
...
@@ -93,7 +92,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
...
@@ -93,7 +92,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
local_obj_desc
=
NULL
;
union
acpi_operand_object
*
local_obj_desc
=
NULL
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_get_predicate_value"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ds_get_predicate_value
,
walk_state
);
walk_state
->
control_state
->
common
.
state
=
0
;
walk_state
->
control_state
->
common
.
state
=
0
;
...
@@ -123,7 +122,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
...
@@ -123,7 +122,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
if
(
!
obj_desc
)
{
if
(
!
obj_desc
)
{
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"No predicate
obj_d
esc=%p State=%p"
,
"No predicate
ObjD
esc=%p State=%p"
,
obj_desc
,
walk_state
));
obj_desc
,
walk_state
));
return_ACPI_STATUS
(
AE_AML_NO_OPERAND
);
return_ACPI_STATUS
(
AE_AML_NO_OPERAND
);
...
@@ -140,7 +139,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
...
@@ -140,7 +139,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
if
(
ACPI_GET_OBJECT_TYPE
(
local_obj_desc
)
!=
ACPI_TYPE_INTEGER
)
{
if
(
ACPI_GET_OBJECT_TYPE
(
local_obj_desc
)
!=
ACPI_TYPE_INTEGER
)
{
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Bad predicate (not an integer)
obj_d
esc=%p State=%p Type=%X"
,
"Bad predicate (not an integer)
ObjD
esc=%p State=%p Type=%X"
,
obj_desc
,
walk_state
,
obj_desc
,
walk_state
,
ACPI_GET_OBJECT_TYPE
(
obj_desc
)));
ACPI_GET_OBJECT_TYPE
(
obj_desc
)));
...
@@ -214,7 +213,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
...
@@ -214,7 +213,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
u32
opcode_class
;
u32
opcode_class
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_exec_begin_op"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ds_exec_begin_op
,
walk_state
);
op
=
walk_state
->
op
;
op
=
walk_state
->
op
;
if
(
!
op
)
{
if
(
!
op
)
{
...
@@ -296,7 +295,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
...
@@ -296,7 +295,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
case
AML_CLASS_NAMED_OBJECT
:
case
AML_CLASS_NAMED_OBJECT
:
if
(
walk_state
->
walk_type
==
ACPI_WALK_METHOD
)
{
if
(
walk_state
->
walk_type
&
ACPI_WALK_METHOD
)
{
/*
/*
* Found a named object declaration during method execution;
* Found a named object declaration during method execution;
* we must enter this object into the namespace. The created
* we must enter this object into the namespace. The created
...
@@ -354,7 +353,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
...
@@ -354,7 +353,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
union
acpi_parse_object
*
next_op
;
union
acpi_parse_object
*
next_op
;
union
acpi_parse_object
*
first_arg
;
union
acpi_parse_object
*
first_arg
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_exec_end_op"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ds_exec_end_op
,
walk_state
);
op
=
walk_state
->
op
;
op
=
walk_state
->
op
;
op_type
=
walk_state
->
op_info
->
type
;
op_type
=
walk_state
->
op_info
->
type
;
...
@@ -409,6 +408,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
...
@@ -409,6 +408,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
* being the object_type and size_of operators.
* being the object_type and size_of operators.
*/
*/
if
(
!
(
walk_state
->
op_info
->
flags
&
AML_NO_OPERAND_RESOLVE
))
{
if
(
!
(
walk_state
->
op_info
->
flags
&
AML_NO_OPERAND_RESOLVE
))
{
/* Resolve all operands */
/* Resolve all operands */
status
=
acpi_ex_resolve_operands
(
walk_state
->
opcode
,
status
=
acpi_ex_resolve_operands
(
walk_state
->
opcode
,
...
@@ -423,7 +423,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
...
@@ -423,7 +423,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
acpi_ps_get_opcode_name
acpi_ps_get_opcode_name
(
walk_state
->
opcode
),
(
walk_state
->
opcode
),
walk_state
->
num_operands
,
walk_state
->
num_operands
,
"after
ex_resolve_o
perands"
);
"after
ExResolveO
perands"
);
}
}
}
}
...
@@ -437,7 +437,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
...
@@ -437,7 +437,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
acpi_gbl_op_type_dispatch
[
op_type
]
(
walk_state
);
acpi_gbl_op_type_dispatch
[
op_type
]
(
walk_state
);
}
else
{
}
else
{
/*
/*
* Treat constructs of the form "Store(
local_x,local_x
)" as noops when the
* Treat constructs of the form "Store(
LocalX,LocalX
)" as noops when the
* Local is uninitialized.
* Local is uninitialized.
*/
*/
if
((
status
==
AE_AML_UNINITIALIZED_LOCAL
)
&&
if
((
status
==
AE_AML_UNINITIALIZED_LOCAL
)
&&
...
@@ -548,6 +548,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
...
@@ -548,6 +548,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
*/
*/
status
=
acpi_ds_resolve_operands
(
walk_state
);
status
=
acpi_ds_resolve_operands
(
walk_state
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
/* On error, clear all resolved operands */
/* On error, clear all resolved operands */
acpi_ds_clear_operands
(
walk_state
);
acpi_ds_clear_operands
(
walk_state
);
...
@@ -569,7 +570,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
...
@@ -569,7 +570,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
case
AML_TYPE_CREATE_FIELD
:
case
AML_TYPE_CREATE_FIELD
:
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Executing
create_f
ield Buffer/Index Op=%p
\n
"
,
"Executing
CreateF
ield Buffer/Index Op=%p
\n
"
,
op
));
op
));
status
=
acpi_ds_load2_end_op
(
walk_state
);
status
=
acpi_ds_load2_end_op
(
walk_state
);
...
@@ -584,7 +585,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
...
@@ -584,7 +585,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
case
AML_TYPE_CREATE_OBJECT
:
case
AML_TYPE_CREATE_OBJECT
:
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Executing
create_o
bject (Buffer/Package) Op=%p
\n
"
,
"Executing
CreateO
bject (Buffer/Package) Op=%p
\n
"
,
op
));
op
));
switch
(
op
->
common
.
parent
->
common
.
aml_opcode
)
{
switch
(
op
->
common
.
parent
->
common
.
aml_opcode
)
{
...
@@ -657,7 +658,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
...
@@ -657,7 +658,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
if
(
op
->
common
.
aml_opcode
==
AML_REGION_OP
)
{
if
(
op
->
common
.
aml_opcode
==
AML_REGION_OP
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Executing
op_r
egion Address/Length Op=%p
\n
"
,
"Executing
OpR
egion Address/Length Op=%p
\n
"
,
op
));
op
));
status
=
status
=
...
@@ -722,6 +723,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
...
@@ -722,6 +723,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
cleanup:
cleanup:
if
(
walk_state
->
result_obj
)
{
if
(
walk_state
->
result_obj
)
{
/* Break to debugger to display result */
/* Break to debugger to display result */
ACPI_DEBUGGER_EXEC
(
acpi_db_display_result_object
ACPI_DEBUGGER_EXEC
(
acpi_db_display_result_object
...
...
drivers/acpi/dispatcher/dswload.c
浏览文件 @
b3899c66
...
@@ -127,7 +127,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
...
@@ -127,7 +127,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
char
*
path
;
char
*
path
;
u32
flags
;
u32
flags
;
ACPI_FUNCTION_TRACE
(
"ds_load1_begin_op"
);
ACPI_FUNCTION_TRACE
(
ds_load1_begin_op
);
op
=
walk_state
->
op
;
op
=
walk_state
->
op
;
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Op=%p State=%p
\n
"
,
op
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Op=%p State=%p
\n
"
,
op
,
...
@@ -178,12 +178,12 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
...
@@ -178,12 +178,12 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
* Target of Scope() not found. Generate an External for it, and
* Target of Scope() not found. Generate an External for it, and
* insert the name into the namespace.
* insert the name into the namespace.
*/
*/
acpi_dm_add_to_external_list
(
path
);
acpi_dm_add_to_external_list
(
path
,
ACPI_TYPE_DEVICE
,
0
);
status
=
status
=
acpi_ns_lookup
(
walk_state
->
scope_info
,
path
,
acpi_ns_lookup
(
walk_state
->
scope_info
,
path
,
object_type
,
ACPI_IMODE_LOAD_PASS1
,
object_type
,
ACPI_IMODE_LOAD_PASS1
,
ACPI_NS_SEARCH_PARENT
,
walk_state
,
ACPI_NS_SEARCH_PARENT
,
walk_state
,
&
(
node
)
);
&
node
);
}
}
#endif
#endif
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
...
@@ -261,6 +261,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
...
@@ -261,6 +261,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
*/
*/
if
(
walk_state
->
deferred_node
)
{
if
(
walk_state
->
deferred_node
)
{
/* This name is already in the namespace, get the node */
/* This name is already in the namespace, get the node */
node
=
walk_state
->
deferred_node
;
node
=
walk_state
->
deferred_node
;
...
@@ -300,10 +301,41 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
...
@@ -300,10 +301,41 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
status
=
status
=
acpi_ns_lookup
(
walk_state
->
scope_info
,
path
,
object_type
,
acpi_ns_lookup
(
walk_state
->
scope_info
,
path
,
object_type
,
ACPI_IMODE_LOAD_PASS1
,
flags
,
walk_state
,
ACPI_IMODE_LOAD_PASS1
,
flags
,
walk_state
,
&
(
node
)
);
&
node
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_ERROR_NAMESPACE
(
path
,
status
);
if
(
status
==
AE_ALREADY_EXISTS
)
{
return_ACPI_STATUS
(
status
);
/* The name already exists in this scope */
if
(
node
->
flags
&
ANOBJ_IS_EXTERNAL
)
{
/*
* Allow one create on an object or segment that was
* previously declared External
*/
node
->
flags
&=
~
ANOBJ_IS_EXTERNAL
;
node
->
type
=
(
u8
)
object_type
;
/* Just retyped a node, probably will need to open a scope */
if
(
acpi_ns_opens_scope
(
object_type
))
{
status
=
acpi_ds_scope_stack_push
(
node
,
object_type
,
walk_state
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
}
status
=
AE_OK
;
}
}
if
(
ACPI_FAILURE
(
status
))
{
ACPI_ERROR_NAMESPACE
(
path
,
status
);
return_ACPI_STATUS
(
status
);
}
}
}
break
;
break
;
}
}
...
@@ -311,6 +343,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
...
@@ -311,6 +343,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
/* Common exit */
/* Common exit */
if
(
!
op
)
{
if
(
!
op
)
{
/* Create a new op */
/* Create a new op */
op
=
acpi_ps_alloc_op
(
walk_state
->
opcode
);
op
=
acpi_ps_alloc_op
(
walk_state
->
opcode
);
...
@@ -359,7 +392,7 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
...
@@ -359,7 +392,7 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
acpi_object_type
object_type
;
acpi_object_type
object_type
;
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE
(
"ds_load1_end_op"
);
ACPI_FUNCTION_TRACE
(
ds_load1_end_op
);
op
=
walk_state
->
op
;
op
=
walk_state
->
op
;
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Op=%p State=%p
\n
"
,
op
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Op=%p State=%p
\n
"
,
op
,
...
@@ -413,6 +446,7 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
...
@@ -413,6 +446,7 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
#endif
#endif
if
(
op
->
common
.
aml_opcode
==
AML_NAME_OP
)
{
if
(
op
->
common
.
aml_opcode
==
AML_NAME_OP
)
{
/* For Name opcode, get the object type from the argument */
/* For Name opcode, get the object type from the argument */
if
(
op
->
common
.
value
.
arg
)
{
if
(
op
->
common
.
value
.
arg
)
{
...
@@ -445,7 +479,7 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
...
@@ -445,7 +479,7 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
* arguments.)
* arguments.)
*/
*/
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"LOADING-Method: State=%p Op=%p
named_o
bj=%p
\n
"
,
"LOADING-Method: State=%p Op=%p
NamedO
bj=%p
\n
"
,
walk_state
,
op
,
op
->
named
.
node
));
walk_state
,
op
,
op
->
named
.
node
));
if
(
!
acpi_ns_get_attached_object
(
op
->
named
.
node
))
{
if
(
!
acpi_ns_get_attached_object
(
op
->
named
.
node
))
{
...
@@ -511,7 +545,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
...
@@ -511,7 +545,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
acpi_object_type
object_type
;
acpi_object_type
object_type
;
char
*
buffer_ptr
;
char
*
buffer_ptr
;
ACPI_FUNCTION_TRACE
(
"ds_load2_begin_op"
);
ACPI_FUNCTION_TRACE
(
ds_load2_begin_op
);
op
=
walk_state
->
op
;
op
=
walk_state
->
op
;
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Op=%p State=%p
\n
"
,
op
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Op=%p State=%p
\n
"
,
op
,
...
@@ -521,6 +555,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
...
@@ -521,6 +555,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
if
((
walk_state
->
control_state
)
&&
if
((
walk_state
->
control_state
)
&&
(
walk_state
->
control_state
->
common
.
state
==
(
walk_state
->
control_state
->
common
.
state
==
ACPI_CONTROL_CONDITIONAL_EXECUTING
))
{
ACPI_CONTROL_CONDITIONAL_EXECUTING
))
{
/* We are executing a while loop outside of a method */
/* We are executing a while loop outside of a method */
status
=
acpi_ds_exec_begin_op
(
walk_state
,
out_op
);
status
=
acpi_ds_exec_begin_op
(
walk_state
,
out_op
);
...
@@ -554,10 +589,12 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
...
@@ -554,10 +589,12 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
/* Get the name we are going to enter or lookup in the namespace */
/* Get the name we are going to enter or lookup in the namespace */
if
(
walk_state
->
opcode
==
AML_INT_NAMEPATH_OP
)
{
if
(
walk_state
->
opcode
==
AML_INT_NAMEPATH_OP
)
{
/* For Namepath op, get the path string */
/* For Namepath op, get the path string */
buffer_ptr
=
op
->
common
.
value
.
string
;
buffer_ptr
=
op
->
common
.
value
.
string
;
if
(
!
buffer_ptr
)
{
if
(
!
buffer_ptr
)
{
/* No name, just exit */
/* No name, just exit */
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -680,6 +717,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
...
@@ -680,6 +717,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
/* All other opcodes */
/* All other opcodes */
if
(
op
&&
op
->
common
.
node
)
{
if
(
op
&&
op
->
common
.
node
)
{
/* This op/node was previously entered into the namespace */
/* This op/node was previously entered into the namespace */
node
=
op
->
common
.
node
;
node
=
op
->
common
.
node
;
...
@@ -705,6 +743,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
...
@@ -705,6 +743,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
* Note: Name may already exist if we are executing a deferred opcode.
* Note: Name may already exist if we are executing a deferred opcode.
*/
*/
if
(
walk_state
->
deferred_node
)
{
if
(
walk_state
->
deferred_node
)
{
/* This name is already in the namespace, get the node */
/* This name is already in the namespace, get the node */
node
=
walk_state
->
deferred_node
;
node
=
walk_state
->
deferred_node
;
...
@@ -727,6 +766,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
...
@@ -727,6 +766,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
}
}
if
(
!
op
)
{
if
(
!
op
)
{
/* Create a new op */
/* Create a new op */
op
=
acpi_ps_alloc_op
(
walk_state
->
opcode
);
op
=
acpi_ps_alloc_op
(
walk_state
->
opcode
);
...
@@ -776,7 +816,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
...
@@ -776,7 +816,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
u32
i
;
u32
i
;
#endif
#endif
ACPI_FUNCTION_TRACE
(
"ds_load2_end_op"
);
ACPI_FUNCTION_TRACE
(
ds_load2_end_op
);
op
=
walk_state
->
op
;
op
=
walk_state
->
op
;
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Opcode [%s] Op %p State %p
\n
"
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Opcode [%s] Op %p State %p
\n
"
,
...
@@ -870,7 +910,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
...
@@ -870,7 +910,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
*/
*/
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"Create-Load [%s] State=%p Op=%p
named_o
bj=%p
\n
"
,
"Create-Load [%s] State=%p Op=%p
NamedO
bj=%p
\n
"
,
acpi_ps_get_opcode_name
(
op
->
common
.
aml_opcode
),
acpi_ps_get_opcode_name
(
op
->
common
.
aml_opcode
),
walk_state
,
op
,
node
));
walk_state
,
op
,
node
));
...
@@ -1045,7 +1085,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
...
@@ -1045,7 +1085,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
* arguments.)
* arguments.)
*/
*/
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"LOADING-Method: State=%p Op=%p
named_o
bj=%p
\n
"
,
"LOADING-Method: State=%p Op=%p
NamedO
bj=%p
\n
"
,
walk_state
,
op
,
op
->
named
.
node
));
walk_state
,
op
,
op
->
named
.
node
));
if
(
!
acpi_ns_get_attached_object
(
op
->
named
.
node
))
{
if
(
!
acpi_ns_get_attached_object
(
op
->
named
.
node
))
{
...
@@ -1090,7 +1130,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
...
@@ -1090,7 +1130,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
case
AML_CLASS_METHOD_CALL
:
case
AML_CLASS_METHOD_CALL
:
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
ACPI_DEBUG_PRINT
((
ACPI_DB_DISPATCH
,
"RESOLVING-
method_call: State=%p Op=%p named_o
bj=%p
\n
"
,
"RESOLVING-
MethodCall: State=%p Op=%p NamedO
bj=%p
\n
"
,
walk_state
,
op
,
node
));
walk_state
,
op
,
node
));
/*
/*
...
@@ -1104,7 +1144,6 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
...
@@ -1104,7 +1144,6 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
ACPI_NS_DONT_OPEN_SCOPE
,
walk_state
,
ACPI_NS_DONT_OPEN_SCOPE
,
walk_state
,
&
(
new_node
));
&
(
new_node
));
if
(
ACPI_SUCCESS
(
status
))
{
if
(
ACPI_SUCCESS
(
status
))
{
/*
/*
* Make sure that what we found is indeed a method
* Make sure that what we found is indeed a method
* We didn't search for a method on purpose, to see if the name
* We didn't search for a method on purpose, to see if the name
...
...
drivers/acpi/dispatcher/dswscope.c
浏览文件 @
b3899c66
...
@@ -63,9 +63,10 @@ void acpi_ds_scope_stack_clear(struct acpi_walk_state *walk_state)
...
@@ -63,9 +63,10 @@ void acpi_ds_scope_stack_clear(struct acpi_walk_state *walk_state)
{
{
union
acpi_generic_state
*
scope_info
;
union
acpi_generic_state
*
scope_info
;
ACPI_FUNCTION_NAME
(
"ds_scope_stack_clear"
);
ACPI_FUNCTION_NAME
(
ds_scope_stack_clear
);
while
(
walk_state
->
scope_info
)
{
while
(
walk_state
->
scope_info
)
{
/* Pop a scope off the stack */
/* Pop a scope off the stack */
scope_info
=
walk_state
->
scope_info
;
scope_info
=
walk_state
->
scope_info
;
...
@@ -102,9 +103,10 @@ acpi_ds_scope_stack_push(struct acpi_namespace_node *node,
...
@@ -102,9 +103,10 @@ acpi_ds_scope_stack_push(struct acpi_namespace_node *node,
union
acpi_generic_state
*
scope_info
;
union
acpi_generic_state
*
scope_info
;
union
acpi_generic_state
*
old_scope_info
;
union
acpi_generic_state
*
old_scope_info
;
ACPI_FUNCTION_TRACE
(
"ds_scope_stack_push"
);
ACPI_FUNCTION_TRACE
(
ds_scope_stack_push
);
if
(
!
node
)
{
if
(
!
node
)
{
/* Invalid scope */
/* Invalid scope */
ACPI_ERROR
((
AE_INFO
,
"Null scope parameter"
));
ACPI_ERROR
((
AE_INFO
,
"Null scope parameter"
));
...
@@ -126,7 +128,7 @@ acpi_ds_scope_stack_push(struct acpi_namespace_node *node,
...
@@ -126,7 +128,7 @@ acpi_ds_scope_stack_push(struct acpi_namespace_node *node,
/* Init new scope object */
/* Init new scope object */
scope_info
->
common
.
d
ata
_type
=
ACPI_DESC_TYPE_STATE_WSCOPE
;
scope_info
->
common
.
d
escriptor
_type
=
ACPI_DESC_TYPE_STATE_WSCOPE
;
scope_info
->
scope
.
node
=
node
;
scope_info
->
scope
.
node
=
node
;
scope_info
->
common
.
value
=
(
u16
)
type
;
scope_info
->
common
.
value
=
(
u16
)
type
;
...
@@ -176,7 +178,7 @@ acpi_status acpi_ds_scope_stack_pop(struct acpi_walk_state *walk_state)
...
@@ -176,7 +178,7 @@ acpi_status acpi_ds_scope_stack_pop(struct acpi_walk_state *walk_state)
union
acpi_generic_state
*
scope_info
;
union
acpi_generic_state
*
scope_info
;
union
acpi_generic_state
*
new_scope_info
;
union
acpi_generic_state
*
new_scope_info
;
ACPI_FUNCTION_TRACE
(
"ds_scope_stack_pop"
);
ACPI_FUNCTION_TRACE
(
ds_scope_stack_pop
);
/*
/*
* Pop scope info object off the stack.
* Pop scope info object off the stack.
...
...
drivers/acpi/dispatcher/dswstate.c
浏览文件 @
b3899c66
...
@@ -66,7 +66,6 @@ void *acpi_ds_obj_stack_get_value(u32 index,
...
@@ -66,7 +66,6 @@ void *acpi_ds_obj_stack_get_value(u32 index,
#endif
#endif
#ifdef ACPI_FUTURE_USAGE
#ifdef ACPI_FUTURE_USAGE
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: acpi_ds_result_remove
* FUNCTION: acpi_ds_result_remove
...
@@ -88,7 +87,7 @@ acpi_ds_result_remove(union acpi_operand_object **object,
...
@@ -88,7 +87,7 @@ acpi_ds_result_remove(union acpi_operand_object **object,
{
{
union
acpi_generic_state
*
state
;
union
acpi_generic_state
*
state
;
ACPI_FUNCTION_NAME
(
"ds_result_remove"
);
ACPI_FUNCTION_NAME
(
ds_result_remove
);
state
=
walk_state
->
results
;
state
=
walk_state
->
results
;
if
(
!
state
)
{
if
(
!
state
)
{
...
@@ -128,7 +127,6 @@ acpi_ds_result_remove(union acpi_operand_object **object,
...
@@ -128,7 +127,6 @@ acpi_ds_result_remove(union acpi_operand_object **object,
return
(
AE_OK
);
return
(
AE_OK
);
}
}
#endif
/* ACPI_FUTURE_USAGE */
#endif
/* ACPI_FUTURE_USAGE */
/*******************************************************************************
/*******************************************************************************
...
@@ -152,7 +150,7 @@ acpi_ds_result_pop(union acpi_operand_object ** object,
...
@@ -152,7 +150,7 @@ acpi_ds_result_pop(union acpi_operand_object ** object,
acpi_native_uint
index
;
acpi_native_uint
index
;
union
acpi_generic_state
*
state
;
union
acpi_generic_state
*
state
;
ACPI_FUNCTION_NAME
(
"ds_result_pop"
);
ACPI_FUNCTION_NAME
(
ds_result_pop
);
state
=
walk_state
->
results
;
state
=
walk_state
->
results
;
if
(
!
state
)
{
if
(
!
state
)
{
...
@@ -170,6 +168,7 @@ acpi_ds_result_pop(union acpi_operand_object ** object,
...
@@ -170,6 +168,7 @@ acpi_ds_result_pop(union acpi_operand_object ** object,
state
->
results
.
num_results
--
;
state
->
results
.
num_results
--
;
for
(
index
=
ACPI_OBJ_NUM_OPERANDS
;
index
;
index
--
)
{
for
(
index
=
ACPI_OBJ_NUM_OPERANDS
;
index
;
index
--
)
{
/* Check for a valid result object */
/* Check for a valid result object */
if
(
state
->
results
.
obj_desc
[
index
-
1
])
{
if
(
state
->
results
.
obj_desc
[
index
-
1
])
{
...
@@ -213,7 +212,7 @@ acpi_ds_result_pop_from_bottom(union acpi_operand_object ** object,
...
@@ -213,7 +212,7 @@ acpi_ds_result_pop_from_bottom(union acpi_operand_object ** object,
acpi_native_uint
index
;
acpi_native_uint
index
;
union
acpi_generic_state
*
state
;
union
acpi_generic_state
*
state
;
ACPI_FUNCTION_NAME
(
"ds_result_pop_from_bottom"
);
ACPI_FUNCTION_NAME
(
ds_result_pop_from_bottom
);
state
=
walk_state
->
results
;
state
=
walk_state
->
results
;
if
(
!
state
)
{
if
(
!
state
)
{
...
@@ -278,7 +277,7 @@ acpi_ds_result_push(union acpi_operand_object * object,
...
@@ -278,7 +277,7 @@ acpi_ds_result_push(union acpi_operand_object * object,
{
{
union
acpi_generic_state
*
state
;
union
acpi_generic_state
*
state
;
ACPI_FUNCTION_NAME
(
"ds_result_push"
);
ACPI_FUNCTION_NAME
(
ds_result_push
);
state
=
walk_state
->
results
;
state
=
walk_state
->
results
;
if
(
!
state
)
{
if
(
!
state
)
{
...
@@ -331,14 +330,14 @@ acpi_status acpi_ds_result_stack_push(struct acpi_walk_state * walk_state)
...
@@ -331,14 +330,14 @@ acpi_status acpi_ds_result_stack_push(struct acpi_walk_state * walk_state)
{
{
union
acpi_generic_state
*
state
;
union
acpi_generic_state
*
state
;
ACPI_FUNCTION_NAME
(
"ds_result_stack_push"
);
ACPI_FUNCTION_NAME
(
ds_result_stack_push
);
state
=
acpi_ut_create_generic_state
();
state
=
acpi_ut_create_generic_state
();
if
(
!
state
)
{
if
(
!
state
)
{
return
(
AE_NO_MEMORY
);
return
(
AE_NO_MEMORY
);
}
}
state
->
common
.
d
ata
_type
=
ACPI_DESC_TYPE_STATE_RESULT
;
state
->
common
.
d
escriptor
_type
=
ACPI_DESC_TYPE_STATE_RESULT
;
acpi_ut_push_generic_state
(
&
walk_state
->
results
,
state
);
acpi_ut_push_generic_state
(
&
walk_state
->
results
,
state
);
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Results=%p State=%p
\n
"
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Results=%p State=%p
\n
"
,
...
@@ -363,7 +362,7 @@ acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state * walk_state)
...
@@ -363,7 +362,7 @@ acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state * walk_state)
{
{
union
acpi_generic_state
*
state
;
union
acpi_generic_state
*
state
;
ACPI_FUNCTION_NAME
(
"ds_result_stack_pop"
);
ACPI_FUNCTION_NAME
(
ds_result_stack_pop
);
/* Check for stack underflow */
/* Check for stack underflow */
...
@@ -376,7 +375,7 @@ acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state * walk_state)
...
@@ -376,7 +375,7 @@ acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state * walk_state)
state
=
acpi_ut_pop_generic_state
(
&
walk_state
->
results
);
state
=
acpi_ut_pop_generic_state
(
&
walk_state
->
results
);
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Result=%p
remaining_r
esults=%X State=%p
\n
"
,
"Result=%p
RemainingR
esults=%X State=%p
\n
"
,
state
,
state
->
results
.
num_results
,
walk_state
));
state
,
state
->
results
.
num_results
,
walk_state
));
acpi_ut_delete_generic_state
(
state
);
acpi_ut_delete_generic_state
(
state
);
...
@@ -400,7 +399,7 @@ acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state * walk_state)
...
@@ -400,7 +399,7 @@ acpi_status acpi_ds_result_stack_pop(struct acpi_walk_state * walk_state)
acpi_status
acpi_status
acpi_ds_obj_stack_push
(
void
*
object
,
struct
acpi_walk_state
*
walk_state
)
acpi_ds_obj_stack_push
(
void
*
object
,
struct
acpi_walk_state
*
walk_state
)
{
{
ACPI_FUNCTION_NAME
(
"ds_obj_stack_push"
);
ACPI_FUNCTION_NAME
(
ds_obj_stack_push
);
/* Check for stack overflow */
/* Check for stack overflow */
...
@@ -445,9 +444,10 @@ acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state * walk_state)
...
@@ -445,9 +444,10 @@ acpi_ds_obj_stack_pop(u32 pop_count, struct acpi_walk_state * walk_state)
{
{
u32
i
;
u32
i
;
ACPI_FUNCTION_NAME
(
"ds_obj_stack_pop"
);
ACPI_FUNCTION_NAME
(
ds_obj_stack_pop
);
for
(
i
=
0
;
i
<
pop_count
;
i
++
)
{
for
(
i
=
0
;
i
<
pop_count
;
i
++
)
{
/* Check for stack underflow */
/* Check for stack underflow */
if
(
walk_state
->
num_operands
==
0
)
{
if
(
walk_state
->
num_operands
==
0
)
{
...
@@ -491,9 +491,10 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
...
@@ -491,9 +491,10 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
u32
i
;
u32
i
;
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
ACPI_FUNCTION_NAME
(
"ds_obj_stack_pop_and_delete"
);
ACPI_FUNCTION_NAME
(
ds_obj_stack_pop_and_delete
);
for
(
i
=
0
;
i
<
pop_count
;
i
++
)
{
for
(
i
=
0
;
i
<
pop_count
;
i
++
)
{
/* Check for stack underflow */
/* Check for stack underflow */
if
(
walk_state
->
num_operands
==
0
)
{
if
(
walk_state
->
num_operands
==
0
)
{
...
@@ -538,13 +539,13 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
...
@@ -538,13 +539,13 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,
struct
acpi_walk_state
*
acpi_ds_get_current_walk_state
(
struct
acpi_thread_state
struct
acpi_walk_state
*
acpi_ds_get_current_walk_state
(
struct
acpi_thread_state
*
thread
)
*
thread
)
{
{
ACPI_FUNCTION_NAME
(
"ds_get_current_walk_state"
);
ACPI_FUNCTION_NAME
(
ds_get_current_walk_state
);
if
(
!
thread
)
{
if
(
!
thread
)
{
return
(
NULL
);
return
(
NULL
);
}
}
ACPI_DEBUG_PRINT
((
ACPI_DB_PARSE
,
"Current
walk_s
tate %p
\n
"
,
ACPI_DEBUG_PRINT
((
ACPI_DB_PARSE
,
"Current
WalkS
tate %p
\n
"
,
thread
->
walk_state_list
));
thread
->
walk_state_list
));
return
(
thread
->
walk_state_list
);
return
(
thread
->
walk_state_list
);
...
@@ -567,7 +568,7 @@ void
...
@@ -567,7 +568,7 @@ void
acpi_ds_push_walk_state
(
struct
acpi_walk_state
*
walk_state
,
acpi_ds_push_walk_state
(
struct
acpi_walk_state
*
walk_state
,
struct
acpi_thread_state
*
thread
)
struct
acpi_thread_state
*
thread
)
{
{
ACPI_FUNCTION_TRACE
(
"ds_push_walk_state"
);
ACPI_FUNCTION_TRACE
(
ds_push_walk_state
);
walk_state
->
next
=
thread
->
walk_state_list
;
walk_state
->
next
=
thread
->
walk_state_list
;
thread
->
walk_state_list
=
walk_state
;
thread
->
walk_state_list
=
walk_state
;
...
@@ -593,11 +594,12 @@ struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state *thread)
...
@@ -593,11 +594,12 @@ struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state *thread)
{
{
struct
acpi_walk_state
*
walk_state
;
struct
acpi_walk_state
*
walk_state
;
ACPI_FUNCTION_TRACE
(
"ds_pop_walk_state"
);
ACPI_FUNCTION_TRACE
(
ds_pop_walk_state
);
walk_state
=
thread
->
walk_state_list
;
walk_state
=
thread
->
walk_state_list
;
if
(
walk_state
)
{
if
(
walk_state
)
{
/* Next walk state becomes the current walk state */
/* Next walk state becomes the current walk state */
thread
->
walk_state_list
=
walk_state
->
next
;
thread
->
walk_state_list
=
walk_state
->
next
;
...
@@ -618,7 +620,7 @@ struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state *thread)
...
@@ -618,7 +620,7 @@ struct acpi_walk_state *acpi_ds_pop_walk_state(struct acpi_thread_state *thread)
*
*
* PARAMETERS: owner_id - ID for object creation
* PARAMETERS: owner_id - ID for object creation
* Origin - Starting point for this walk
* Origin - Starting point for this walk
* m
th_desc
- Method object
* m
ethod_desc
- Method object
* Thread - Current thread state
* Thread - Current thread state
*
*
* RETURN: Pointer to the new walk state.
* RETURN: Pointer to the new walk state.
...
@@ -632,24 +634,24 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id,
...
@@ -632,24 +634,24 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id,
union
acpi_parse_object
union
acpi_parse_object
*
origin
,
*
origin
,
union
acpi_operand_object
union
acpi_operand_object
*
m
th
_desc
,
*
m
ethod
_desc
,
struct
acpi_thread_state
struct
acpi_thread_state
*
thread
)
*
thread
)
{
{
struct
acpi_walk_state
*
walk_state
;
struct
acpi_walk_state
*
walk_state
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ds_create_walk_state"
);
ACPI_FUNCTION_TRACE
(
ds_create_walk_state
);
walk_state
=
ACPI_
MEM_CALLOCATE
(
sizeof
(
struct
acpi_walk_state
));
walk_state
=
ACPI_
ALLOCATE_ZEROED
(
sizeof
(
struct
acpi_walk_state
));
if
(
!
walk_state
)
{
if
(
!
walk_state
)
{
return_PTR
(
NULL
);
return_PTR
(
NULL
);
}
}
walk_state
->
data_type
=
ACPI_DESC_TYPE_WALK
;
walk_state
->
descriptor_type
=
ACPI_DESC_TYPE_WALK
;
walk_state
->
method_desc
=
method_desc
;
walk_state
->
owner_id
=
owner_id
;
walk_state
->
owner_id
=
owner_id
;
walk_state
->
origin
=
origin
;
walk_state
->
origin
=
origin
;
walk_state
->
method_desc
=
mth_desc
;
walk_state
->
thread
=
thread
;
walk_state
->
thread
=
thread
;
walk_state
->
parser_state
.
start_op
=
origin
;
walk_state
->
parser_state
.
start_op
=
origin
;
...
@@ -664,7 +666,7 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id,
...
@@ -664,7 +666,7 @@ struct acpi_walk_state *acpi_ds_create_walk_state(acpi_owner_id owner_id,
status
=
acpi_ds_result_stack_push
(
walk_state
);
status
=
acpi_ds_result_stack_push
(
walk_state
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_
MEM_
FREE
(
walk_state
);
ACPI_FREE
(
walk_state
);
return_PTR
(
NULL
);
return_PTR
(
NULL
);
}
}
...
@@ -701,13 +703,13 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
...
@@ -701,13 +703,13 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
struct
acpi_namespace_node
*
method_node
,
struct
acpi_namespace_node
*
method_node
,
u8
*
aml_start
,
u8
*
aml_start
,
u32
aml_length
,
u32
aml_length
,
struct
acpi_
parameter
_info
*
info
,
u8
pass_number
)
struct
acpi_
evaluate
_info
*
info
,
u8
pass_number
)
{
{
acpi_status
status
;
acpi_status
status
;
struct
acpi_parse_state
*
parser_state
=
&
walk_state
->
parser_state
;
struct
acpi_parse_state
*
parser_state
=
&
walk_state
->
parser_state
;
union
acpi_parse_object
*
extra_op
;
union
acpi_parse_object
*
extra_op
;
ACPI_FUNCTION_TRACE
(
"ds_init_aml_walk"
);
ACPI_FUNCTION_TRACE
(
ds_init_aml_walk
);
walk_state
->
parser_state
.
aml
=
walk_state
->
parser_state
.
aml
=
walk_state
->
parser_state
.
aml_start
=
aml_start
;
walk_state
->
parser_state
.
aml_start
=
aml_start
;
...
@@ -778,6 +780,7 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
...
@@ -778,6 +780,7 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
}
}
if
(
parser_state
->
start_node
)
{
if
(
parser_state
->
start_node
)
{
/* Push start scope on scope stack and make it current */
/* Push start scope on scope stack and make it current */
status
=
status
=
...
@@ -810,21 +813,24 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state)
...
@@ -810,21 +813,24 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state)
{
{
union
acpi_generic_state
*
state
;
union
acpi_generic_state
*
state
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_delete_walk_state"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ds_delete_walk_state
,
walk_state
);
if
(
!
walk_state
)
{
if
(
!
walk_state
)
{
return
;
return
;
}
}
if
(
walk_state
->
d
ata
_type
!=
ACPI_DESC_TYPE_WALK
)
{
if
(
walk_state
->
d
escriptor
_type
!=
ACPI_DESC_TYPE_WALK
)
{
ACPI_ERROR
((
AE_INFO
,
"%p is not a valid walk state"
,
ACPI_ERROR
((
AE_INFO
,
"%p is not a valid walk state"
,
walk_state
));
walk_state
));
return
;
return
;
}
}
/* There should not be any open scopes */
if
(
walk_state
->
parser_state
.
scope
)
{
if
(
walk_state
->
parser_state
.
scope
)
{
ACPI_ERROR
((
AE_INFO
,
"%p walk still has a scope list"
,
ACPI_ERROR
((
AE_INFO
,
"%p walk still has a scope list"
,
walk_state
));
walk_state
));
acpi_ps_cleanup_scope
(
&
walk_state
->
parser_state
);
}
}
/* Always must free any linked control states */
/* Always must free any linked control states */
...
@@ -854,7 +860,7 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state)
...
@@ -854,7 +860,7 @@ void acpi_ds_delete_walk_state(struct acpi_walk_state *walk_state)
acpi_ut_delete_generic_state
(
state
);
acpi_ut_delete_generic_state
(
state
);
}
}
ACPI_
MEM_
FREE
(
walk_state
);
ACPI_FREE
(
walk_state
);
return_VOID
;
return_VOID
;
}
}
...
@@ -879,7 +885,7 @@ acpi_ds_result_insert(void *object,
...
@@ -879,7 +885,7 @@ acpi_ds_result_insert(void *object,
{
{
union
acpi_generic_state
*
state
;
union
acpi_generic_state
*
state
;
ACPI_FUNCTION_NAME
(
"ds_result_insert"
);
ACPI_FUNCTION_NAME
(
ds_result_insert
);
state
=
walk_state
->
results
;
state
=
walk_state
->
results
;
if
(
!
state
)
{
if
(
!
state
)
{
...
@@ -937,7 +943,7 @@ acpi_status acpi_ds_obj_stack_delete_all(struct acpi_walk_state * walk_state)
...
@@ -937,7 +943,7 @@ acpi_status acpi_ds_obj_stack_delete_all(struct acpi_walk_state * walk_state)
{
{
u32
i
;
u32
i
;
ACPI_FUNCTION_TRACE_PTR
(
"ds_obj_stack_delete_all"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ds_obj_stack_delete_all
,
walk_state
);
/* The stack size is configurable, but fixed */
/* The stack size is configurable, but fixed */
...
@@ -969,7 +975,7 @@ acpi_status
...
@@ -969,7 +975,7 @@ acpi_status
acpi_ds_obj_stack_pop_object
(
union
acpi_operand_object
**
object
,
acpi_ds_obj_stack_pop_object
(
union
acpi_operand_object
**
object
,
struct
acpi_walk_state
*
walk_state
)
struct
acpi_walk_state
*
walk_state
)
{
{
ACPI_FUNCTION_NAME
(
"ds_obj_stack_pop_object"
);
ACPI_FUNCTION_NAME
(
ds_obj_stack_pop_object
);
/* Check for stack underflow */
/* Check for stack underflow */
...
@@ -1025,7 +1031,7 @@ acpi_ds_obj_stack_pop_object(union acpi_operand_object **object,
...
@@ -1025,7 +1031,7 @@ acpi_ds_obj_stack_pop_object(union acpi_operand_object **object,
void
*
acpi_ds_obj_stack_get_value
(
u32
index
,
struct
acpi_walk_state
*
walk_state
)
void
*
acpi_ds_obj_stack_get_value
(
u32
index
,
struct
acpi_walk_state
*
walk_state
)
{
{
ACPI_FUNCTION_TRACE_PTR
(
"ds_obj_stack_get_value"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ds_obj_stack_get_value
,
walk_state
);
/* Can't do it if the stack is empty */
/* Can't do it if the stack is empty */
...
...
drivers/acpi/ec.c
浏览文件 @
b3899c66
...
@@ -763,8 +763,7 @@ static u32 acpi_ec_gpe_poll_handler(void *data)
...
@@ -763,8 +763,7 @@ static u32 acpi_ec_gpe_poll_handler(void *data)
acpi_disable_gpe
(
NULL
,
ec
->
common
.
gpe_bit
,
ACPI_ISR
);
acpi_disable_gpe
(
NULL
,
ec
->
common
.
gpe_bit
,
ACPI_ISR
);
status
=
acpi_os_queue_for_execution
(
OSD_PRIORITY_GPE
,
status
=
acpi_os_execute
(
OSL_EC_POLL_HANDLER
,
acpi_ec_gpe_query
,
ec
);
acpi_ec_gpe_query
,
ec
);
if
(
status
==
AE_OK
)
if
(
status
==
AE_OK
)
return
ACPI_INTERRUPT_HANDLED
;
return
ACPI_INTERRUPT_HANDLED
;
...
@@ -799,7 +798,7 @@ static u32 acpi_ec_gpe_intr_handler(void *data)
...
@@ -799,7 +798,7 @@ static u32 acpi_ec_gpe_intr_handler(void *data)
if
(
value
&
ACPI_EC_FLAG_SCI
)
{
if
(
value
&
ACPI_EC_FLAG_SCI
)
{
atomic_add
(
1
,
&
ec
->
intr
.
pending_gpe
);
atomic_add
(
1
,
&
ec
->
intr
.
pending_gpe
);
status
=
acpi_os_
queue_for_execution
(
OSD_PRIORITY_GPE
,
status
=
acpi_os_
execute
(
OSL_EC_BURST_HANDLER
,
acpi_ec_gpe_query
,
ec
);
acpi_ec_gpe_query
,
ec
);
return
status
==
AE_OK
?
return
status
==
AE_OK
?
ACPI_INTERRUPT_HANDLED
:
ACPI_INTERRUPT_NOT_HANDLED
;
ACPI_INTERRUPT_HANDLED
:
ACPI_INTERRUPT_NOT_HANDLED
;
...
...
drivers/acpi/events/evevent.c
浏览文件 @
b3899c66
...
@@ -68,7 +68,7 @@ acpi_status acpi_ev_initialize_events(void)
...
@@ -68,7 +68,7 @@ acpi_status acpi_ev_initialize_events(void)
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_initialize_events"
);
ACPI_FUNCTION_TRACE
(
ev_initialize_events
);
/* Make sure we have ACPI tables */
/* Make sure we have ACPI tables */
...
@@ -118,7 +118,7 @@ acpi_status acpi_ev_install_fadt_gpes(void)
...
@@ -118,7 +118,7 @@ acpi_status acpi_ev_install_fadt_gpes(void)
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_install_fadt_gpes"
);
ACPI_FUNCTION_TRACE
(
ev_install_fadt_gpes
);
/* Namespace must be locked */
/* Namespace must be locked */
...
@@ -157,7 +157,7 @@ acpi_status acpi_ev_install_xrupt_handlers(void)
...
@@ -157,7 +157,7 @@ acpi_status acpi_ev_install_xrupt_handlers(void)
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_install_xrupt_handlers"
);
ACPI_FUNCTION_TRACE
(
ev_install_xrupt_handlers
);
/* Install the SCI handler */
/* Install the SCI handler */
...
@@ -241,7 +241,7 @@ u32 acpi_ev_fixed_event_detect(void)
...
@@ -241,7 +241,7 @@ u32 acpi_ev_fixed_event_detect(void)
u32
fixed_enable
;
u32
fixed_enable
;
acpi_native_uint
i
;
acpi_native_uint
i
;
ACPI_FUNCTION_NAME
(
"ev_fixed_event_detect"
);
ACPI_FUNCTION_NAME
(
ev_fixed_event_detect
);
/*
/*
* Read the fixed feature status and enable registers, as all the cases
* Read the fixed feature status and enable registers, as all the cases
...
@@ -260,12 +260,14 @@ u32 acpi_ev_fixed_event_detect(void)
...
@@ -260,12 +260,14 @@ u32 acpi_ev_fixed_event_detect(void)
* Check for all possible Fixed Events and dispatch those that are active
* Check for all possible Fixed Events and dispatch those that are active
*/
*/
for
(
i
=
0
;
i
<
ACPI_NUM_FIXED_EVENTS
;
i
++
)
{
for
(
i
=
0
;
i
<
ACPI_NUM_FIXED_EVENTS
;
i
++
)
{
/* Both the status and enable bits must be on for this event */
/* Both the status and enable bits must be on for this event */
if
((
fixed_status
&
acpi_gbl_fixed_event_info
[
i
].
if
((
fixed_status
&
acpi_gbl_fixed_event_info
[
i
].
status_bit_mask
)
status_bit_mask
)
&&
(
fixed_enable
&
acpi_gbl_fixed_event_info
[
i
].
&&
(
fixed_enable
&
acpi_gbl_fixed_event_info
[
i
].
enable_bit_mask
))
{
enable_bit_mask
))
{
/* Found an active (signalled) event */
/* Found an active (signalled) event */
int_status
|=
acpi_ev_fixed_event_dispatch
((
u32
)
i
);
int_status
|=
acpi_ev_fixed_event_dispatch
((
u32
)
i
);
...
...
drivers/acpi/events/evgpe.c
浏览文件 @
b3899c66
...
@@ -69,7 +69,7 @@ acpi_ev_set_gpe_type(struct acpi_gpe_event_info *gpe_event_info, u8 type)
...
@@ -69,7 +69,7 @@ acpi_ev_set_gpe_type(struct acpi_gpe_event_info *gpe_event_info, u8 type)
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_set_gpe_type"
);
ACPI_FUNCTION_TRACE
(
ev_set_gpe_type
);
/* Validate type and update register enable masks */
/* Validate type and update register enable masks */
...
@@ -115,7 +115,7 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info,
...
@@ -115,7 +115,7 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info,
struct
acpi_gpe_register_info
*
gpe_register_info
;
struct
acpi_gpe_register_info
*
gpe_register_info
;
u8
register_bit
;
u8
register_bit
;
ACPI_FUNCTION_TRACE
(
"ev_update_gpe_enable_masks"
);
ACPI_FUNCTION_TRACE
(
ev_update_gpe_enable_masks
);
gpe_register_info
=
gpe_event_info
->
register_info
;
gpe_register_info
=
gpe_event_info
->
register_info
;
if
(
!
gpe_register_info
)
{
if
(
!
gpe_register_info
)
{
...
@@ -178,7 +178,7 @@ acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info,
...
@@ -178,7 +178,7 @@ acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info,
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_enable_gpe"
);
ACPI_FUNCTION_TRACE
(
ev_enable_gpe
);
/* Make sure HW enable masks are updated */
/* Make sure HW enable masks are updated */
...
@@ -207,6 +207,7 @@ acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info,
...
@@ -207,6 +207,7 @@ acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info,
ACPI_SET_BIT
(
gpe_event_info
->
flags
,
ACPI_GPE_RUN_ENABLED
);
ACPI_SET_BIT
(
gpe_event_info
->
flags
,
ACPI_GPE_RUN_ENABLED
);
if
(
write_to_hardware
)
{
if
(
write_to_hardware
)
{
/* Clear the GPE (of stale events), then enable it */
/* Clear the GPE (of stale events), then enable it */
status
=
acpi_hw_clear_gpe
(
gpe_event_info
);
status
=
acpi_hw_clear_gpe
(
gpe_event_info
);
...
@@ -243,7 +244,7 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info)
...
@@ -243,7 +244,7 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info)
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_disable_gpe"
);
ACPI_FUNCTION_TRACE
(
ev_disable_gpe
);
if
(
!
(
gpe_event_info
->
flags
&
ACPI_GPE_ENABLE_MASK
))
{
if
(
!
(
gpe_event_info
->
flags
&
ACPI_GPE_ENABLE_MASK
))
{
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -313,6 +314,7 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
...
@@ -313,6 +314,7 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
/* A NULL gpe_block means use the FADT-defined GPE block(s) */
/* A NULL gpe_block means use the FADT-defined GPE block(s) */
if
(
!
gpe_device
)
{
if
(
!
gpe_device
)
{
/* Examine GPE Block 0 and 1 (These blocks are permanent) */
/* Examine GPE Block 0 and 1 (These blocks are permanent) */
for
(
i
=
0
;
i
<
ACPI_MAX_GPE_BLOCKS
;
i
++
)
{
for
(
i
=
0
;
i
<
ACPI_MAX_GPE_BLOCKS
;
i
++
)
{
...
@@ -380,10 +382,11 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
...
@@ -380,10 +382,11 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
u32
status_reg
;
u32
status_reg
;
u32
enable_reg
;
u32
enable_reg
;
acpi_cpu_flags
flags
;
acpi_cpu_flags
flags
;
acpi_cpu_flags
hw_flags
;
acpi_native_uint
i
;
acpi_native_uint
i
;
acpi_native_uint
j
;
acpi_native_uint
j
;
ACPI_FUNCTION_NAME
(
"ev_gpe_detect"
);
ACPI_FUNCTION_NAME
(
ev_gpe_detect
);
/* Check for the case where there are no GPEs */
/* Check for the case where there are no GPEs */
...
@@ -391,9 +394,12 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
...
@@ -391,9 +394,12 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
return
(
int_status
);
return
(
int_status
);
}
}
/*
Examine all GPE blocks attached to this interrupt level
*/
/*
We need to hold the GPE lock now, hardware lock in the loop
*/
flags
=
acpi_os_acquire_lock
(
acpi_gbl_gpe_lock
);
flags
=
acpi_os_acquire_lock
(
acpi_gbl_gpe_lock
);
/* Examine all GPE blocks attached to this interrupt level */
gpe_block
=
gpe_xrupt_list
->
gpe_block_list_head
;
gpe_block
=
gpe_xrupt_list
->
gpe_block_list_head
;
while
(
gpe_block
)
{
while
(
gpe_block
)
{
/*
/*
...
@@ -402,10 +408,13 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
...
@@ -402,10 +408,13 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
* Find all currently active GP events.
* Find all currently active GP events.
*/
*/
for
(
i
=
0
;
i
<
gpe_block
->
register_count
;
i
++
)
{
for
(
i
=
0
;
i
<
gpe_block
->
register_count
;
i
++
)
{
/* Get the next status/enable pair */
/* Get the next status/enable pair */
gpe_register_info
=
&
gpe_block
->
register_info
[
i
];
gpe_register_info
=
&
gpe_block
->
register_info
[
i
];
hw_flags
=
acpi_os_acquire_lock
(
acpi_gbl_hardware_lock
);
/* Read the Status Register */
/* Read the Status Register */
status
=
status
=
...
@@ -414,6 +423,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
...
@@ -414,6 +423,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
&
gpe_register_info
->
&
gpe_register_info
->
status_address
);
status_address
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
acpi_os_release_lock
(
acpi_gbl_hardware_lock
,
hw_flags
);
goto
unlock_and_exit
;
goto
unlock_and_exit
;
}
}
...
@@ -424,6 +435,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
...
@@ -424,6 +435,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
&
enable_reg
,
&
enable_reg
,
&
gpe_register_info
->
&
gpe_register_info
->
enable_address
);
enable_address
);
acpi_os_release_lock
(
acpi_gbl_hardware_lock
,
hw_flags
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
goto
unlock_and_exit
;
goto
unlock_and_exit
;
}
}
...
@@ -437,6 +450,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
...
@@ -437,6 +450,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
enabled_status_byte
=
(
u8
)
(
status_reg
&
enable_reg
);
enabled_status_byte
=
(
u8
)
(
status_reg
&
enable_reg
);
if
(
!
enabled_status_byte
)
{
if
(
!
enabled_status_byte
)
{
/* No active GPEs in this register, move on */
/* No active GPEs in this register, move on */
continue
;
continue
;
...
@@ -445,6 +459,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
...
@@ -445,6 +459,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
/* Now look at the individual GPEs in this byte register */
/* Now look at the individual GPEs in this byte register */
for
(
j
=
0
;
j
<
ACPI_GPE_REGISTER_WIDTH
;
j
++
)
{
for
(
j
=
0
;
j
<
ACPI_GPE_REGISTER_WIDTH
;
j
++
)
{
/* Examine one GPE bit */
/* Examine one GPE bit */
if
(
enabled_status_byte
&
if
(
enabled_status_byte
&
...
@@ -483,9 +498,9 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
...
@@ -483,9 +498,9 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
*
*
* RETURN: None
* RETURN: None
*
*
* DESCRIPTION: Perform the actual execution of a GPE control method.
This
* DESCRIPTION: Perform the actual execution of a GPE control method. This
* function is called from an invocation of acpi_os_
queue_for_execution
* function is called from an invocation of acpi_os_
execute and
*
(and therefore does NOT execute at interrupt level)
so that
*
therefore does NOT execute at interrupt level -
so that
* the control method itself is not executed in the context of
* the control method itself is not executed in the context of
* an interrupt handler.
* an interrupt handler.
*
*
...
@@ -494,12 +509,11 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
...
@@ -494,12 +509,11 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
static
void
ACPI_SYSTEM_XFACE
acpi_ev_asynch_execute_gpe_method
(
void
*
context
)
static
void
ACPI_SYSTEM_XFACE
acpi_ev_asynch_execute_gpe_method
(
void
*
context
)
{
{
struct
acpi_gpe_event_info
*
gpe_event_info
=
(
void
*
)
context
;
struct
acpi_gpe_event_info
*
gpe_event_info
=
(
void
*
)
context
;
u32
gpe_number
=
0
;
acpi_status
status
;
acpi_status
status
;
struct
acpi_gpe_event_info
local_gpe_event_info
;
struct
acpi_gpe_event_info
local_gpe_event_info
;
struct
acpi_
parameter_info
info
;
struct
acpi_
evaluate_info
*
info
;
ACPI_FUNCTION_TRACE
(
"ev_asynch_execute_gpe_method"
);
ACPI_FUNCTION_TRACE
(
ev_asynch_execute_gpe_method
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_EVENTS
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_EVENTS
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
...
@@ -535,22 +549,35 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
...
@@ -535,22 +549,35 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
*/
*/
if
((
local_gpe_event_info
.
flags
&
ACPI_GPE_DISPATCH_MASK
)
==
if
((
local_gpe_event_info
.
flags
&
ACPI_GPE_DISPATCH_MASK
)
==
ACPI_GPE_DISPATCH_METHOD
)
{
ACPI_GPE_DISPATCH_METHOD
)
{
/*
* Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx
* control method that corresponds to this GPE
*/
info
.
node
=
local_gpe_event_info
.
dispatch
.
method_node
;
info
.
parameters
=
ACPI_CAST_PTR
(
union
acpi_operand_object
*
,
gpe_event_info
);
info
.
parameter_type
=
ACPI_PARAM_GPE
;
status
=
acpi_ns_evaluate_by_handle
(
&
info
);
/* Allocate the evaluation information block */
info
=
ACPI_ALLOCATE_ZEROED
(
sizeof
(
struct
acpi_evaluate_info
));
if
(
!
info
)
{
status
=
AE_NO_MEMORY
;
}
else
{
/*
* Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx
* control method that corresponds to this GPE
*/
info
->
prefix_node
=
local_gpe_event_info
.
dispatch
.
method_node
;
info
->
parameters
=
ACPI_CAST_PTR
(
union
acpi_operand_object
*
,
gpe_event_info
);
info
->
parameter_type
=
ACPI_PARAM_GPE
;
info
->
flags
=
ACPI_IGNORE_RETURN_VALUE
;
status
=
acpi_ns_evaluate
(
info
);
ACPI_FREE
(
info
);
}
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"While evaluating
method [%4.4s] for GPE[%2X
]"
,
"While evaluating
GPE method [%4.4s
]"
,
acpi_ut_get_node_name
acpi_ut_get_node_name
(
local_gpe_event_info
.
dispatch
.
(
local_gpe_event_info
.
dispatch
.
method_node
)
,
gpe_number
));
method_node
)));
}
}
}
}
...
@@ -593,7 +620,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
...
@@ -593,7 +620,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_gpe_dispatch"
);
ACPI_FUNCTION_TRACE
(
ev_gpe_dispatch
);
/*
/*
* If edge-triggered, clear the GPE status bit now. Note that
* If edge-triggered, clear the GPE status bit now. Note that
...
@@ -669,9 +696,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
...
@@ -669,9 +696,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
* Execute the method associated with the GPE
* Execute the method associated with the GPE
* NOTE: Level-triggered GPEs are cleared after the method completes.
* NOTE: Level-triggered GPEs are cleared after the method completes.
*/
*/
status
=
acpi_os_
queue_for_execution
(
OSD_PRIORITY_GPE
,
status
=
acpi_os_
execute
(
OSL_GPE_HANDLER
,
acpi_ev_asynch_execute_gpe_method
,
acpi_ev_asynch_execute_gpe_method
,
gpe_event_info
);
gpe_event_info
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"Unable to queue handler for GPE[%2X] - event disabled"
,
"Unable to queue handler for GPE[%2X] - event disabled"
,
...
@@ -716,7 +743,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
...
@@ -716,7 +743,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
*
*
* DESCRIPTION: Determine if a a GPE is "wake-only".
* DESCRIPTION: Determine if a a GPE is "wake-only".
*
*
* Called from Notify() code in interpreter when a "
device_w
ake"
* Called from Notify() code in interpreter when a "
DeviceW
ake"
* Notify comes in.
* Notify comes in.
*
*
******************************************************************************/
******************************************************************************/
...
@@ -726,7 +753,7 @@ acpi_ev_check_for_wake_only_gpe(struct acpi_gpe_event_info *gpe_event_info)
...
@@ -726,7 +753,7 @@ acpi_ev_check_for_wake_only_gpe(struct acpi_gpe_event_info *gpe_event_info)
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_check_for_wake_only_gpe"
);
ACPI_FUNCTION_TRACE
(
ev_check_for_wake_only_gpe
);
if
((
gpe_event_info
)
&&
/* Only >0 for _Lxx/_Exx */
if
((
gpe_event_info
)
&&
/* Only >0 for _Lxx/_Exx */
((
gpe_event_info
->
flags
&
ACPI_GPE_SYSTEM_MASK
)
==
ACPI_GPE_SYSTEM_RUNNING
))
{
/* System state at GPE time */
((
gpe_event_info
->
flags
&
ACPI_GPE_SYSTEM_MASK
)
==
ACPI_GPE_SYSTEM_RUNNING
))
{
/* System state at GPE time */
...
...
drivers/acpi/events/evgpeblk.c
浏览文件 @
b3899c66
...
@@ -131,14 +131,14 @@ u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info)
...
@@ -131,14 +131,14 @@ u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info)
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_ev_walk_gpe_list
(
ACPI_GPE_CALLBACK
gpe_walk_callback
)
acpi_status
acpi_ev_walk_gpe_list
(
acpi_gpe_callback
gpe_walk_callback
)
{
{
struct
acpi_gpe_block_info
*
gpe_block
;
struct
acpi_gpe_block_info
*
gpe_block
;
struct
acpi_gpe_xrupt_info
*
gpe_xrupt_info
;
struct
acpi_gpe_xrupt_info
*
gpe_xrupt_info
;
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
acpi_cpu_flags
flags
;
acpi_cpu_flags
flags
;
ACPI_FUNCTION_TRACE
(
"ev_walk_gpe_list"
);
ACPI_FUNCTION_TRACE
(
ev_walk_gpe_list
);
flags
=
acpi_os_acquire_lock
(
acpi_gbl_gpe_lock
);
flags
=
acpi_os_acquire_lock
(
acpi_gbl_gpe_lock
);
...
@@ -146,10 +146,12 @@ acpi_status acpi_ev_walk_gpe_list(ACPI_GPE_CALLBACK gpe_walk_callback)
...
@@ -146,10 +146,12 @@ acpi_status acpi_ev_walk_gpe_list(ACPI_GPE_CALLBACK gpe_walk_callback)
gpe_xrupt_info
=
acpi_gbl_gpe_xrupt_list_head
;
gpe_xrupt_info
=
acpi_gbl_gpe_xrupt_list_head
;
while
(
gpe_xrupt_info
)
{
while
(
gpe_xrupt_info
)
{
/* Walk all Gpe Blocks attached to this interrupt level */
/* Walk all Gpe Blocks attached to this interrupt level */
gpe_block
=
gpe_xrupt_info
->
gpe_block_list_head
;
gpe_block
=
gpe_xrupt_info
->
gpe_block_list_head
;
while
(
gpe_block
)
{
while
(
gpe_block
)
{
/* One callback per GPE block */
/* One callback per GPE block */
status
=
gpe_walk_callback
(
gpe_xrupt_info
,
gpe_block
);
status
=
gpe_walk_callback
(
gpe_xrupt_info
,
gpe_block
);
...
@@ -190,11 +192,12 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
...
@@ -190,11 +192,12 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
acpi_native_uint
i
;
acpi_native_uint
i
;
acpi_native_uint
j
;
acpi_native_uint
j
;
ACPI_FUNCTION_TRACE
(
"ev_delete_gpe_handlers"
);
ACPI_FUNCTION_TRACE
(
ev_delete_gpe_handlers
);
/* Examine each GPE Register within the block */
/* Examine each GPE Register within the block */
for
(
i
=
0
;
i
<
gpe_block
->
register_count
;
i
++
)
{
for
(
i
=
0
;
i
<
gpe_block
->
register_count
;
i
++
)
{
/* Now look at the individual GPEs in this byte register */
/* Now look at the individual GPEs in this byte register */
for
(
j
=
0
;
j
<
ACPI_GPE_REGISTER_WIDTH
;
j
++
)
{
for
(
j
=
0
;
j
<
ACPI_GPE_REGISTER_WIDTH
;
j
++
)
{
...
@@ -204,7 +207,7 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
...
@@ -204,7 +207,7 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
if
((
gpe_event_info
->
flags
&
ACPI_GPE_DISPATCH_MASK
)
==
if
((
gpe_event_info
->
flags
&
ACPI_GPE_DISPATCH_MASK
)
==
ACPI_GPE_DISPATCH_HANDLER
)
{
ACPI_GPE_DISPATCH_HANDLER
)
{
ACPI_
MEM_
FREE
(
gpe_event_info
->
dispatch
.
handler
);
ACPI_FREE
(
gpe_event_info
->
dispatch
.
handler
);
gpe_event_info
->
dispatch
.
handler
=
NULL
;
gpe_event_info
->
dispatch
.
handler
=
NULL
;
gpe_event_info
->
flags
&=
gpe_event_info
->
flags
&=
~
ACPI_GPE_DISPATCH_MASK
;
~
ACPI_GPE_DISPATCH_MASK
;
...
@@ -248,7 +251,7 @@ acpi_ev_save_method_info(acpi_handle obj_handle,
...
@@ -248,7 +251,7 @@ acpi_ev_save_method_info(acpi_handle obj_handle,
u8
type
;
u8
type
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_save_method_info"
);
ACPI_FUNCTION_TRACE
(
ev_save_method_info
);
/*
/*
* _Lxx and _Exx GPE method support
* _Lxx and _Exx GPE method support
...
@@ -279,9 +282,9 @@ acpi_ev_save_method_info(acpi_handle obj_handle,
...
@@ -279,9 +282,9 @@ acpi_ev_save_method_info(acpi_handle obj_handle,
default:
default:
/* Unknown method type, just ignore it! */
/* Unknown method type, just ignore it! */
ACPI_
ERROR
((
AE_INFO
,
ACPI_
DEBUG_PRINT
((
ACPI_DB_LOAD
,
"U
nknown GPE method type: %s (name not of form _Lxx or _Exx)"
,
"Ignoring u
nknown GPE method type: %s (name not of form _Lxx or _Exx)"
,
name
));
name
));
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
}
}
...
@@ -289,11 +292,12 @@ acpi_ev_save_method_info(acpi_handle obj_handle,
...
@@ -289,11 +292,12 @@ acpi_ev_save_method_info(acpi_handle obj_handle,
gpe_number
=
ACPI_STRTOUL
(
&
name
[
2
],
NULL
,
16
);
gpe_number
=
ACPI_STRTOUL
(
&
name
[
2
],
NULL
,
16
);
if
(
gpe_number
==
ACPI_UINT32_MAX
)
{
if
(
gpe_number
==
ACPI_UINT32_MAX
)
{
/* Conversion failed; invalid method, just ignore it */
/* Conversion failed; invalid method, just ignore it */
ACPI_
ERROR
((
AE_INFO
,
ACPI_
DEBUG_PRINT
((
ACPI_DB_LOAD
,
"Could not extract GPE number from name: %s (name is not of form _Lxx or _Exx)"
,
"Could not extract GPE number from name: %s (name is not of form _Lxx or _Exx)"
,
name
));
name
));
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
}
}
...
@@ -364,13 +368,14 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle,
...
@@ -364,13 +368,14 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle,
u32
gpe_number
;
u32
gpe_number
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_match_prw_and_gpe"
);
ACPI_FUNCTION_TRACE
(
ev_match_prw_and_gpe
);
/* Check for a _PRW method under this device */
/* Check for a _PRW method under this device */
status
=
acpi_ut_evaluate_object
(
obj_handle
,
METHOD_NAME__PRW
,
status
=
acpi_ut_evaluate_object
(
obj_handle
,
METHOD_NAME__PRW
,
ACPI_BTYPE_PACKAGE
,
&
pkg_desc
);
ACPI_BTYPE_PACKAGE
,
&
pkg_desc
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
/* Ignore all errors from _PRW, we don't want to abort the subsystem */
/* Ignore all errors from _PRW, we don't want to abort the subsystem */
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -394,6 +399,7 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle,
...
@@ -394,6 +399,7 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle,
obj_desc
=
pkg_desc
->
package
.
elements
[
0
];
obj_desc
=
pkg_desc
->
package
.
elements
[
0
];
if
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
)
==
ACPI_TYPE_INTEGER
)
{
if
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
)
==
ACPI_TYPE_INTEGER
)
{
/* Use FADT-defined GPE device (from definition of _PRW) */
/* Use FADT-defined GPE device (from definition of _PRW) */
target_gpe_device
=
acpi_gbl_fadt_gpe_device
;
target_gpe_device
=
acpi_gbl_fadt_gpe_device
;
...
@@ -402,6 +408,7 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle,
...
@@ -402,6 +408,7 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle,
gpe_number
=
(
u32
)
obj_desc
->
integer
.
value
;
gpe_number
=
(
u32
)
obj_desc
->
integer
.
value
;
}
else
if
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
)
==
ACPI_TYPE_PACKAGE
)
{
}
else
if
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
)
==
ACPI_TYPE_PACKAGE
)
{
/* Package contains a GPE reference and GPE number within a GPE block */
/* Package contains a GPE reference and GPE number within a GPE block */
if
((
obj_desc
->
package
.
count
<
2
)
||
if
((
obj_desc
->
package
.
count
<
2
)
||
...
@@ -482,7 +489,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32
...
@@ -482,7 +489,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32
acpi_status
status
;
acpi_status
status
;
acpi_cpu_flags
flags
;
acpi_cpu_flags
flags
;
ACPI_FUNCTION_TRACE
(
"ev_get_gpe_xrupt_block"
);
ACPI_FUNCTION_TRACE
(
ev_get_gpe_xrupt_block
);
/* No need for lock since we are not changing any list elements here */
/* No need for lock since we are not changing any list elements here */
...
@@ -497,7 +504,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32
...
@@ -497,7 +504,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32
/* Not found, must allocate a new xrupt descriptor */
/* Not found, must allocate a new xrupt descriptor */
gpe_xrupt
=
ACPI_
MEM_CALLOCATE
(
sizeof
(
struct
acpi_gpe_xrupt_info
));
gpe_xrupt
=
ACPI_
ALLOCATE_ZEROED
(
sizeof
(
struct
acpi_gpe_xrupt_info
));
if
(
!
gpe_xrupt
)
{
if
(
!
gpe_xrupt
)
{
return_PTR
(
NULL
);
return_PTR
(
NULL
);
}
}
...
@@ -556,7 +563,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
...
@@ -556,7 +563,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
acpi_status
status
;
acpi_status
status
;
acpi_cpu_flags
flags
;
acpi_cpu_flags
flags
;
ACPI_FUNCTION_TRACE
(
"ev_delete_gpe_xrupt"
);
ACPI_FUNCTION_TRACE
(
ev_delete_gpe_xrupt
);
/* We never want to remove the SCI interrupt handler */
/* We never want to remove the SCI interrupt handler */
...
@@ -588,7 +595,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
...
@@ -588,7 +595,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
/* Free the block */
/* Free the block */
ACPI_
MEM_
FREE
(
gpe_xrupt
);
ACPI_FREE
(
gpe_xrupt
);
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
}
}
...
@@ -614,7 +621,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block,
...
@@ -614,7 +621,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block,
acpi_status
status
;
acpi_status
status
;
acpi_cpu_flags
flags
;
acpi_cpu_flags
flags
;
ACPI_FUNCTION_TRACE
(
"ev_install_gpe_block"
);
ACPI_FUNCTION_TRACE
(
ev_install_gpe_block
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_EVENTS
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_EVENTS
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
...
@@ -667,7 +674,7 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
...
@@ -667,7 +674,7 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
acpi_status
status
;
acpi_status
status
;
acpi_cpu_flags
flags
;
acpi_cpu_flags
flags
;
ACPI_FUNCTION_TRACE
(
"ev_install_gpe_block"
);
ACPI_FUNCTION_TRACE
(
ev_install_gpe_block
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_EVENTS
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_EVENTS
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
...
@@ -679,6 +686,7 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
...
@@ -679,6 +686,7 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
status
=
acpi_hw_disable_gpe_block
(
gpe_block
->
xrupt_block
,
gpe_block
);
status
=
acpi_hw_disable_gpe_block
(
gpe_block
->
xrupt_block
,
gpe_block
);
if
(
!
gpe_block
->
previous
&&
!
gpe_block
->
next
)
{
if
(
!
gpe_block
->
previous
&&
!
gpe_block
->
next
)
{
/* This is the last gpe_block on this interrupt */
/* This is the last gpe_block on this interrupt */
status
=
acpi_ev_delete_gpe_xrupt
(
gpe_block
->
xrupt_block
);
status
=
acpi_ev_delete_gpe_xrupt
(
gpe_block
->
xrupt_block
);
...
@@ -704,9 +712,9 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
...
@@ -704,9 +712,9 @@ acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
/* Free the gpe_block */
/* Free the gpe_block */
ACPI_
MEM_
FREE
(
gpe_block
->
register_info
);
ACPI_FREE
(
gpe_block
->
register_info
);
ACPI_
MEM_
FREE
(
gpe_block
->
event_info
);
ACPI_FREE
(
gpe_block
->
event_info
);
ACPI_
MEM_
FREE
(
gpe_block
);
ACPI_FREE
(
gpe_block
);
unlock_and_exit:
unlock_and_exit:
status
=
acpi_ut_release_mutex
(
ACPI_MTX_EVENTS
);
status
=
acpi_ut_release_mutex
(
ACPI_MTX_EVENTS
);
...
@@ -736,17 +744,17 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
...
@@ -736,17 +744,17 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
acpi_native_uint
j
;
acpi_native_uint
j
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_create_gpe_info_blocks"
);
ACPI_FUNCTION_TRACE
(
ev_create_gpe_info_blocks
);
/* Allocate the GPE register information block */
/* Allocate the GPE register information block */
gpe_register_info
=
ACPI_
MEM_CALLOCATE
((
acpi_size
)
gpe_block
->
gpe_register_info
=
ACPI_
ALLOCATE_ZEROED
((
acpi_size
)
gpe_block
->
register_count
*
register_count
*
sizeof
(
struct
sizeof
(
struct
acpi_gpe_register_info
));
acpi_gpe_register_info
));
if
(
!
gpe_register_info
)
{
if
(
!
gpe_register_info
)
{
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Could not allocate the
gpe_register_i
nfo table"
));
"Could not allocate the
GpeRegisterI
nfo table"
));
return_ACPI_STATUS
(
AE_NO_MEMORY
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
}
...
@@ -754,13 +762,14 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
...
@@ -754,13 +762,14 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
* Allocate the GPE event_info block. There are eight distinct GPEs
* Allocate the GPE event_info block. There are eight distinct GPEs
* per register. Initialization to zeros is sufficient.
* per register. Initialization to zeros is sufficient.
*/
*/
gpe_event_info
=
ACPI_MEM_CALLOCATE
(((
acpi_size
)
gpe_block
->
gpe_event_info
=
ACPI_ALLOCATE_ZEROED
(((
acpi_size
)
gpe_block
->
register_count
*
register_count
*
ACPI_GPE_REGISTER_WIDTH
)
*
ACPI_GPE_REGISTER_WIDTH
)
*
sizeof
(
struct
acpi_gpe_event_info
));
sizeof
(
struct
acpi_gpe_event_info
));
if
(
!
gpe_event_info
)
{
if
(
!
gpe_event_info
)
{
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Could not allocate the
gpe_event_i
nfo table"
));
"Could not allocate the
GpeEventI
nfo table"
));
status
=
AE_NO_MEMORY
;
status
=
AE_NO_MEMORY
;
goto
error_exit
;
goto
error_exit
;
}
}
...
@@ -780,6 +789,7 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
...
@@ -780,6 +789,7 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
this_event
=
gpe_event_info
;
this_event
=
gpe_event_info
;
for
(
i
=
0
;
i
<
gpe_block
->
register_count
;
i
++
)
{
for
(
i
=
0
;
i
<
gpe_block
->
register_count
;
i
++
)
{
/* Init the register_info for this GPE register (8 GPEs) */
/* Init the register_info for this GPE register (8 GPEs) */
this_register
->
base_gpe_number
=
this_register
->
base_gpe_number
=
...
@@ -839,10 +849,10 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
...
@@ -839,10 +849,10 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
error_exit:
error_exit:
if
(
gpe_register_info
)
{
if
(
gpe_register_info
)
{
ACPI_
MEM_
FREE
(
gpe_register_info
);
ACPI_FREE
(
gpe_register_info
);
}
}
if
(
gpe_event_info
)
{
if
(
gpe_event_info
)
{
ACPI_
MEM_
FREE
(
gpe_event_info
);
ACPI_FREE
(
gpe_event_info
);
}
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
...
@@ -878,7 +888,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
...
@@ -878,7 +888,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
acpi_status
status
;
acpi_status
status
;
struct
acpi_gpe_block_info
*
gpe_block
;
struct
acpi_gpe_block_info
*
gpe_block
;
ACPI_FUNCTION_TRACE
(
"ev_create_gpe_block"
);
ACPI_FUNCTION_TRACE
(
ev_create_gpe_block
);
if
(
!
register_count
)
{
if
(
!
register_count
)
{
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -886,7 +896,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
...
@@ -886,7 +896,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
/* Allocate a new GPE block */
/* Allocate a new GPE block */
gpe_block
=
ACPI_
MEM_CALLOCATE
(
sizeof
(
struct
acpi_gpe_block_info
));
gpe_block
=
ACPI_
ALLOCATE_ZEROED
(
sizeof
(
struct
acpi_gpe_block_info
));
if
(
!
gpe_block
)
{
if
(
!
gpe_block
)
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
}
...
@@ -906,7 +916,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
...
@@ -906,7 +916,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
*/
*/
status
=
acpi_ev_create_gpe_info_blocks
(
gpe_block
);
status
=
acpi_ev_create_gpe_info_blocks
(
gpe_block
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_
MEM_
FREE
(
gpe_block
);
ACPI_FREE
(
gpe_block
);
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
@@ -914,7 +924,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
...
@@ -914,7 +924,7 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
status
=
acpi_ev_install_gpe_block
(
gpe_block
,
interrupt_number
);
status
=
acpi_ev_install_gpe_block
(
gpe_block
,
interrupt_number
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_
MEM_
FREE
(
gpe_block
);
ACPI_FREE
(
gpe_block
);
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
@@ -971,7 +981,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
...
@@ -971,7 +981,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
acpi_native_uint
i
;
acpi_native_uint
i
;
acpi_native_uint
j
;
acpi_native_uint
j
;
ACPI_FUNCTION_TRACE
(
"ev_initialize_gpe_block"
);
ACPI_FUNCTION_TRACE
(
ev_initialize_gpe_block
);
/* Ignore a null GPE block (e.g., if no GPE block 1 exists) */
/* Ignore a null GPE block (e.g., if no GPE block 1 exists) */
...
@@ -1013,6 +1023,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
...
@@ -1013,6 +1023,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
for
(
i
=
0
;
i
<
gpe_block
->
register_count
;
i
++
)
{
for
(
i
=
0
;
i
<
gpe_block
->
register_count
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
/* Get the info block for this particular GPE */
/* Get the info block for this particular GPE */
gpe_event_info
=
gpe_event_info
=
...
@@ -1040,7 +1051,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
...
@@ -1040,7 +1051,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
status
=
acpi_hw_enable_runtime_gpe_block
(
NULL
,
gpe_block
);
status
=
acpi_hw_enable_runtime_gpe_block
(
NULL
,
gpe_block
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_ERROR
((
AE_INFO
,
"Could not enable GPEs in
gpe_b
lock %p"
,
ACPI_ERROR
((
AE_INFO
,
"Could not enable GPEs in
GpeB
lock %p"
,
gpe_block
));
gpe_block
));
}
}
...
@@ -1066,7 +1077,7 @@ acpi_status acpi_ev_gpe_initialize(void)
...
@@ -1066,7 +1077,7 @@ acpi_status acpi_ev_gpe_initialize(void)
u32
gpe_number_max
=
0
;
u32
gpe_number_max
=
0
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_gpe_initialize"
);
ACPI_FUNCTION_TRACE
(
ev_gpe_initialize
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_NAMESPACE
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_NAMESPACE
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
...
@@ -1099,6 +1110,7 @@ acpi_status acpi_ev_gpe_initialize(void)
...
@@ -1099,6 +1110,7 @@ acpi_status acpi_ev_gpe_initialize(void)
* particular block is not supported.
* particular block is not supported.
*/
*/
if
(
acpi_gbl_FADT
->
gpe0_blk_len
&&
acpi_gbl_FADT
->
xgpe0_blk
.
address
)
{
if
(
acpi_gbl_FADT
->
gpe0_blk_len
&&
acpi_gbl_FADT
->
xgpe0_blk
.
address
)
{
/* GPE block 0 exists (has both length and address > 0) */
/* GPE block 0 exists (has both length and address > 0) */
register_count0
=
(
u16
)
(
acpi_gbl_FADT
->
gpe0_blk_len
/
2
);
register_count0
=
(
u16
)
(
acpi_gbl_FADT
->
gpe0_blk_len
/
2
);
...
@@ -1121,6 +1133,7 @@ acpi_status acpi_ev_gpe_initialize(void)
...
@@ -1121,6 +1133,7 @@ acpi_status acpi_ev_gpe_initialize(void)
}
}
if
(
acpi_gbl_FADT
->
gpe1_blk_len
&&
acpi_gbl_FADT
->
xgpe1_blk
.
address
)
{
if
(
acpi_gbl_FADT
->
gpe1_blk_len
&&
acpi_gbl_FADT
->
xgpe1_blk
.
address
)
{
/* GPE block 1 exists (has both length and address > 0) */
/* GPE block 1 exists (has both length and address > 0) */
register_count1
=
(
u16
)
(
acpi_gbl_FADT
->
gpe1_blk_len
/
2
);
register_count1
=
(
u16
)
(
acpi_gbl_FADT
->
gpe1_blk_len
/
2
);
...
@@ -1168,6 +1181,7 @@ acpi_status acpi_ev_gpe_initialize(void)
...
@@ -1168,6 +1181,7 @@ acpi_status acpi_ev_gpe_initialize(void)
/* Exit if there are no GPE registers */
/* Exit if there are no GPE registers */
if
((
register_count0
+
register_count1
)
==
0
)
{
if
((
register_count0
+
register_count1
)
==
0
)
{
/* GPEs are not required by ACPI, this is OK */
/* GPEs are not required by ACPI, this is OK */
ACPI_DEBUG_PRINT
((
ACPI_DB_INIT
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INIT
,
...
...
drivers/acpi/events/evmisc.c
浏览文件 @
b3899c66
...
@@ -49,12 +49,13 @@
...
@@ -49,12 +49,13 @@
#define _COMPONENT ACPI_EVENTS
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME
(
"evmisc"
)
ACPI_MODULE_NAME
(
"evmisc"
)
/* Names for Notify() values, used for debug output */
#ifdef ACPI_DEBUG_OUTPUT
#ifdef ACPI_DEBUG_OUTPUT
static
const
char
*
acpi_notify_value_names
[]
=
{
static
const
char
*
acpi_notify_value_names
[]
=
{
"Bus Check"
,
"Bus Check"
,
"Device Check"
,
"Device Check"
,
"Device Wake"
,
"Device Wake"
,
"Eject
r
equest"
,
"Eject
R
equest"
,
"Device Check Light"
,
"Device Check Light"
,
"Frequency Mismatch"
,
"Frequency Mismatch"
,
"Bus Mode Mismatch"
,
"Bus Mode Mismatch"
,
...
@@ -124,7 +125,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
...
@@ -124,7 +125,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
union
acpi_generic_state
*
notify_info
;
union
acpi_generic_state
*
notify_info
;
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_NAME
(
"ev_queue_notify_request"
);
ACPI_FUNCTION_NAME
(
ev_queue_notify_request
);
/*
/*
* For value 3 (Ejection Request), some device method may need to be run.
* For value 3 (Ejection Request), some device method may need to be run.
...
@@ -150,6 +151,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
...
@@ -150,6 +151,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
obj_desc
=
acpi_ns_get_attached_object
(
node
);
obj_desc
=
acpi_ns_get_attached_object
(
node
);
if
(
obj_desc
)
{
if
(
obj_desc
)
{
/* We have the notify object, Get the right handler */
/* We have the notify object, Get the right handler */
switch
(
node
->
type
)
{
switch
(
node
->
type
)
{
...
@@ -184,14 +186,15 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
...
@@ -184,14 +186,15 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
return
(
AE_NO_MEMORY
);
return
(
AE_NO_MEMORY
);
}
}
notify_info
->
common
.
data_type
=
ACPI_DESC_TYPE_STATE_NOTIFY
;
notify_info
->
common
.
descriptor_type
=
ACPI_DESC_TYPE_STATE_NOTIFY
;
notify_info
->
notify
.
node
=
node
;
notify_info
->
notify
.
node
=
node
;
notify_info
->
notify
.
value
=
(
u16
)
notify_value
;
notify_info
->
notify
.
value
=
(
u16
)
notify_value
;
notify_info
->
notify
.
handler_obj
=
handler_obj
;
notify_info
->
notify
.
handler_obj
=
handler_obj
;
status
=
acpi_os_queue_for_execution
(
OSD_PRIORITY_HIGH
,
status
=
acpi_ev_notify_dispatch
,
acpi_os_execute
(
OSL_NOTIFY_HANDLER
,
acpi_ev_notify_dispatch
,
notify_info
);
notify_info
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
acpi_ut_delete_generic_state
(
notify_info
);
acpi_ut_delete_generic_state
(
notify_info
);
}
}
...
@@ -240,6 +243,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context)
...
@@ -240,6 +243,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_notify_dispatch(void *context)
* to the device.
* to the device.
*/
*/
if
(
notify_info
->
notify
.
value
<=
ACPI_MAX_SYS_NOTIFY
)
{
if
(
notify_info
->
notify
.
value
<=
ACPI_MAX_SYS_NOTIFY
)
{
/* Global system notification handler */
/* Global system notification handler */
if
(
acpi_gbl_system_notify
.
handler
)
{
if
(
acpi_gbl_system_notify
.
handler
)
{
...
@@ -297,6 +301,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_global_lock_thread(void *context)
...
@@ -297,6 +301,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_global_lock_thread(void *context)
/* Signal threads that are waiting for the lock */
/* Signal threads that are waiting for the lock */
if
(
acpi_gbl_global_lock_thread_count
)
{
if
(
acpi_gbl_global_lock_thread_count
)
{
/* Send sufficient units to the semaphore */
/* Send sufficient units to the semaphore */
status
=
status
=
...
@@ -335,15 +340,16 @@ static u32 acpi_ev_global_lock_handler(void *context)
...
@@ -335,15 +340,16 @@ static u32 acpi_ev_global_lock_handler(void *context)
*/
*/
ACPI_ACQUIRE_GLOBAL_LOCK
(
acpi_gbl_common_fACS
.
global_lock
,
acquired
);
ACPI_ACQUIRE_GLOBAL_LOCK
(
acpi_gbl_common_fACS
.
global_lock
,
acquired
);
if
(
acquired
)
{
if
(
acquired
)
{
/* Got the lock, now wake all threads waiting for it */
/* Got the lock, now wake all threads waiting for it */
acpi_gbl_global_lock_acquired
=
TRUE
;
acpi_gbl_global_lock_acquired
=
TRUE
;
/* Run the Global Lock thread which will signal all waiting threads */
/* Run the Global Lock thread which will signal all waiting threads */
status
=
acpi_os_queue_for_execution
(
OSD_PRIORITY_HIGH
,
status
=
acpi_ev_global_lock_thread
,
acpi_os_execute
(
OSL_GLOBAL_LOCK_HANDLER
,
context
);
acpi_ev_global_lock_thread
,
context
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"Could not queue Global Lock thread"
));
"Could not queue Global Lock thread"
));
...
@@ -371,7 +377,7 @@ acpi_status acpi_ev_init_global_lock_handler(void)
...
@@ -371,7 +377,7 @@ acpi_status acpi_ev_init_global_lock_handler(void)
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_init_global_lock_handler"
);
ACPI_FUNCTION_TRACE
(
ev_init_global_lock_handler
);
acpi_gbl_global_lock_present
=
TRUE
;
acpi_gbl_global_lock_present
=
TRUE
;
status
=
acpi_install_fixed_event_handler
(
ACPI_EVENT_GLOBAL
,
status
=
acpi_install_fixed_event_handler
(
ACPI_EVENT_GLOBAL
,
...
@@ -413,7 +419,7 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout)
...
@@ -413,7 +419,7 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout)
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
u8
acquired
=
FALSE
;
u8
acquired
=
FALSE
;
ACPI_FUNCTION_TRACE
(
"ev_acquire_global_lock"
);
ACPI_FUNCTION_TRACE
(
ev_acquire_global_lock
);
#ifndef ACPI_APPLICATION
#ifndef ACPI_APPLICATION
/* Make sure that we actually have a global lock */
/* Make sure that we actually have a global lock */
...
@@ -439,6 +445,7 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout)
...
@@ -439,6 +445,7 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout)
ACPI_ACQUIRE_GLOBAL_LOCK
(
acpi_gbl_common_fACS
.
global_lock
,
acquired
);
ACPI_ACQUIRE_GLOBAL_LOCK
(
acpi_gbl_common_fACS
.
global_lock
,
acquired
);
if
(
acquired
)
{
if
(
acquired
)
{
/* We got the lock */
/* We got the lock */
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
...
@@ -458,8 +465,9 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout)
...
@@ -458,8 +465,9 @@ acpi_status acpi_ev_acquire_global_lock(u16 timeout)
* Acquire the global lock semaphore first.
* Acquire the global lock semaphore first.
* Since this wait will block, we must release the interpreter
* Since this wait will block, we must release the interpreter
*/
*/
status
=
acpi_ex_system_wait_semaphore
(
acpi_gbl_global_lock_semaphore
,
status
=
timeout
);
acpi_ex_system_wait_semaphore
(
acpi_gbl_global_lock_semaphore
,
timeout
);
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
@@ -480,7 +488,7 @@ acpi_status acpi_ev_release_global_lock(void)
...
@@ -480,7 +488,7 @@ acpi_status acpi_ev_release_global_lock(void)
u8
pending
=
FALSE
;
u8
pending
=
FALSE
;
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE
(
"ev_release_global_lock"
);
ACPI_FUNCTION_TRACE
(
ev_release_global_lock
);
if
(
!
acpi_gbl_global_lock_thread_count
)
{
if
(
!
acpi_gbl_global_lock_thread_count
)
{
ACPI_WARNING
((
AE_INFO
,
ACPI_WARNING
((
AE_INFO
,
...
@@ -492,6 +500,7 @@ acpi_status acpi_ev_release_global_lock(void)
...
@@ -492,6 +500,7 @@ acpi_status acpi_ev_release_global_lock(void)
acpi_gbl_global_lock_thread_count
--
;
acpi_gbl_global_lock_thread_count
--
;
if
(
acpi_gbl_global_lock_thread_count
)
{
if
(
acpi_gbl_global_lock_thread_count
)
{
/* There are still some threads holding the lock, cannot release */
/* There are still some threads holding the lock, cannot release */
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -533,7 +542,7 @@ void acpi_ev_terminate(void)
...
@@ -533,7 +542,7 @@ void acpi_ev_terminate(void)
acpi_native_uint
i
;
acpi_native_uint
i
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_terminate"
);
ACPI_FUNCTION_TRACE
(
ev_terminate
);
if
(
acpi_gbl_events_initialized
)
{
if
(
acpi_gbl_events_initialized
)
{
/*
/*
...
@@ -573,7 +582,7 @@ void acpi_ev_terminate(void)
...
@@ -573,7 +582,7 @@ void acpi_ev_terminate(void)
if
(
acpi_gbl_original_mode
==
ACPI_SYS_MODE_LEGACY
)
{
if
(
acpi_gbl_original_mode
==
ACPI_SYS_MODE_LEGACY
)
{
status
=
acpi_disable
();
status
=
acpi_disable
();
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_WARNING
((
AE_INFO
,
"
acpi_d
isable failed"
));
ACPI_WARNING
((
AE_INFO
,
"
AcpiD
isable failed"
));
}
}
}
}
return_VOID
;
return_VOID
;
...
...
drivers/acpi/events/evregion.c
浏览文件 @
b3899c66
...
@@ -83,7 +83,7 @@ acpi_status acpi_ev_install_region_handlers(void)
...
@@ -83,7 +83,7 @@ acpi_status acpi_ev_install_region_handlers(void)
acpi_status
status
;
acpi_status
status
;
acpi_native_uint
i
;
acpi_native_uint
i
;
ACPI_FUNCTION_TRACE
(
"ev_install_region_handlers"
);
ACPI_FUNCTION_TRACE
(
ev_install_region_handlers
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_NAMESPACE
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_NAMESPACE
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
...
@@ -153,7 +153,7 @@ acpi_status acpi_ev_initialize_op_regions(void)
...
@@ -153,7 +153,7 @@ acpi_status acpi_ev_initialize_op_regions(void)
acpi_status
status
;
acpi_status
status
;
acpi_native_uint
i
;
acpi_native_uint
i
;
ACPI_FUNCTION_TRACE
(
"ev_initialize_op_regions"
);
ACPI_FUNCTION_TRACE
(
ev_initialize_op_regions
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_NAMESPACE
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_NAMESPACE
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
...
@@ -164,6 +164,7 @@ acpi_status acpi_ev_initialize_op_regions(void)
...
@@ -164,6 +164,7 @@ acpi_status acpi_ev_initialize_op_regions(void)
* Run the _REG methods for op_regions in each default address space
* Run the _REG methods for op_regions in each default address space
*/
*/
for
(
i
=
0
;
i
<
ACPI_NUM_DEFAULT_SPACES
;
i
++
)
{
for
(
i
=
0
;
i
<
ACPI_NUM_DEFAULT_SPACES
;
i
++
)
{
/* TBD: Make sure handler is the DEFAULT handler, otherwise
/* TBD: Make sure handler is the DEFAULT handler, otherwise
* _REG will have already been run.
* _REG will have already been run.
*/
*/
...
@@ -192,12 +193,12 @@ acpi_status acpi_ev_initialize_op_regions(void)
...
@@ -192,12 +193,12 @@ acpi_status acpi_ev_initialize_op_regions(void)
acpi_status
acpi_status
acpi_ev_execute_reg_method
(
union
acpi_operand_object
*
region_obj
,
u32
function
)
acpi_ev_execute_reg_method
(
union
acpi_operand_object
*
region_obj
,
u32
function
)
{
{
struct
acpi_
parameter_info
info
;
struct
acpi_
evaluate_info
*
info
;
union
acpi_operand_object
*
param
s
[
3
];
union
acpi_operand_object
*
arg
s
[
3
];
union
acpi_operand_object
*
region_obj2
;
union
acpi_operand_object
*
region_obj2
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_execute_reg_method"
);
ACPI_FUNCTION_TRACE
(
ev_execute_reg_method
);
region_obj2
=
acpi_ns_get_secondary_object
(
region_obj
);
region_obj2
=
acpi_ns_get_secondary_object
(
region_obj
);
if
(
!
region_obj2
)
{
if
(
!
region_obj2
)
{
...
@@ -208,48 +209,60 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
...
@@ -208,48 +209,60 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
}
}
/* Allocate and initialize the evaluation information block */
info
=
ACPI_ALLOCATE_ZEROED
(
sizeof
(
struct
acpi_evaluate_info
));
if
(
!
info
)
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
info
->
prefix_node
=
region_obj2
->
extra
.
method_REG
;
info
->
pathname
=
NULL
;
info
->
parameters
=
args
;
info
->
parameter_type
=
ACPI_PARAM_ARGS
;
info
->
flags
=
ACPI_IGNORE_RETURN_VALUE
;
/*
/*
* The _REG method has two arguments:
* The _REG method has two arguments:
*
*
* Arg0
, Integer: Operation region space ID
* Arg0
- Integer:
*
Same value as region_obj->Region.space_id
*
Operation region space ID
Same value as region_obj->Region.space_id
*
Arg1, Integer: connection status
*
*
1 for connecting the handler,
*
Arg1 - Integer:
*
0 for disconnecting the handler
*
connection status 1 for connecting the handler, 0 for disconnecting
*
Passed as a parameter
*
the handler (Passed as a parameter)
*/
*/
params
[
0
]
=
acpi_ut_create_internal_object
(
ACPI_TYPE_INTEGER
);
args
[
0
]
=
acpi_ut_create_internal_object
(
ACPI_TYPE_INTEGER
);
if
(
!
params
[
0
])
{
if
(
!
args
[
0
])
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
status
=
AE_NO_MEMORY
;
goto
cleanup1
;
}
}
param
s
[
1
]
=
acpi_ut_create_internal_object
(
ACPI_TYPE_INTEGER
);
arg
s
[
1
]
=
acpi_ut_create_internal_object
(
ACPI_TYPE_INTEGER
);
if
(
!
param
s
[
1
])
{
if
(
!
arg
s
[
1
])
{
status
=
AE_NO_MEMORY
;
status
=
AE_NO_MEMORY
;
goto
cleanup
;
goto
cleanup
2
;
}
}
/* Setup the parameter objects */
/* Setup the parameter objects */
params
[
0
]
->
integer
.
value
=
region_obj
->
region
.
space_id
;
args
[
0
]
->
integer
.
value
=
region_obj
->
region
.
space_id
;
params
[
1
]
->
integer
.
value
=
function
;
args
[
1
]
->
integer
.
value
=
function
;
params
[
2
]
=
NULL
;
args
[
2
]
=
NULL
;
info
.
node
=
region_obj2
->
extra
.
method_REG
;
info
.
parameters
=
params
;
info
.
parameter_type
=
ACPI_PARAM_ARGS
;
/* Execute the method, no return value */
/* Execute the method, no return value */
ACPI_DEBUG_EXEC
(
acpi_ut_display_init_pathname
ACPI_DEBUG_EXEC
(
acpi_ut_display_init_pathname
(
ACPI_TYPE_METHOD
,
info
.
node
,
NULL
));
(
ACPI_TYPE_METHOD
,
info
->
prefix_node
,
NULL
));
status
=
acpi_ns_evaluate_by_handle
(
&
info
);
acpi_ut_remove_reference
(
params
[
1
]);
status
=
acpi_ns_evaluate
(
info
);
acpi_ut_remove_reference
(
args
[
1
]);
cleanup:
cleanup
2
:
acpi_ut_remove_reference
(
param
s
[
0
]);
acpi_ut_remove_reference
(
arg
s
[
0
]);
cleanup1:
ACPI_FREE
(
info
);
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
@@ -261,7 +274,8 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
...
@@ -261,7 +274,8 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
* Function - Read or Write operation
* Function - Read or Write operation
* Address - Where in the space to read or write
* Address - Where in the space to read or write
* bit_width - Field width in bits (8, 16, 32, or 64)
* bit_width - Field width in bits (8, 16, 32, or 64)
* Value - Pointer to in or out value
* Value - Pointer to in or out value, must be
* full 64-bit acpi_integer
*
*
* RETURN: Status
* RETURN: Status
*
*
...
@@ -274,7 +288,7 @@ acpi_status
...
@@ -274,7 +288,7 @@ acpi_status
acpi_ev_address_space_dispatch
(
union
acpi_operand_object
*
region_obj
,
acpi_ev_address_space_dispatch
(
union
acpi_operand_object
*
region_obj
,
u32
function
,
u32
function
,
acpi_physical_address
address
,
acpi_physical_address
address
,
u32
bit_width
,
void
*
value
)
u32
bit_width
,
acpi_integer
*
value
)
{
{
acpi_status
status
;
acpi_status
status
;
acpi_status
status2
;
acpi_status
status2
;
...
@@ -284,7 +298,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
...
@@ -284,7 +298,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
union
acpi_operand_object
*
region_obj2
;
union
acpi_operand_object
*
region_obj2
;
void
*
region_context
=
NULL
;
void
*
region_context
=
NULL
;
ACPI_FUNCTION_TRACE
(
"ev_address_space_dispatch"
);
ACPI_FUNCTION_TRACE
(
ev_address_space_dispatch
);
region_obj2
=
acpi_ns_get_secondary_object
(
region_obj
);
region_obj2
=
acpi_ns_get_secondary_object
(
region_obj
);
if
(
!
region_obj2
)
{
if
(
!
region_obj2
)
{
...
@@ -315,6 +329,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
...
@@ -315,6 +329,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
*/
*/
region_setup
=
handler_desc
->
address_space
.
setup
;
region_setup
=
handler_desc
->
address_space
.
setup
;
if
(
!
region_setup
)
{
if
(
!
region_setup
)
{
/* No initialization routine, exit with error */
/* No initialization routine, exit with error */
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
...
@@ -361,9 +376,10 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
...
@@ -361,9 +376,10 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
region_obj
->
region
.
flags
|=
AOPOBJ_SETUP_COMPLETE
;
region_obj
->
region
.
flags
|=
AOPOBJ_SETUP_COMPLETE
;
if
(
region_obj2
->
extra
.
region_context
)
{
if
(
region_obj2
->
extra
.
region_context
)
{
/* The handler for this region was already installed */
/* The handler for this region was already installed */
ACPI_
MEM_
FREE
(
region_context
);
ACPI_FREE
(
region_context
);
}
else
{
}
else
{
/*
/*
* Save the returned context for use in all accesses to
* Save the returned context for use in all accesses to
...
@@ -386,9 +402,8 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
...
@@ -386,9 +402,8 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
acpi_ut_get_region_name
(
region_obj
->
region
.
acpi_ut_get_region_name
(
region_obj
->
region
.
space_id
)));
space_id
)));
if
(
!
if
(
!
(
handler_desc
->
address_space
.
handler_flags
&
(
handler_desc
->
address_space
.
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED
))
{
hflags
&
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED
))
{
/*
/*
* For handlers other than the default (supplied) handlers, we must
* For handlers other than the default (supplied) handlers, we must
* exit the interpreter because the handler *might* block -- we don't
* exit the interpreter because the handler *might* block -- we don't
...
@@ -409,9 +424,8 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
...
@@ -409,9 +424,8 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
space_id
)));
space_id
)));
}
}
if
(
!
if
(
!
(
handler_desc
->
address_space
.
handler_flags
&
(
handler_desc
->
address_space
.
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED
))
{
hflags
&
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED
))
{
/*
/*
* We just returned from a non-default handler, we must re-enter the
* We just returned from a non-default handler, we must re-enter the
* interpreter
* interpreter
...
@@ -451,7 +465,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
...
@@ -451,7 +465,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
union
acpi_operand_object
*
region_obj2
;
union
acpi_operand_object
*
region_obj2
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_detach_region"
);
ACPI_FUNCTION_TRACE
(
ev_detach_region
);
region_obj2
=
acpi_ns_get_secondary_object
(
region_obj
);
region_obj2
=
acpi_ns_get_secondary_object
(
region_obj
);
if
(
!
region_obj2
)
{
if
(
!
region_obj2
)
{
...
@@ -463,6 +477,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
...
@@ -463,6 +477,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
handler_obj
=
region_obj
->
region
.
handler
;
handler_obj
=
region_obj
->
region
.
handler
;
if
(
!
handler_obj
)
{
if
(
!
handler_obj
)
{
/* This region has no handler, all done */
/* This region has no handler, all done */
return_VOID
;
return_VOID
;
...
@@ -474,6 +489,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
...
@@ -474,6 +489,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
last_obj_ptr
=
&
handler_obj
->
address_space
.
region_list
;
last_obj_ptr
=
&
handler_obj
->
address_space
.
region_list
;
while
(
obj_desc
)
{
while
(
obj_desc
)
{
/* Is this the correct Region? */
/* Is this the correct Region? */
if
(
obj_desc
==
region_obj
)
{
if
(
obj_desc
==
region_obj
)
{
...
@@ -583,7 +599,7 @@ acpi_ev_attach_region(union acpi_operand_object *handler_obj,
...
@@ -583,7 +599,7 @@ acpi_ev_attach_region(union acpi_operand_object *handler_obj,
u8
acpi_ns_is_locked
)
u8
acpi_ns_is_locked
)
{
{
ACPI_FUNCTION_TRACE
(
"ev_attach_region"
);
ACPI_FUNCTION_TRACE
(
ev_attach_region
);
ACPI_DEBUG_PRINT
((
ACPI_DB_OPREGION
,
ACPI_DEBUG_PRINT
((
ACPI_DB_OPREGION
,
"Adding Region [%4.4s] %p to address handler %p [%s]
\n
"
,
"Adding Region [%4.4s] %p to address handler %p [%s]
\n
"
,
...
@@ -636,7 +652,7 @@ acpi_ev_install_handler(acpi_handle obj_handle,
...
@@ -636,7 +652,7 @@ acpi_ev_install_handler(acpi_handle obj_handle,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_NAME
(
"ev_install_handler"
);
ACPI_FUNCTION_NAME
(
ev_install_handler
);
handler_obj
=
(
union
acpi_operand_object
*
)
context
;
handler_obj
=
(
union
acpi_operand_object
*
)
context
;
...
@@ -666,6 +682,7 @@ acpi_ev_install_handler(acpi_handle obj_handle,
...
@@ -666,6 +682,7 @@ acpi_ev_install_handler(acpi_handle obj_handle,
obj_desc
=
acpi_ns_get_attached_object
(
node
);
obj_desc
=
acpi_ns_get_attached_object
(
node
);
if
(
!
obj_desc
)
{
if
(
!
obj_desc
)
{
/* No object, just exit */
/* No object, just exit */
return
(
AE_OK
);
return
(
AE_OK
);
...
@@ -674,10 +691,12 @@ acpi_ev_install_handler(acpi_handle obj_handle,
...
@@ -674,10 +691,12 @@ acpi_ev_install_handler(acpi_handle obj_handle,
/* Devices are handled different than regions */
/* Devices are handled different than regions */
if
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
)
==
ACPI_TYPE_DEVICE
)
{
if
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
)
==
ACPI_TYPE_DEVICE
)
{
/* Check if this Device already has a handler for this address space */
/* Check if this Device already has a handler for this address space */
next_handler_obj
=
obj_desc
->
device
.
handler
;
next_handler_obj
=
obj_desc
->
device
.
handler
;
while
(
next_handler_obj
)
{
while
(
next_handler_obj
)
{
/* Found a handler, is it for the same address space? */
/* Found a handler, is it for the same address space? */
if
(
next_handler_obj
->
address_space
.
space_id
==
if
(
next_handler_obj
->
address_space
.
space_id
==
...
@@ -764,9 +783,9 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
...
@@ -764,9 +783,9 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
union
acpi_operand_object
*
handler_obj
;
union
acpi_operand_object
*
handler_obj
;
acpi_status
status
;
acpi_status
status
;
acpi_object_type
type
;
acpi_object_type
type
;
u
16
flags
=
0
;
u
8
flags
=
0
;
ACPI_FUNCTION_TRACE
(
"ev_install_space_handler"
);
ACPI_FUNCTION_TRACE
(
ev_install_space_handler
);
/*
/*
* This registration is valid for only the types below
* This registration is valid for only the types below
...
@@ -839,6 +858,7 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
...
@@ -839,6 +858,7 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
/* Walk the handler list for this device */
/* Walk the handler list for this device */
while
(
handler_obj
)
{
while
(
handler_obj
)
{
/* Same space_id indicates a handler already installed */
/* Same space_id indicates a handler already installed */
if
(
handler_obj
->
address_space
.
space_id
==
space_id
)
{
if
(
handler_obj
->
address_space
.
space_id
==
space_id
)
{
...
@@ -921,7 +941,7 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
...
@@ -921,7 +941,7 @@ acpi_ev_install_space_handler(struct acpi_namespace_node * node,
/* Init handler obj */
/* Init handler obj */
handler_obj
->
address_space
.
space_id
=
(
u8
)
space_id
;
handler_obj
->
address_space
.
space_id
=
(
u8
)
space_id
;
handler_obj
->
address_space
.
hflags
=
flags
;
handler_obj
->
address_space
.
h
andler_
flags
=
flags
;
handler_obj
->
address_space
.
region_list
=
NULL
;
handler_obj
->
address_space
.
region_list
=
NULL
;
handler_obj
->
address_space
.
node
=
node
;
handler_obj
->
address_space
.
node
=
node
;
handler_obj
->
address_space
.
handler
=
handler
;
handler_obj
->
address_space
.
handler
=
handler
;
...
@@ -979,7 +999,7 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
...
@@ -979,7 +999,7 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_execute_reg_methods"
);
ACPI_FUNCTION_TRACE
(
ev_execute_reg_methods
);
/*
/*
* Run all _REG methods for all Operation Regions for this
* Run all _REG methods for all Operation Regions for this
...
@@ -1001,7 +1021,7 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
...
@@ -1001,7 +1021,7 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
*
*
* PARAMETERS: walk_namespace callback
* PARAMETERS: walk_namespace callback
*
*
* DESCRIPTION: Run _RE
g
method for region objects of the requested space_iD
* DESCRIPTION: Run _RE
G
method for region objects of the requested space_iD
*
*
******************************************************************************/
******************************************************************************/
...
@@ -1035,6 +1055,7 @@ acpi_ev_reg_run(acpi_handle obj_handle,
...
@@ -1035,6 +1055,7 @@ acpi_ev_reg_run(acpi_handle obj_handle,
obj_desc
=
acpi_ns_get_attached_object
(
node
);
obj_desc
=
acpi_ns_get_attached_object
(
node
);
if
(
!
obj_desc
)
{
if
(
!
obj_desc
)
{
/* No object, just exit */
/* No object, just exit */
return
(
AE_OK
);
return
(
AE_OK
);
...
...
drivers/acpi/events/evrgnini.c
浏览文件 @
b3899c66
...
@@ -71,11 +71,22 @@ acpi_ev_system_memory_region_setup(acpi_handle handle,
...
@@ -71,11 +71,22 @@ acpi_ev_system_memory_region_setup(acpi_handle handle,
(
union
acpi_operand_object
*
)
handle
;
(
union
acpi_operand_object
*
)
handle
;
struct
acpi_mem_space_context
*
local_region_context
;
struct
acpi_mem_space_context
*
local_region_context
;
ACPI_FUNCTION_TRACE
(
"ev_system_memory_region_setup"
);
ACPI_FUNCTION_TRACE
(
ev_system_memory_region_setup
);
if
(
function
==
ACPI_REGION_DEACTIVATE
)
{
if
(
function
==
ACPI_REGION_DEACTIVATE
)
{
if
(
*
region_context
)
{
if
(
*
region_context
)
{
ACPI_MEM_FREE
(
*
region_context
);
local_region_context
=
(
struct
acpi_mem_space_context
*
)
*
region_context
;
/* Delete a cached mapping if present */
if
(
local_region_context
->
mapped_length
)
{
acpi_os_unmap_memory
(
local_region_context
->
mapped_logical_address
,
local_region_context
->
mapped_length
);
}
ACPI_FREE
(
local_region_context
);
*
region_context
=
NULL
;
*
region_context
=
NULL
;
}
}
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -84,7 +95,7 @@ acpi_ev_system_memory_region_setup(acpi_handle handle,
...
@@ -84,7 +95,7 @@ acpi_ev_system_memory_region_setup(acpi_handle handle,
/* Create a new context */
/* Create a new context */
local_region_context
=
local_region_context
=
ACPI_
MEM_CALLOCATE
(
sizeof
(
struct
acpi_mem_space_context
));
ACPI_
ALLOCATE_ZEROED
(
sizeof
(
struct
acpi_mem_space_context
));
if
(
!
(
local_region_context
))
{
if
(
!
(
local_region_context
))
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
}
...
@@ -118,7 +129,7 @@ acpi_ev_io_space_region_setup(acpi_handle handle,
...
@@ -118,7 +129,7 @@ acpi_ev_io_space_region_setup(acpi_handle handle,
u32
function
,
u32
function
,
void
*
handler_context
,
void
**
region_context
)
void
*
handler_context
,
void
**
region_context
)
{
{
ACPI_FUNCTION_TRACE
(
"ev_io_space_region_setup"
);
ACPI_FUNCTION_TRACE
(
ev_io_space_region_setup
);
if
(
function
==
ACPI_REGION_DEACTIVATE
)
{
if
(
function
==
ACPI_REGION_DEACTIVATE
)
{
*
region_context
=
NULL
;
*
region_context
=
NULL
;
...
@@ -161,7 +172,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
...
@@ -161,7 +172,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
(
union
acpi_operand_object
*
)
handle
;
(
union
acpi_operand_object
*
)
handle
;
struct
acpi_device_id
object_hID
;
struct
acpi_device_id
object_hID
;
ACPI_FUNCTION_TRACE
(
"ev_pci_config_region_setup"
);
ACPI_FUNCTION_TRACE
(
ev_pci_config_region_setup
);
handler_obj
=
region_obj
->
region
.
handler
;
handler_obj
=
region_obj
->
region
.
handler
;
if
(
!
handler_obj
)
{
if
(
!
handler_obj
)
{
...
@@ -178,7 +189,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
...
@@ -178,7 +189,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
*
region_context
=
NULL
;
*
region_context
=
NULL
;
if
(
function
==
ACPI_REGION_DEACTIVATE
)
{
if
(
function
==
ACPI_REGION_DEACTIVATE
)
{
if
(
pci_id
)
{
if
(
pci_id
)
{
ACPI_
MEM_
FREE
(
pci_id
);
ACPI_FREE
(
pci_id
);
}
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
@@ -199,6 +210,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
...
@@ -199,6 +210,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
* handlers with that device.
* handlers with that device.
*/
*/
if
(
handler_obj
->
address_space
.
node
==
acpi_gbl_root_node
)
{
if
(
handler_obj
->
address_space
.
node
==
acpi_gbl_root_node
)
{
/* Start search from the parent object */
/* Start search from the parent object */
pci_root_node
=
parent_node
;
pci_root_node
=
parent_node
;
...
@@ -220,6 +232,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
...
@@ -220,6 +232,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
PCI_EXPRESS_ROOT_HID_STRING
,
PCI_EXPRESS_ROOT_HID_STRING
,
sizeof
(
PCI_EXPRESS_ROOT_HID_STRING
)))))
sizeof
(
PCI_EXPRESS_ROOT_HID_STRING
)))))
{
{
/* Install a handler for this PCI root bridge */
/* Install a handler for this PCI root bridge */
status
=
status
=
...
@@ -235,7 +248,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
...
@@ -235,7 +248,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
}
else
{
}
else
{
ACPI_EXCEPTION
((
AE_INFO
,
ACPI_EXCEPTION
((
AE_INFO
,
status
,
status
,
"Could not install
pci_c
onfig handler for Root Bridge %4.4s"
,
"Could not install
PciC
onfig handler for Root Bridge %4.4s"
,
acpi_ut_get_node_name
acpi_ut_get_node_name
(
pci_root_node
)));
(
pci_root_node
)));
}
}
...
@@ -262,7 +275,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
...
@@ -262,7 +275,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
/* Region is still not initialized. Create a new context */
/* Region is still not initialized. Create a new context */
pci_id
=
ACPI_
MEM_CALLOCATE
(
sizeof
(
struct
acpi_pci_id
));
pci_id
=
ACPI_
ALLOCATE_ZEROED
(
sizeof
(
struct
acpi_pci_id
));
if
(
!
pci_id
)
{
if
(
!
pci_id
)
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
}
...
@@ -337,7 +350,7 @@ acpi_ev_pci_bar_region_setup(acpi_handle handle,
...
@@ -337,7 +350,7 @@ acpi_ev_pci_bar_region_setup(acpi_handle handle,
u32
function
,
u32
function
,
void
*
handler_context
,
void
**
region_context
)
void
*
handler_context
,
void
**
region_context
)
{
{
ACPI_FUNCTION_TRACE
(
"ev_pci_bar_region_setup"
);
ACPI_FUNCTION_TRACE
(
ev_pci_bar_region_setup
);
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
}
}
...
@@ -364,7 +377,7 @@ acpi_ev_cmos_region_setup(acpi_handle handle,
...
@@ -364,7 +377,7 @@ acpi_ev_cmos_region_setup(acpi_handle handle,
u32
function
,
u32
function
,
void
*
handler_context
,
void
**
region_context
)
void
*
handler_context
,
void
**
region_context
)
{
{
ACPI_FUNCTION_TRACE
(
"ev_cmos_region_setup"
);
ACPI_FUNCTION_TRACE
(
ev_cmos_region_setup
);
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
}
}
...
@@ -389,7 +402,7 @@ acpi_ev_default_region_setup(acpi_handle handle,
...
@@ -389,7 +402,7 @@ acpi_ev_default_region_setup(acpi_handle handle,
u32
function
,
u32
function
,
void
*
handler_context
,
void
**
region_context
)
void
*
handler_context
,
void
**
region_context
)
{
{
ACPI_FUNCTION_TRACE
(
"ev_default_region_setup"
);
ACPI_FUNCTION_TRACE
(
ev_default_region_setup
);
if
(
function
==
ACPI_REGION_DEACTIVATE
)
{
if
(
function
==
ACPI_REGION_DEACTIVATE
)
{
*
region_context
=
NULL
;
*
region_context
=
NULL
;
...
@@ -435,7 +448,7 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
...
@@ -435,7 +448,7 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
acpi_name
*
reg_name_ptr
=
(
acpi_name
*
)
METHOD_NAME__REG
;
acpi_name
*
reg_name_ptr
=
(
acpi_name
*
)
METHOD_NAME__REG
;
union
acpi_operand_object
*
region_obj2
;
union
acpi_operand_object
*
region_obj2
;
ACPI_FUNCTION_TRACE_U32
(
"ev_initialize_region"
,
acpi_ns_locked
);
ACPI_FUNCTION_TRACE_U32
(
ev_initialize_region
,
acpi_ns_locked
);
if
(
!
region_obj
)
{
if
(
!
region_obj
)
{
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
...
@@ -462,8 +475,9 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
...
@@ -462,8 +475,9 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
/* Find any "_REG" method associated with this region definition */
/* Find any "_REG" method associated with this region definition */
status
=
acpi_ns_search_node
(
*
reg_name_ptr
,
node
,
status
=
ACPI_TYPE_METHOD
,
&
method_node
);
acpi_ns_search_one_scope
(
*
reg_name_ptr
,
node
,
ACPI_TYPE_METHOD
,
&
method_node
);
if
(
ACPI_SUCCESS
(
status
))
{
if
(
ACPI_SUCCESS
(
status
))
{
/*
/*
* The _REG method is optional and there can be only one per region
* The _REG method is optional and there can be only one per region
...
@@ -478,11 +492,13 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
...
@@ -478,11 +492,13 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
* ie: acpi_gbl_root_node->parent_entry being set to NULL
* ie: acpi_gbl_root_node->parent_entry being set to NULL
*/
*/
while
(
node
)
{
while
(
node
)
{
/* Check to see if a handler exists */
/* Check to see if a handler exists */
handler_obj
=
NULL
;
handler_obj
=
NULL
;
obj_desc
=
acpi_ns_get_attached_object
(
node
);
obj_desc
=
acpi_ns_get_attached_object
(
node
);
if
(
obj_desc
)
{
if
(
obj_desc
)
{
/* Can only be a handler if the object exists */
/* Can only be a handler if the object exists */
switch
(
node
->
type
)
{
switch
(
node
->
type
)
{
...
@@ -507,10 +523,12 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
...
@@ -507,10 +523,12 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
}
}
while
(
handler_obj
)
{
while
(
handler_obj
)
{
/* Is this handler of the correct type? */
/* Is this handler of the correct type? */
if
(
handler_obj
->
address_space
.
space_id
==
if
(
handler_obj
->
address_space
.
space_id
==
space_id
)
{
space_id
)
{
/* Found correct handler */
/* Found correct handler */
ACPI_DEBUG_PRINT
((
ACPI_DB_OPREGION
,
ACPI_DEBUG_PRINT
((
ACPI_DB_OPREGION
,
...
@@ -571,7 +589,7 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
...
@@ -571,7 +589,7 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj,
/* If we get here, there is no handler for this region */
/* If we get here, there is no handler for this region */
ACPI_DEBUG_PRINT
((
ACPI_DB_OPREGION
,
ACPI_DEBUG_PRINT
((
ACPI_DB_OPREGION
,
"No handler for
region_type %s(%X) (region_o
bj %p)
\n
"
,
"No handler for
RegionType %s(%X) (RegionO
bj %p)
\n
"
,
acpi_ut_get_region_name
(
space_id
),
space_id
,
acpi_ut_get_region_name
(
space_id
),
space_id
,
region_obj
));
region_obj
));
...
...
drivers/acpi/events/evsci.c
浏览文件 @
b3899c66
...
@@ -69,7 +69,7 @@ static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context)
...
@@ -69,7 +69,7 @@ static u32 ACPI_SYSTEM_XFACE acpi_ev_sci_xrupt_handler(void *context)
struct
acpi_gpe_xrupt_info
*
gpe_xrupt_list
=
context
;
struct
acpi_gpe_xrupt_info
*
gpe_xrupt_list
=
context
;
u32
interrupt_handled
=
ACPI_INTERRUPT_NOT_HANDLED
;
u32
interrupt_handled
=
ACPI_INTERRUPT_NOT_HANDLED
;
ACPI_FUNCTION_TRACE
(
"ev_sci_xrupt_handler"
);
ACPI_FUNCTION_TRACE
(
ev_sci_xrupt_handler
);
/*
/*
* We are guaranteed by the ACPI CA initialization/shutdown code that
* We are guaranteed by the ACPI CA initialization/shutdown code that
...
@@ -108,7 +108,7 @@ u32 ACPI_SYSTEM_XFACE acpi_ev_gpe_xrupt_handler(void *context)
...
@@ -108,7 +108,7 @@ u32 ACPI_SYSTEM_XFACE acpi_ev_gpe_xrupt_handler(void *context)
struct
acpi_gpe_xrupt_info
*
gpe_xrupt_list
=
context
;
struct
acpi_gpe_xrupt_info
*
gpe_xrupt_list
=
context
;
u32
interrupt_handled
=
ACPI_INTERRUPT_NOT_HANDLED
;
u32
interrupt_handled
=
ACPI_INTERRUPT_NOT_HANDLED
;
ACPI_FUNCTION_TRACE
(
"ev_gpe_xrupt_handler"
);
ACPI_FUNCTION_TRACE
(
ev_gpe_xrupt_handler
);
/*
/*
* We are guaranteed by the ACPI CA initialization/shutdown code that
* We are guaranteed by the ACPI CA initialization/shutdown code that
...
@@ -140,7 +140,7 @@ u32 acpi_ev_install_sci_handler(void)
...
@@ -140,7 +140,7 @@ u32 acpi_ev_install_sci_handler(void)
{
{
u32
status
=
AE_OK
;
u32
status
=
AE_OK
;
ACPI_FUNCTION_TRACE
(
"ev_install_sci_handler"
);
ACPI_FUNCTION_TRACE
(
ev_install_sci_handler
);
status
=
acpi_os_install_interrupt_handler
((
u32
)
acpi_gbl_FADT
->
sci_int
,
status
=
acpi_os_install_interrupt_handler
((
u32
)
acpi_gbl_FADT
->
sci_int
,
acpi_ev_sci_xrupt_handler
,
acpi_ev_sci_xrupt_handler
,
...
@@ -171,7 +171,7 @@ acpi_status acpi_ev_remove_sci_handler(void)
...
@@ -171,7 +171,7 @@ acpi_status acpi_ev_remove_sci_handler(void)
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ev_remove_sci_handler"
);
ACPI_FUNCTION_TRACE
(
ev_remove_sci_handler
);
/* Just let the OS remove the handler and disable the level */
/* Just let the OS remove the handler and disable the level */
...
...
drivers/acpi/events/evxface.c
浏览文件 @
b3899c66
...
@@ -41,8 +41,6 @@
...
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
* POSSIBILITY OF SUCH DAMAGES.
*/
*/
#include <linux/module.h>
#include <acpi/acpi.h>
#include <acpi/acpi.h>
#include <acpi/acnamesp.h>
#include <acpi/acnamesp.h>
#include <acpi/acevents.h>
#include <acpi/acevents.h>
...
@@ -68,7 +66,7 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler)
...
@@ -68,7 +66,7 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler)
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"acpi_install_exception_handler"
);
ACPI_FUNCTION_TRACE
(
acpi_install_exception_handler
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_EVENTS
);
status
=
acpi_ut_acquire_mutex
(
ACPI_MTX_EVENTS
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
...
@@ -90,6 +88,8 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler)
...
@@ -90,6 +88,8 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler)
(
void
)
acpi_ut_release_mutex
(
ACPI_MTX_EVENTS
);
(
void
)
acpi_ut_release_mutex
(
ACPI_MTX_EVENTS
);
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
ACPI_EXPORT_SYMBOL
(
acpi_install_exception_handler
)
#endif
/* ACPI_FUTURE_USAGE */
#endif
/* ACPI_FUTURE_USAGE */
/*******************************************************************************
/*******************************************************************************
...
@@ -107,14 +107,13 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler)
...
@@ -107,14 +107,13 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler)
* event.
* event.
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_status
acpi_install_fixed_event_handler
(
u32
event
,
acpi_install_fixed_event_handler
(
u32
event
,
acpi_event_handler
handler
,
void
*
context
)
acpi_event_handler
handler
,
void
*
context
)
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"acpi_install_fixed_event_handler"
);
ACPI_FUNCTION_TRACE
(
acpi_install_fixed_event_handler
);
/* Parameter validation */
/* Parameter validation */
...
@@ -161,7 +160,7 @@ acpi_install_fixed_event_handler(u32 event,
...
@@ -161,7 +160,7 @@ acpi_install_fixed_event_handler(u32 event,
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_install_fixed_event_handler
);
ACPI_EXPORT_SYMBOL
(
acpi_install_fixed_event_handler
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -175,13 +174,12 @@ EXPORT_SYMBOL(acpi_install_fixed_event_handler);
...
@@ -175,13 +174,12 @@ EXPORT_SYMBOL(acpi_install_fixed_event_handler);
* DESCRIPTION: Disables the event and unregisters the event handler.
* DESCRIPTION: Disables the event and unregisters the event handler.
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_status
acpi_remove_fixed_event_handler
(
u32
event
,
acpi_event_handler
handler
)
acpi_remove_fixed_event_handler
(
u32
event
,
acpi_event_handler
handler
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE
(
"acpi_remove_fixed_event_handler"
);
ACPI_FUNCTION_TRACE
(
acpi_remove_fixed_event_handler
);
/* Parameter validation */
/* Parameter validation */
...
@@ -216,7 +214,7 @@ acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler)
...
@@ -216,7 +214,7 @@ acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_remove_fixed_event_handler
);
ACPI_EXPORT_SYMBOL
(
acpi_remove_fixed_event_handler
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -235,7 +233,6 @@ EXPORT_SYMBOL(acpi_remove_fixed_event_handler);
...
@@ -235,7 +233,6 @@ EXPORT_SYMBOL(acpi_remove_fixed_event_handler);
* DESCRIPTION: Install a handler for notifies on an ACPI device
* DESCRIPTION: Install a handler for notifies on an ACPI device
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_status
acpi_install_notify_handler
(
acpi_handle
device
,
acpi_install_notify_handler
(
acpi_handle
device
,
u32
handler_type
,
u32
handler_type
,
...
@@ -246,7 +243,7 @@ acpi_install_notify_handler(acpi_handle device,
...
@@ -246,7 +243,7 @@ acpi_install_notify_handler(acpi_handle device,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"acpi_install_notify_handler"
);
ACPI_FUNCTION_TRACE
(
acpi_install_notify_handler
);
/* Parameter validation */
/* Parameter validation */
...
@@ -275,6 +272,7 @@ acpi_install_notify_handler(acpi_handle device,
...
@@ -275,6 +272,7 @@ acpi_install_notify_handler(acpi_handle device,
* only one <external> global handler can be regsitered (per notify type).
* only one <external> global handler can be regsitered (per notify type).
*/
*/
if
(
device
==
ACPI_ROOT_OBJECT
)
{
if
(
device
==
ACPI_ROOT_OBJECT
)
{
/* Make sure the handler is not already installed */
/* Make sure the handler is not already installed */
if
(((
handler_type
&
ACPI_SYSTEM_NOTIFY
)
&&
if
(((
handler_type
&
ACPI_SYSTEM_NOTIFY
)
&&
...
@@ -317,6 +315,7 @@ acpi_install_notify_handler(acpi_handle device,
...
@@ -317,6 +315,7 @@ acpi_install_notify_handler(acpi_handle device,
obj_desc
=
acpi_ns_get_attached_object
(
node
);
obj_desc
=
acpi_ns_get_attached_object
(
node
);
if
(
obj_desc
)
{
if
(
obj_desc
)
{
/* Object exists - make sure there's no handler */
/* Object exists - make sure there's no handler */
if
(((
handler_type
&
ACPI_SYSTEM_NOTIFY
)
&&
if
(((
handler_type
&
ACPI_SYSTEM_NOTIFY
)
&&
...
@@ -370,6 +369,7 @@ acpi_install_notify_handler(acpi_handle device,
...
@@ -370,6 +369,7 @@ acpi_install_notify_handler(acpi_handle device,
}
}
if
(
handler_type
==
ACPI_ALL_NOTIFY
)
{
if
(
handler_type
==
ACPI_ALL_NOTIFY
)
{
/* Extra ref if installed in both */
/* Extra ref if installed in both */
acpi_ut_add_reference
(
notify_obj
);
acpi_ut_add_reference
(
notify_obj
);
...
@@ -381,7 +381,7 @@ acpi_install_notify_handler(acpi_handle device,
...
@@ -381,7 +381,7 @@ acpi_install_notify_handler(acpi_handle device,
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_install_notify_handler
);
ACPI_EXPORT_SYMBOL
(
acpi_install_notify_handler
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -399,7 +399,6 @@ EXPORT_SYMBOL(acpi_install_notify_handler);
...
@@ -399,7 +399,6 @@ EXPORT_SYMBOL(acpi_install_notify_handler);
* DESCRIPTION: Remove a handler for notifies on an ACPI device
* DESCRIPTION: Remove a handler for notifies on an ACPI device
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_status
acpi_remove_notify_handler
(
acpi_handle
device
,
acpi_remove_notify_handler
(
acpi_handle
device
,
u32
handler_type
,
acpi_notify_handler
handler
)
u32
handler_type
,
acpi_notify_handler
handler
)
...
@@ -409,7 +408,7 @@ acpi_remove_notify_handler(acpi_handle device,
...
@@ -409,7 +408,7 @@ acpi_remove_notify_handler(acpi_handle device,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"acpi_remove_notify_handler"
);
ACPI_FUNCTION_TRACE
(
acpi_remove_notify_handler
);
/* Parameter validation */
/* Parameter validation */
...
@@ -535,7 +534,7 @@ acpi_remove_notify_handler(acpi_handle device,
...
@@ -535,7 +534,7 @@ acpi_remove_notify_handler(acpi_handle device,
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_remove_notify_handler
);
ACPI_EXPORT_SYMBOL
(
acpi_remove_notify_handler
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -554,7 +553,6 @@ EXPORT_SYMBOL(acpi_remove_notify_handler);
...
@@ -554,7 +553,6 @@ EXPORT_SYMBOL(acpi_remove_notify_handler);
* DESCRIPTION: Install a handler for a General Purpose Event.
* DESCRIPTION: Install a handler for a General Purpose Event.
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_status
acpi_install_gpe_handler
(
acpi_handle
gpe_device
,
acpi_install_gpe_handler
(
acpi_handle
gpe_device
,
u32
gpe_number
,
u32
gpe_number
,
...
@@ -565,7 +563,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
...
@@ -565,7 +563,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
acpi_status
status
;
acpi_status
status
;
acpi_cpu_flags
flags
;
acpi_cpu_flags
flags
;
ACPI_FUNCTION_TRACE
(
"acpi_install_gpe_handler"
);
ACPI_FUNCTION_TRACE
(
acpi_install_gpe_handler
);
/* Parameter validation */
/* Parameter validation */
...
@@ -596,7 +594,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
...
@@ -596,7 +594,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
/* Allocate and init handler object */
/* Allocate and init handler object */
handler
=
ACPI_
MEM_CALLOCATE
(
sizeof
(
struct
acpi_handler_info
));
handler
=
ACPI_
ALLOCATE_ZEROED
(
sizeof
(
struct
acpi_handler_info
));
if
(
!
handler
)
{
if
(
!
handler
)
{
status
=
AE_NO_MEMORY
;
status
=
AE_NO_MEMORY
;
goto
unlock_and_exit
;
goto
unlock_and_exit
;
...
@@ -630,7 +628,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
...
@@ -630,7 +628,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_install_gpe_handler
);
ACPI_EXPORT_SYMBOL
(
acpi_install_gpe_handler
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -646,7 +644,6 @@ EXPORT_SYMBOL(acpi_install_gpe_handler);
...
@@ -646,7 +644,6 @@ EXPORT_SYMBOL(acpi_install_gpe_handler);
* DESCRIPTION: Remove a handler for a General Purpose acpi_event.
* DESCRIPTION: Remove a handler for a General Purpose acpi_event.
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_status
acpi_remove_gpe_handler
(
acpi_handle
gpe_device
,
acpi_remove_gpe_handler
(
acpi_handle
gpe_device
,
u32
gpe_number
,
acpi_event_handler
address
)
u32
gpe_number
,
acpi_event_handler
address
)
...
@@ -656,7 +653,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
...
@@ -656,7 +653,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
acpi_status
status
;
acpi_status
status
;
acpi_cpu_flags
flags
;
acpi_cpu_flags
flags
;
ACPI_FUNCTION_TRACE
(
"acpi_remove_gpe_handler"
);
ACPI_FUNCTION_TRACE
(
acpi_remove_gpe_handler
);
/* Parameter validation */
/* Parameter validation */
...
@@ -724,14 +721,14 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
...
@@ -724,14 +721,14 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
/* Now we can free the handler object */
/* Now we can free the handler object */
ACPI_
MEM_
FREE
(
handler
);
ACPI_FREE
(
handler
);
unlock_and_exit:
unlock_and_exit:
(
void
)
acpi_ut_release_mutex
(
ACPI_MTX_EVENTS
);
(
void
)
acpi_ut_release_mutex
(
ACPI_MTX_EVENTS
);
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_remove_gpe_handler
);
ACPI_EXPORT_SYMBOL
(
acpi_remove_gpe_handler
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -746,7 +743,6 @@ EXPORT_SYMBOL(acpi_remove_gpe_handler);
...
@@ -746,7 +743,6 @@ EXPORT_SYMBOL(acpi_remove_gpe_handler);
* DESCRIPTION: Acquire the ACPI Global Lock
* DESCRIPTION: Acquire the ACPI Global Lock
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_acquire_global_lock
(
u16
timeout
,
u32
*
handle
)
acpi_status
acpi_acquire_global_lock
(
u16
timeout
,
u32
*
handle
)
{
{
acpi_status
status
;
acpi_status
status
;
...
@@ -771,7 +767,7 @@ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle)
...
@@ -771,7 +767,7 @@ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle)
return
(
status
);
return
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_acquire_global_lock
);
ACPI_EXPORT_SYMBOL
(
acpi_acquire_global_lock
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -784,7 +780,6 @@ EXPORT_SYMBOL(acpi_acquire_global_lock);
...
@@ -784,7 +780,6 @@ EXPORT_SYMBOL(acpi_acquire_global_lock);
* DESCRIPTION: Release the ACPI Global Lock. The handle must be valid.
* DESCRIPTION: Release the ACPI Global Lock. The handle must be valid.
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_release_global_lock
(
u32
handle
)
acpi_status
acpi_release_global_lock
(
u32
handle
)
{
{
acpi_status
status
;
acpi_status
status
;
...
@@ -797,4 +792,4 @@ acpi_status acpi_release_global_lock(u32 handle)
...
@@ -797,4 +792,4 @@ acpi_status acpi_release_global_lock(u32 handle)
return
(
status
);
return
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_release_global_lock
);
ACPI_EXPORT_SYMBOL
(
acpi_release_global_lock
)
drivers/acpi/events/evxfevnt.c
浏览文件 @
b3899c66
...
@@ -41,8 +41,6 @@
...
@@ -41,8 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
* POSSIBILITY OF SUCH DAMAGES.
*/
*/
#include <linux/module.h>
#include <acpi/acpi.h>
#include <acpi/acpi.h>
#include <acpi/acevents.h>
#include <acpi/acevents.h>
#include <acpi/acnamesp.h>
#include <acpi/acnamesp.h>
...
@@ -65,7 +63,7 @@ acpi_status acpi_enable(void)
...
@@ -65,7 +63,7 @@ acpi_status acpi_enable(void)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE
(
"acpi_enable"
);
ACPI_FUNCTION_TRACE
(
acpi_enable
);
/* Make sure we have the FADT */
/* Make sure we have the FADT */
...
@@ -94,6 +92,8 @@ acpi_status acpi_enable(void)
...
@@ -94,6 +92,8 @@ acpi_status acpi_enable(void)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
ACPI_EXPORT_SYMBOL
(
acpi_enable
)
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: acpi_disable
* FUNCTION: acpi_disable
...
@@ -105,12 +105,11 @@ acpi_status acpi_enable(void)
...
@@ -105,12 +105,11 @@ acpi_status acpi_enable(void)
* DESCRIPTION: Transfers the system into LEGACY (non-ACPI) mode.
* DESCRIPTION: Transfers the system into LEGACY (non-ACPI) mode.
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_disable
(
void
)
acpi_status
acpi_disable
(
void
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE
(
"acpi_disable"
);
ACPI_FUNCTION_TRACE
(
acpi_disable
);
if
(
!
acpi_gbl_FADT
)
{
if
(
!
acpi_gbl_FADT
)
{
ACPI_WARNING
((
AE_INFO
,
"No FADT information present!"
));
ACPI_WARNING
((
AE_INFO
,
"No FADT information present!"
));
...
@@ -137,6 +136,8 @@ acpi_status acpi_disable(void)
...
@@ -137,6 +136,8 @@ acpi_status acpi_disable(void)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
ACPI_EXPORT_SYMBOL
(
acpi_disable
)
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: acpi_enable_event
* FUNCTION: acpi_enable_event
...
@@ -149,13 +150,12 @@ acpi_status acpi_disable(void)
...
@@ -149,13 +150,12 @@ acpi_status acpi_disable(void)
* DESCRIPTION: Enable an ACPI event (fixed)
* DESCRIPTION: Enable an ACPI event (fixed)
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_enable_event
(
u32
event
,
u32
flags
)
acpi_status
acpi_enable_event
(
u32
event
,
u32
flags
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
u32
value
;
u32
value
;
ACPI_FUNCTION_TRACE
(
"acpi_enable_event"
);
ACPI_FUNCTION_TRACE
(
acpi_enable_event
);
/* Decode the Fixed Event */
/* Decode the Fixed Event */
...
@@ -193,7 +193,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags)
...
@@ -193,7 +193,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_enable_event
);
ACPI_EXPORT_SYMBOL
(
acpi_enable_event
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -208,13 +208,12 @@ EXPORT_SYMBOL(acpi_enable_event);
...
@@ -208,13 +208,12 @@ EXPORT_SYMBOL(acpi_enable_event);
* DESCRIPTION: Set the type of an individual GPE
* DESCRIPTION: Set the type of an individual GPE
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_set_gpe_type
(
acpi_handle
gpe_device
,
u32
gpe_number
,
u8
type
)
acpi_status
acpi_set_gpe_type
(
acpi_handle
gpe_device
,
u32
gpe_number
,
u8
type
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
struct
acpi_gpe_event_info
*
gpe_event_info
;
struct
acpi_gpe_event_info
*
gpe_event_info
;
ACPI_FUNCTION_TRACE
(
"acpi_set_gpe_type"
);
ACPI_FUNCTION_TRACE
(
acpi_set_gpe_type
);
/* Ensure that we have a valid GPE number */
/* Ensure that we have a valid GPE number */
...
@@ -236,7 +235,7 @@ acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type)
...
@@ -236,7 +235,7 @@ acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_set_gpe_type
);
ACPI_EXPORT_SYMBOL
(
acpi_set_gpe_type
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -252,13 +251,12 @@ EXPORT_SYMBOL(acpi_set_gpe_type);
...
@@ -252,13 +251,12 @@ EXPORT_SYMBOL(acpi_set_gpe_type);
* DESCRIPTION: Enable an ACPI event (general purpose)
* DESCRIPTION: Enable an ACPI event (general purpose)
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_enable_gpe
(
acpi_handle
gpe_device
,
u32
gpe_number
,
u32
flags
)
acpi_status
acpi_enable_gpe
(
acpi_handle
gpe_device
,
u32
gpe_number
,
u32
flags
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
struct
acpi_gpe_event_info
*
gpe_event_info
;
struct
acpi_gpe_event_info
*
gpe_event_info
;
ACPI_FUNCTION_TRACE
(
"acpi_enable_gpe"
);
ACPI_FUNCTION_TRACE
(
acpi_enable_gpe
);
/* Use semaphore lock if not executing at interrupt level */
/* Use semaphore lock if not executing at interrupt level */
...
@@ -288,7 +286,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
...
@@ -288,7 +286,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_enable_gpe
);
ACPI_EXPORT_SYMBOL
(
acpi_enable_gpe
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -304,13 +302,12 @@ EXPORT_SYMBOL(acpi_enable_gpe);
...
@@ -304,13 +302,12 @@ EXPORT_SYMBOL(acpi_enable_gpe);
* DESCRIPTION: Disable an ACPI event (general purpose)
* DESCRIPTION: Disable an ACPI event (general purpose)
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_disable_gpe
(
acpi_handle
gpe_device
,
u32
gpe_number
,
u32
flags
)
acpi_status
acpi_disable_gpe
(
acpi_handle
gpe_device
,
u32
gpe_number
,
u32
flags
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
struct
acpi_gpe_event_info
*
gpe_event_info
;
struct
acpi_gpe_event_info
*
gpe_event_info
;
ACPI_FUNCTION_TRACE
(
"acpi_disable_gpe"
);
ACPI_FUNCTION_TRACE
(
acpi_disable_gpe
);
/* Use semaphore lock if not executing at interrupt level */
/* Use semaphore lock if not executing at interrupt level */
...
@@ -338,6 +335,8 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
...
@@ -338,6 +335,8 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
ACPI_EXPORT_SYMBOL
(
acpi_disable_gpe
)
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: acpi_disable_event
* FUNCTION: acpi_disable_event
...
@@ -350,13 +349,12 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
...
@@ -350,13 +349,12 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
* DESCRIPTION: Disable an ACPI event (fixed)
* DESCRIPTION: Disable an ACPI event (fixed)
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_disable_event
(
u32
event
,
u32
flags
)
acpi_status
acpi_disable_event
(
u32
event
,
u32
flags
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
u32
value
;
u32
value
;
ACPI_FUNCTION_TRACE
(
"acpi_disable_event"
);
ACPI_FUNCTION_TRACE
(
acpi_disable_event
);
/* Decode the Fixed Event */
/* Decode the Fixed Event */
...
@@ -392,7 +390,7 @@ acpi_status acpi_disable_event(u32 event, u32 flags)
...
@@ -392,7 +390,7 @@ acpi_status acpi_disable_event(u32 event, u32 flags)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_disable_event
);
ACPI_EXPORT_SYMBOL
(
acpi_disable_event
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -405,12 +403,11 @@ EXPORT_SYMBOL(acpi_disable_event);
...
@@ -405,12 +403,11 @@ EXPORT_SYMBOL(acpi_disable_event);
* DESCRIPTION: Clear an ACPI event (fixed)
* DESCRIPTION: Clear an ACPI event (fixed)
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_clear_event
(
u32
event
)
acpi_status
acpi_clear_event
(
u32
event
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE
(
"acpi_clear_event"
);
ACPI_FUNCTION_TRACE
(
acpi_clear_event
);
/* Decode the Fixed Event */
/* Decode the Fixed Event */
...
@@ -429,7 +426,7 @@ acpi_status acpi_clear_event(u32 event)
...
@@ -429,7 +426,7 @@ acpi_status acpi_clear_event(u32 event)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_clear_event
);
ACPI_EXPORT_SYMBOL
(
acpi_clear_event
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -444,13 +441,12 @@ EXPORT_SYMBOL(acpi_clear_event);
...
@@ -444,13 +441,12 @@ EXPORT_SYMBOL(acpi_clear_event);
* DESCRIPTION: Clear an ACPI event (general purpose)
* DESCRIPTION: Clear an ACPI event (general purpose)
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_clear_gpe
(
acpi_handle
gpe_device
,
u32
gpe_number
,
u32
flags
)
acpi_status
acpi_clear_gpe
(
acpi_handle
gpe_device
,
u32
gpe_number
,
u32
flags
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
struct
acpi_gpe_event_info
*
gpe_event_info
;
struct
acpi_gpe_event_info
*
gpe_event_info
;
ACPI_FUNCTION_TRACE
(
"acpi_clear_gpe"
);
ACPI_FUNCTION_TRACE
(
acpi_clear_gpe
);
/* Use semaphore lock if not executing at interrupt level */
/* Use semaphore lock if not executing at interrupt level */
...
@@ -478,6 +474,8 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
...
@@ -478,6 +474,8 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
ACPI_EXPORT_SYMBOL
(
acpi_clear_gpe
)
#ifdef ACPI_FUTURE_USAGE
#ifdef ACPI_FUTURE_USAGE
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -492,12 +490,11 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
...
@@ -492,12 +490,11 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
* DESCRIPTION: Obtains and returns the current status of the event
* DESCRIPTION: Obtains and returns the current status of the event
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_get_event_status
(
u32
event
,
acpi_event_status
*
event_status
)
acpi_status
acpi_get_event_status
(
u32
event
,
acpi_event_status
*
event_status
)
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE
(
"acpi_get_event_status"
);
ACPI_FUNCTION_TRACE
(
acpi_get_event_status
);
if
(
!
event_status
)
{
if
(
!
event_status
)
{
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
...
@@ -518,6 +515,8 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
...
@@ -518,6 +515,8 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
ACPI_EXPORT_SYMBOL
(
acpi_get_event_status
)
/*******************************************************************************
/*******************************************************************************
*
*
* FUNCTION: acpi_get_gpe_status
* FUNCTION: acpi_get_gpe_status
...
@@ -533,7 +532,6 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
...
@@ -533,7 +532,6 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
* DESCRIPTION: Get status of an event (general purpose)
* DESCRIPTION: Get status of an event (general purpose)
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_status
acpi_get_gpe_status
(
acpi_handle
gpe_device
,
acpi_get_gpe_status
(
acpi_handle
gpe_device
,
u32
gpe_number
,
u32
flags
,
acpi_event_status
*
event_status
)
u32
gpe_number
,
u32
flags
,
acpi_event_status
*
event_status
)
...
@@ -541,7 +539,7 @@ acpi_get_gpe_status(acpi_handle gpe_device,
...
@@ -541,7 +539,7 @@ acpi_get_gpe_status(acpi_handle gpe_device,
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
struct
acpi_gpe_event_info
*
gpe_event_info
;
struct
acpi_gpe_event_info
*
gpe_event_info
;
ACPI_FUNCTION_TRACE
(
"acpi_get_gpe_status"
);
ACPI_FUNCTION_TRACE
(
acpi_get_gpe_status
);
/* Use semaphore lock if not executing at interrupt level */
/* Use semaphore lock if not executing at interrupt level */
...
@@ -570,6 +568,8 @@ acpi_get_gpe_status(acpi_handle gpe_device,
...
@@ -570,6 +568,8 @@ acpi_get_gpe_status(acpi_handle gpe_device,
}
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
ACPI_EXPORT_SYMBOL
(
acpi_get_gpe_status
)
#endif
/* ACPI_FUTURE_USAGE */
#endif
/* ACPI_FUTURE_USAGE */
/*******************************************************************************
/*******************************************************************************
...
@@ -586,7 +586,6 @@ acpi_get_gpe_status(acpi_handle gpe_device,
...
@@ -586,7 +586,6 @@ acpi_get_gpe_status(acpi_handle gpe_device,
* DESCRIPTION: Create and Install a block of GPE registers
* DESCRIPTION: Create and Install a block of GPE registers
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_status
acpi_install_gpe_block
(
acpi_handle
gpe_device
,
acpi_install_gpe_block
(
acpi_handle
gpe_device
,
struct
acpi_generic_address
*
gpe_block_address
,
struct
acpi_generic_address
*
gpe_block_address
,
...
@@ -597,7 +596,7 @@ acpi_install_gpe_block(acpi_handle gpe_device,
...
@@ -597,7 +596,7 @@ acpi_install_gpe_block(acpi_handle gpe_device,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
struct
acpi_gpe_block_info
*
gpe_block
;
struct
acpi_gpe_block_info
*
gpe_block
;
ACPI_FUNCTION_TRACE
(
"acpi_install_gpe_block"
);
ACPI_FUNCTION_TRACE
(
acpi_install_gpe_block
);
if
((
!
gpe_device
)
||
(
!
gpe_block_address
)
||
(
!
register_count
))
{
if
((
!
gpe_device
)
||
(
!
gpe_block_address
)
||
(
!
register_count
))
{
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
...
@@ -636,6 +635,7 @@ acpi_install_gpe_block(acpi_handle gpe_device,
...
@@ -636,6 +635,7 @@ acpi_install_gpe_block(acpi_handle gpe_device,
obj_desc
=
acpi_ns_get_attached_object
(
node
);
obj_desc
=
acpi_ns_get_attached_object
(
node
);
if
(
!
obj_desc
)
{
if
(
!
obj_desc
)
{
/* No object, create a new one */
/* No object, create a new one */
obj_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_DEVICE
);
obj_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_DEVICE
);
...
@@ -665,7 +665,7 @@ acpi_install_gpe_block(acpi_handle gpe_device,
...
@@ -665,7 +665,7 @@ acpi_install_gpe_block(acpi_handle gpe_device,
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_install_gpe_block
);
ACPI_EXPORT_SYMBOL
(
acpi_install_gpe_block
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -678,14 +678,13 @@ EXPORT_SYMBOL(acpi_install_gpe_block);
...
@@ -678,14 +678,13 @@ EXPORT_SYMBOL(acpi_install_gpe_block);
* DESCRIPTION: Remove a previously installed block of GPE registers
* DESCRIPTION: Remove a previously installed block of GPE registers
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_remove_gpe_block
(
acpi_handle
gpe_device
)
acpi_status
acpi_remove_gpe_block
(
acpi_handle
gpe_device
)
{
{
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
acpi_status
status
;
acpi_status
status
;
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
ACPI_FUNCTION_TRACE
(
"acpi_remove_gpe_block"
);
ACPI_FUNCTION_TRACE
(
acpi_remove_gpe_block
);
if
(
!
gpe_device
)
{
if
(
!
gpe_device
)
{
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
...
@@ -721,4 +720,4 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device)
...
@@ -721,4 +720,4 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device)
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_remove_gpe_block
);
ACPI_EXPORT_SYMBOL
(
acpi_remove_gpe_block
)
drivers/acpi/events/evxfregn.c
浏览文件 @
b3899c66
...
@@ -42,8 +42,6 @@
...
@@ -42,8 +42,6 @@
* POSSIBILITY OF SUCH DAMAGES.
* POSSIBILITY OF SUCH DAMAGES.
*/
*/
#include <linux/module.h>
#include <acpi/acpi.h>
#include <acpi/acpi.h>
#include <acpi/acnamesp.h>
#include <acpi/acnamesp.h>
#include <acpi/acevents.h>
#include <acpi/acevents.h>
...
@@ -75,7 +73,7 @@ acpi_install_address_space_handler(acpi_handle device,
...
@@ -75,7 +73,7 @@ acpi_install_address_space_handler(acpi_handle device,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"acpi_install_address_space_handler"
);
ACPI_FUNCTION_TRACE
(
acpi_install_address_space_handler
);
/* Parameter validation */
/* Parameter validation */
...
@@ -114,7 +112,7 @@ acpi_install_address_space_handler(acpi_handle device,
...
@@ -114,7 +112,7 @@ acpi_install_address_space_handler(acpi_handle device,
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_install_address_space_handler
);
ACPI_EXPORT_SYMBOL
(
acpi_install_address_space_handler
)
/*******************************************************************************
/*******************************************************************************
*
*
...
@@ -129,7 +127,6 @@ EXPORT_SYMBOL(acpi_install_address_space_handler);
...
@@ -129,7 +127,6 @@ EXPORT_SYMBOL(acpi_install_address_space_handler);
* DESCRIPTION: Remove a previously installed handler.
* DESCRIPTION: Remove a previously installed handler.
*
*
******************************************************************************/
******************************************************************************/
acpi_status
acpi_status
acpi_remove_address_space_handler
(
acpi_handle
device
,
acpi_remove_address_space_handler
(
acpi_handle
device
,
acpi_adr_space_type
space_id
,
acpi_adr_space_type
space_id
,
...
@@ -142,7 +139,7 @@ acpi_remove_address_space_handler(acpi_handle device,
...
@@ -142,7 +139,7 @@ acpi_remove_address_space_handler(acpi_handle device,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"acpi_remove_address_space_handler"
);
ACPI_FUNCTION_TRACE
(
acpi_remove_address_space_handler
);
/* Parameter validation */
/* Parameter validation */
...
@@ -176,9 +173,11 @@ acpi_remove_address_space_handler(acpi_handle device,
...
@@ -176,9 +173,11 @@ acpi_remove_address_space_handler(acpi_handle device,
handler_obj
=
obj_desc
->
device
.
handler
;
handler_obj
=
obj_desc
->
device
.
handler
;
last_obj_ptr
=
&
obj_desc
->
device
.
handler
;
last_obj_ptr
=
&
obj_desc
->
device
.
handler
;
while
(
handler_obj
)
{
while
(
handler_obj
)
{
/* We have a handler, see if user requested this one */
/* We have a handler, see if user requested this one */
if
(
handler_obj
->
address_space
.
space_id
==
space_id
)
{
if
(
handler_obj
->
address_space
.
space_id
==
space_id
)
{
/* Matched space_id, first dereference this in the Regions */
/* Matched space_id, first dereference this in the Regions */
ACPI_DEBUG_PRINT
((
ACPI_DB_OPREGION
,
ACPI_DEBUG_PRINT
((
ACPI_DB_OPREGION
,
...
@@ -229,7 +228,7 @@ acpi_remove_address_space_handler(acpi_handle device,
...
@@ -229,7 +228,7 @@ acpi_remove_address_space_handler(acpi_handle device,
/* The handler does not exist */
/* The handler does not exist */
ACPI_DEBUG_PRINT
((
ACPI_DB_OPREGION
,
ACPI_DEBUG_PRINT
((
ACPI_DB_OPREGION
,
"Unable to remove address handler %p for %s(%X),
dev_n
ode %p, obj %p
\n
"
,
"Unable to remove address handler %p for %s(%X),
DevN
ode %p, obj %p
\n
"
,
handler
,
acpi_ut_get_region_name
(
space_id
),
space_id
,
handler
,
acpi_ut_get_region_name
(
space_id
),
space_id
,
node
,
obj_desc
));
node
,
obj_desc
));
...
@@ -240,4 +239,4 @@ acpi_remove_address_space_handler(acpi_handle device,
...
@@ -240,4 +239,4 @@ acpi_remove_address_space_handler(acpi_handle device,
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
EXPORT_SYMBOL
(
acpi_remove_address_space_handler
);
ACPI_EXPORT_SYMBOL
(
acpi_remove_address_space_handler
)
drivers/acpi/executer/exconfig.c
浏览文件 @
b3899c66
...
@@ -82,7 +82,7 @@ acpi_ex_add_table(struct acpi_table_header *table,
...
@@ -82,7 +82,7 @@ acpi_ex_add_table(struct acpi_table_header *table,
struct
acpi_table_desc
table_info
;
struct
acpi_table_desc
table_info
;
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
ACPI_FUNCTION_TRACE
(
"ex_add_table"
);
ACPI_FUNCTION_TRACE
(
ex_add_table
);
/* Create an object to be the table handle */
/* Create an object to be the table handle */
...
@@ -100,7 +100,7 @@ acpi_ex_add_table(struct acpi_table_header *table,
...
@@ -100,7 +100,7 @@ acpi_ex_add_table(struct acpi_table_header *table,
ACPI_MEMSET
(
&
table_info
,
0
,
sizeof
(
struct
acpi_table_desc
));
ACPI_MEMSET
(
&
table_info
,
0
,
sizeof
(
struct
acpi_table_desc
));
table_info
.
type
=
ACPI_TABLE_SSDT
;
table_info
.
type
=
ACPI_TABLE_
ID_
SSDT
;
table_info
.
pointer
=
table
;
table_info
.
pointer
=
table
;
table_info
.
length
=
(
acpi_size
)
table
->
length
;
table_info
.
length
=
(
acpi_size
)
table
->
length
;
table_info
.
allocation
=
ACPI_MEM_ALLOCATED
;
table_info
.
allocation
=
ACPI_MEM_ALLOCATED
;
...
@@ -110,6 +110,7 @@ acpi_ex_add_table(struct acpi_table_header *table,
...
@@ -110,6 +110,7 @@ acpi_ex_add_table(struct acpi_table_header *table,
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
if
(
status
==
AE_ALREADY_EXISTS
)
{
if
(
status
==
AE_ALREADY_EXISTS
)
{
/* Table already exists, just return the handle */
/* Table already exists, just return the handle */
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -121,6 +122,7 @@ acpi_ex_add_table(struct acpi_table_header *table,
...
@@ -121,6 +122,7 @@ acpi_ex_add_table(struct acpi_table_header *table,
status
=
acpi_ns_load_table
(
table_info
.
installed_desc
,
parent_node
);
status
=
acpi_ns_load_table
(
table_info
.
installed_desc
,
parent_node
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
/* Uninstall table on error */
/* Uninstall table on error */
(
void
)
acpi_tb_uninstall_table
(
table_info
.
installed_desc
);
(
void
)
acpi_tb_uninstall_table
(
table_info
.
installed_desc
);
...
@@ -160,7 +162,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
...
@@ -160,7 +162,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
struct
acpi_namespace_node
*
parameter_node
=
NULL
;
struct
acpi_namespace_node
*
parameter_node
=
NULL
;
union
acpi_operand_object
*
ddb_handle
;
union
acpi_operand_object
*
ddb_handle
;
ACPI_FUNCTION_TRACE
(
"ex_load_table_op"
);
ACPI_FUNCTION_TRACE
(
ex_load_table_op
);
#if 0
#if 0
/*
/*
...
@@ -169,6 +171,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
...
@@ -169,6 +171,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
*/
*/
status = acpi_tb_match_signature(operand[0]->string.pointer, NULL);
status = acpi_tb_match_signature(operand[0]->string.pointer, NULL);
if (status == AE_OK) {
if (status == AE_OK) {
/* Signature matched -- don't allow override */
/* Signature matched -- don't allow override */
return_ACPI_STATUS(AE_ALREADY_EXISTS);
return_ACPI_STATUS(AE_ALREADY_EXISTS);
...
@@ -211,9 +214,8 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
...
@@ -211,9 +214,8 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
* location within the namespace where the table will be loaded.
* location within the namespace where the table will be loaded.
*/
*/
status
=
status
=
acpi_ns_get_node_by_path
(
operand
[
3
]
->
string
.
pointer
,
acpi_ns_get_node
(
start_node
,
operand
[
3
]
->
string
.
pointer
,
start_node
,
ACPI_NS_SEARCH_PARENT
,
ACPI_NS_SEARCH_PARENT
,
&
parent_node
);
&
parent_node
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
@@ -234,9 +236,8 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
...
@@ -234,9 +236,8 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
/* Find the node referenced by the parameter_path_string */
/* Find the node referenced by the parameter_path_string */
status
=
status
=
acpi_ns_get_node_by_path
(
operand
[
4
]
->
string
.
pointer
,
acpi_ns_get_node
(
start_node
,
operand
[
4
]
->
string
.
pointer
,
start_node
,
ACPI_NS_SEARCH_PARENT
,
ACPI_NS_SEARCH_PARENT
,
&
parameter_node
);
&
parameter_node
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
@@ -252,6 +253,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
...
@@ -252,6 +253,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
/* Parameter Data (optional) */
/* Parameter Data (optional) */
if
(
parameter_node
)
{
if
(
parameter_node
)
{
/* Store the parameter data into the optional parameter object */
/* Store the parameter data into the optional parameter object */
status
=
acpi_ex_store
(
operand
[
5
],
status
=
acpi_ex_store
(
operand
[
5
],
...
@@ -294,9 +296,10 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
...
@@ -294,9 +296,10 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
struct
acpi_table_header
*
table_ptr
=
NULL
;
struct
acpi_table_header
*
table_ptr
=
NULL
;
acpi_physical_address
address
;
acpi_physical_address
address
;
struct
acpi_table_header
table_header
;
struct
acpi_table_header
table_header
;
acpi_integer
temp
;
u32
i
;
u32
i
;
ACPI_FUNCTION_TRACE
(
"ex_load_op"
);
ACPI_FUNCTION_TRACE
(
ex_load_op
);
/* Object can be either an op_region or a Field */
/* Object can be either an op_region or a Field */
...
@@ -322,7 +325,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
...
@@ -322,7 +325,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
address
=
obj_desc
->
region
.
address
;
address
=
obj_desc
->
region
.
address
;
/* Get
the table length from the table header
*/
/* Get
part of the table header to get the table length
*/
table_header
.
length
=
0
;
table_header
.
length
=
0
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
for
(
i
=
0
;
i
<
8
;
i
++
)
{
...
@@ -330,11 +333,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
...
@@ -330,11 +333,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
acpi_ev_address_space_dispatch
(
obj_desc
,
ACPI_READ
,
acpi_ev_address_space_dispatch
(
obj_desc
,
ACPI_READ
,
(
acpi_physical_address
)
(
acpi_physical_address
)
(
i
+
address
),
8
,
(
i
+
address
),
8
,
((
u8
*
)
&
&
temp
);
table_header
)
+
i
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
/* Get the one valid byte of the returned 64-bit value */
ACPI_CAST_PTR
(
u8
,
&
table_header
)[
i
]
=
(
u8
)
temp
;
}
}
/* Sanity check the table length */
/* Sanity check the table length */
...
@@ -345,7 +351,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
...
@@ -345,7 +351,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
/* Allocate a buffer for the entire table */
/* Allocate a buffer for the entire table */
table_ptr
=
ACPI_
MEM_
ALLOCATE
(
table_header
.
length
);
table_ptr
=
ACPI_ALLOCATE
(
table_header
.
length
);
if
(
!
table_ptr
)
{
if
(
!
table_ptr
)
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
}
...
@@ -357,11 +363,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
...
@@ -357,11 +363,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
acpi_ev_address_space_dispatch
(
obj_desc
,
ACPI_READ
,
acpi_ev_address_space_dispatch
(
obj_desc
,
ACPI_READ
,
(
acpi_physical_address
)
(
acpi_physical_address
)
(
i
+
address
),
8
,
(
i
+
address
),
8
,
((
u8
*
)
table_ptr
+
&
temp
);
i
));
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
goto
cleanup
;
goto
cleanup
;
}
}
/* Get the one valid byte of the returned 64-bit value */
ACPI_CAST_PTR
(
u8
,
table_ptr
)[
i
]
=
(
u8
)
temp
;
}
}
break
;
break
;
...
@@ -407,12 +416,8 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
...
@@ -407,12 +416,8 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
/* The table must be either an SSDT or a PSDT */
/* The table must be either an SSDT or a PSDT */
if
((
!
ACPI_STRNCMP
(
table_ptr
->
signature
,
if
((
!
ACPI_COMPARE_NAME
(
table_ptr
->
signature
,
PSDT_SIG
))
&&
acpi_gbl_table_data
[
ACPI_TABLE_PSDT
].
signature
,
(
!
ACPI_COMPARE_NAME
(
table_ptr
->
signature
,
SSDT_SIG
)))
{
acpi_gbl_table_data
[
ACPI_TABLE_PSDT
].
sig_length
))
&&
(
!
ACPI_STRNCMP
(
table_ptr
->
signature
,
acpi_gbl_table_data
[
ACPI_TABLE_SSDT
].
signature
,
acpi_gbl_table_data
[
ACPI_TABLE_SSDT
].
sig_length
)))
{
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Table has invalid signature [%4.4s], must be SSDT or PSDT"
,
"Table has invalid signature [%4.4s], must be SSDT or PSDT"
,
table_ptr
->
signature
));
table_ptr
->
signature
));
...
@@ -424,6 +429,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
...
@@ -424,6 +429,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
status
=
acpi_ex_add_table
(
table_ptr
,
acpi_gbl_root_node
,
&
ddb_handle
);
status
=
acpi_ex_add_table
(
table_ptr
,
acpi_gbl_root_node
,
&
ddb_handle
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
/* On error, table_ptr was deallocated above */
/* On error, table_ptr was deallocated above */
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
...
@@ -442,7 +448,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
...
@@ -442,7 +448,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
cleanup:
cleanup:
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_
MEM_
FREE
(
table_ptr
);
ACPI_FREE
(
table_ptr
);
}
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
@@ -465,7 +471,7 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle)
...
@@ -465,7 +471,7 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle)
union
acpi_operand_object
*
table_desc
=
ddb_handle
;
union
acpi_operand_object
*
table_desc
=
ddb_handle
;
struct
acpi_table_desc
*
table_info
;
struct
acpi_table_desc
*
table_info
;
ACPI_FUNCTION_TRACE
(
"ex_unload_table"
);
ACPI_FUNCTION_TRACE
(
ex_unload_table
);
/*
/*
* Validate the handle
* Validate the handle
...
...
drivers/acpi/executer/exconvrt.c
浏览文件 @
b3899c66
...
@@ -79,7 +79,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
...
@@ -79,7 +79,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
u32
count
;
u32
count
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE_PTR
(
"ex_convert_to_integer"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
ex_convert_to_integer
,
obj_desc
);
switch
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
))
{
switch
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
))
{
case
ACPI_TYPE_INTEGER
:
case
ACPI_TYPE_INTEGER
:
...
@@ -199,7 +199,7 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,
...
@@ -199,7 +199,7 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,
union
acpi_operand_object
*
return_desc
;
union
acpi_operand_object
*
return_desc
;
u8
*
new_buf
;
u8
*
new_buf
;
ACPI_FUNCTION_TRACE_PTR
(
"ex_convert_to_buffer"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
ex_convert_to_buffer
,
obj_desc
);
switch
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
))
{
switch
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
))
{
case
ACPI_TYPE_BUFFER
:
case
ACPI_TYPE_BUFFER
:
...
@@ -319,6 +319,7 @@ acpi_ex_convert_to_ascii(acpi_integer integer,
...
@@ -319,6 +319,7 @@ acpi_ex_convert_to_ascii(acpi_integer integer,
remainder
=
0
;
remainder
=
0
;
for
(
i
=
decimal_length
;
i
>
0
;
i
--
)
{
for
(
i
=
decimal_length
;
i
>
0
;
i
--
)
{
/* Divide by nth factor of 10 */
/* Divide by nth factor of 10 */
digit
=
integer
;
digit
=
integer
;
...
@@ -346,6 +347,7 @@ acpi_ex_convert_to_ascii(acpi_integer integer,
...
@@ -346,6 +347,7 @@ acpi_ex_convert_to_ascii(acpi_integer integer,
hex_length
=
(
acpi_native_uint
)
ACPI_MUL_2
(
data_width
);
hex_length
=
(
acpi_native_uint
)
ACPI_MUL_2
(
data_width
);
for
(
i
=
0
,
j
=
(
hex_length
-
1
);
i
<
hex_length
;
i
++
,
j
--
)
{
for
(
i
=
0
,
j
=
(
hex_length
-
1
);
i
<
hex_length
;
i
++
,
j
--
)
{
/* Get one hex digit, most significant digits first */
/* Get one hex digit, most significant digits first */
string
[
k
]
=
string
[
k
]
=
...
@@ -400,7 +402,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
...
@@ -400,7 +402,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
u16
base
=
16
;
u16
base
=
16
;
u8
separator
=
','
;
u8
separator
=
','
;
ACPI_FUNCTION_TRACE_PTR
(
"ex_convert_to_string"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
ex_convert_to_string
,
obj_desc
);
switch
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
))
{
switch
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
))
{
case
ACPI_TYPE_STRING
:
case
ACPI_TYPE_STRING
:
...
@@ -567,7 +569,7 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
...
@@ -567,7 +569,7 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
{
{
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE
(
"ex_convert_to_target_type"
);
ACPI_FUNCTION_TRACE
(
ex_convert_to_target_type
);
/* Default behavior */
/* Default behavior */
...
@@ -657,7 +659,7 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
...
@@ -657,7 +659,7 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type,
default:
default:
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Unknown Target type ID 0x%X
aml_opcode %X dest_t
ype %s"
,
"Unknown Target type ID 0x%X
AmlOpcode %X DestT
ype %s"
,
GET_CURRENT_ARG_TYPE
(
walk_state
->
op_info
->
GET_CURRENT_ARG_TYPE
(
walk_state
->
op_info
->
runtime_args
),
runtime_args
),
walk_state
->
opcode
,
walk_state
->
opcode
,
...
...
drivers/acpi/executer/excreate.c
浏览文件 @
b3899c66
...
@@ -69,7 +69,7 @@ acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state)
...
@@ -69,7 +69,7 @@ acpi_status acpi_ex_create_alias(struct acpi_walk_state *walk_state)
struct
acpi_namespace_node
*
alias_node
;
struct
acpi_namespace_node
*
alias_node
;
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE
(
"ex_create_alias"
);
ACPI_FUNCTION_TRACE
(
ex_create_alias
);
/* Get the source/alias operands (both namespace nodes) */
/* Get the source/alias operands (both namespace nodes) */
...
@@ -164,7 +164,7 @@ acpi_status acpi_ex_create_event(struct acpi_walk_state *walk_state)
...
@@ -164,7 +164,7 @@ acpi_status acpi_ex_create_event(struct acpi_walk_state *walk_state)
acpi_status
status
;
acpi_status
status
;
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
ACPI_FUNCTION_TRACE
(
"ex_create_event"
);
ACPI_FUNCTION_TRACE
(
ex_create_event
);
obj_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_EVENT
);
obj_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_EVENT
);
if
(
!
obj_desc
)
{
if
(
!
obj_desc
)
{
...
@@ -216,7 +216,7 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state)
...
@@ -216,7 +216,7 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state)
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
ACPI_FUNCTION_TRACE_PTR
(
"ex_create_mutex"
,
ACPI_WALK_OPERANDS
);
ACPI_FUNCTION_TRACE_PTR
(
ex_create_mutex
,
ACPI_WALK_OPERANDS
);
/* Create the new mutex object */
/* Create the new mutex object */
...
@@ -243,8 +243,9 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state)
...
@@ -243,8 +243,9 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state)
obj_desc
->
mutex
.
node
=
obj_desc
->
mutex
.
node
=
(
struct
acpi_namespace_node
*
)
walk_state
->
operands
[
0
];
(
struct
acpi_namespace_node
*
)
walk_state
->
operands
[
0
];
status
=
acpi_ns_attach_object
(
obj_desc
->
mutex
.
node
,
status
=
obj_desc
,
ACPI_TYPE_MUTEX
);
acpi_ns_attach_object
(
obj_desc
->
mutex
.
node
,
obj_desc
,
ACPI_TYPE_MUTEX
);
cleanup:
cleanup:
/*
/*
...
@@ -280,7 +281,7 @@ acpi_ex_create_region(u8 * aml_start,
...
@@ -280,7 +281,7 @@ acpi_ex_create_region(u8 * aml_start,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
union
acpi_operand_object
*
region_obj2
;
union
acpi_operand_object
*
region_obj2
;
ACPI_FUNCTION_TRACE
(
"ex_create_region"
);
ACPI_FUNCTION_TRACE
(
ex_create_region
);
/* Get the Namespace Node */
/* Get the Namespace Node */
...
@@ -300,7 +301,7 @@ acpi_ex_create_region(u8 * aml_start,
...
@@ -300,7 +301,7 @@ acpi_ex_create_region(u8 * aml_start,
*/
*/
if
((
region_space
>=
ACPI_NUM_PREDEFINED_REGIONS
)
&&
if
((
region_space
>=
ACPI_NUM_PREDEFINED_REGIONS
)
&&
(
region_space
<
ACPI_USER_REGION_BEGIN
))
{
(
region_space
<
ACPI_USER_REGION_BEGIN
))
{
ACPI_ERROR
((
AE_INFO
,
"Invalid
address_s
pace type %X"
,
ACPI_ERROR
((
AE_INFO
,
"Invalid
AddressS
pace type %X"
,
region_space
));
region_space
));
return_ACPI_STATUS
(
AE_AML_INVALID_SPACE_ID
);
return_ACPI_STATUS
(
AE_AML_INVALID_SPACE_ID
);
}
}
...
@@ -364,7 +365,7 @@ acpi_status acpi_ex_create_table_region(struct acpi_walk_state *walk_state)
...
@@ -364,7 +365,7 @@ acpi_status acpi_ex_create_table_region(struct acpi_walk_state *walk_state)
struct
acpi_table_header
*
table
;
struct
acpi_table_header
*
table
;
union
acpi_operand_object
*
region_obj2
;
union
acpi_operand_object
*
region_obj2
;
ACPI_FUNCTION_TRACE
(
"ex_create_table_region"
);
ACPI_FUNCTION_TRACE
(
ex_create_table_region
);
/* Get the Node from the object stack */
/* Get the Node from the object stack */
...
@@ -452,7 +453,7 @@ acpi_status acpi_ex_create_processor(struct acpi_walk_state *walk_state)
...
@@ -452,7 +453,7 @@ acpi_status acpi_ex_create_processor(struct acpi_walk_state *walk_state)
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE_PTR
(
"ex_create_processor"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ex_create_processor
,
walk_state
);
/* Create the processor object */
/* Create the processor object */
...
@@ -464,9 +465,9 @@ acpi_status acpi_ex_create_processor(struct acpi_walk_state *walk_state)
...
@@ -464,9 +465,9 @@ acpi_status acpi_ex_create_processor(struct acpi_walk_state *walk_state)
/* Initialize the processor object from the operands */
/* Initialize the processor object from the operands */
obj_desc
->
processor
.
proc_id
=
(
u8
)
operand
[
1
]
->
integer
.
value
;
obj_desc
->
processor
.
proc_id
=
(
u8
)
operand
[
1
]
->
integer
.
value
;
obj_desc
->
processor
.
length
=
(
u8
)
operand
[
3
]
->
integer
.
value
;
obj_desc
->
processor
.
address
=
obj_desc
->
processor
.
address
=
(
acpi_io_address
)
operand
[
2
]
->
integer
.
value
;
(
acpi_io_address
)
operand
[
2
]
->
integer
.
value
;
obj_desc
->
processor
.
length
=
(
u8
)
operand
[
3
]
->
integer
.
value
;
/* Install the processor object in the parent Node */
/* Install the processor object in the parent Node */
...
@@ -499,7 +500,7 @@ acpi_status acpi_ex_create_power_resource(struct acpi_walk_state *walk_state)
...
@@ -499,7 +500,7 @@ acpi_status acpi_ex_create_power_resource(struct acpi_walk_state *walk_state)
acpi_status
status
;
acpi_status
status
;
union
acpi_operand_object
*
obj_desc
;
union
acpi_operand_object
*
obj_desc
;
ACPI_FUNCTION_TRACE_PTR
(
"ex_create_power_resource"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ex_create_power_resource
,
walk_state
);
/* Create the power resource object */
/* Create the power resource object */
...
@@ -549,7 +550,7 @@ acpi_ex_create_method(u8 * aml_start,
...
@@ -549,7 +550,7 @@ acpi_ex_create_method(u8 * aml_start,
acpi_status
status
;
acpi_status
status
;
u8
method_flags
;
u8
method_flags
;
ACPI_FUNCTION_TRACE_PTR
(
"ex_create_method"
,
walk_state
);
ACPI_FUNCTION_TRACE_PTR
(
ex_create_method
,
walk_state
);
/* Create a new method object */
/* Create a new method object */
...
...
drivers/acpi/executer/exdump.c
浏览文件 @
b3899c66
...
@@ -61,6 +61,10 @@ static void acpi_ex_out_pointer(char *title, void *value);
...
@@ -61,6 +61,10 @@ static void acpi_ex_out_pointer(char *title, void *value);
static
void
acpi_ex_out_address
(
char
*
title
,
acpi_physical_address
value
);
static
void
acpi_ex_out_address
(
char
*
title
,
acpi_physical_address
value
);
static
void
acpi_ex_dump_object
(
union
acpi_operand_object
*
obj_desc
,
struct
acpi_exdump_info
*
info
);
static
void
acpi_ex_dump_reference_obj
(
union
acpi_operand_object
*
obj_desc
);
static
void
acpi_ex_dump_reference_obj
(
union
acpi_operand_object
*
obj_desc
);
static
void
static
void
...
@@ -119,7 +123,7 @@ static struct acpi_exdump_info acpi_ex_dump_event[2] = {
...
@@ -119,7 +123,7 @@ static struct acpi_exdump_info acpi_ex_dump_event[2] = {
static
struct
acpi_exdump_info
acpi_ex_dump_method
[
8
]
=
{
static
struct
acpi_exdump_info
acpi_ex_dump_method
[
8
]
=
{
{
ACPI_EXD_INIT
,
ACPI_EXD_TABLE_SIZE
(
acpi_ex_dump_method
),
NULL
},
{
ACPI_EXD_INIT
,
ACPI_EXD_TABLE_SIZE
(
acpi_ex_dump_method
),
NULL
},
{
ACPI_EXD_UINT8
,
ACPI_EXD_OFFSET
(
method
.
param_count
),
"
param_c
ount"
},
{
ACPI_EXD_UINT8
,
ACPI_EXD_OFFSET
(
method
.
param_count
),
"
ParamC
ount"
},
{
ACPI_EXD_UINT8
,
ACPI_EXD_OFFSET
(
method
.
concurrency
),
"Concurrency"
},
{
ACPI_EXD_UINT8
,
ACPI_EXD_OFFSET
(
method
.
concurrency
),
"Concurrency"
},
{
ACPI_EXD_POINTER
,
ACPI_EXD_OFFSET
(
method
.
semaphore
),
"Semaphore"
},
{
ACPI_EXD_POINTER
,
ACPI_EXD_OFFSET
(
method
.
semaphore
),
"Semaphore"
},
{
ACPI_EXD_UINT8
,
ACPI_EXD_OFFSET
(
method
.
owner_id
),
"Owner Id"
},
{
ACPI_EXD_UINT8
,
ACPI_EXD_OFFSET
(
method
.
owner_id
),
"Owner Id"
},
...
@@ -263,12 +267,10 @@ static struct acpi_exdump_info acpi_ex_dump_field_common[7] = {
...
@@ -263,12 +267,10 @@ static struct acpi_exdump_info acpi_ex_dump_field_common[7] = {
{
ACPI_EXD_POINTER
,
ACPI_EXD_OFFSET
(
common_field
.
node
),
"Parent Node"
}
{
ACPI_EXD_POINTER
,
ACPI_EXD_OFFSET
(
common_field
.
node
),
"Parent Node"
}
};
};
static
struct
acpi_exdump_info
acpi_ex_dump_node
[
6
]
=
{
static
struct
acpi_exdump_info
acpi_ex_dump_node
[
5
]
=
{
{
ACPI_EXD_INIT
,
ACPI_EXD_TABLE_SIZE
(
acpi_ex_dump_node
),
NULL
},
{
ACPI_EXD_INIT
,
ACPI_EXD_TABLE_SIZE
(
acpi_ex_dump_node
),
NULL
},
{
ACPI_EXD_UINT8
,
ACPI_EXD_NSOFFSET
(
flags
),
"Flags"
},
{
ACPI_EXD_UINT8
,
ACPI_EXD_NSOFFSET
(
flags
),
"Flags"
},
{
ACPI_EXD_UINT8
,
ACPI_EXD_NSOFFSET
(
owner_id
),
"Owner Id"
},
{
ACPI_EXD_UINT8
,
ACPI_EXD_NSOFFSET
(
owner_id
),
"Owner Id"
},
{
ACPI_EXD_UINT16
,
ACPI_EXD_NSOFFSET
(
reference_count
),
"Reference Count"
},
{
ACPI_EXD_POINTER
,
ACPI_EXD_NSOFFSET
(
child
),
"Child List"
},
{
ACPI_EXD_POINTER
,
ACPI_EXD_NSOFFSET
(
child
),
"Child List"
},
{
ACPI_EXD_POINTER
,
ACPI_EXD_NSOFFSET
(
peer
),
"Next Peer"
}
{
ACPI_EXD_POINTER
,
ACPI_EXD_NSOFFSET
(
peer
),
"Next Peer"
}
};
};
...
@@ -330,7 +332,7 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
...
@@ -330,7 +332,7 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
if
(
!
info
)
{
if
(
!
info
)
{
acpi_os_printf
acpi_os_printf
(
"
ex_dump_o
bject: Display not implemented for object type %s
\n
"
,
(
"
ExDumpO
bject: Display not implemented for object type %s
\n
"
,
acpi_ut_get_object_type_name
(
obj_desc
));
acpi_ut_get_object_type_name
(
obj_desc
));
return
;
return
;
}
}
...
@@ -454,7 +456,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
...
@@ -454,7 +456,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
u32
length
;
u32
length
;
u32
index
;
u32
index
;
ACPI_FUNCTION_NAME
(
"ex_dump_operand"
)
ACPI_FUNCTION_NAME
(
ex_dump_operand
)
if
(
!
if
(
!
((
ACPI_LV_EXEC
&
acpi_dbg_level
)
((
ACPI_LV_EXEC
&
acpi_dbg_level
)
...
@@ -463,6 +465,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
...
@@ -463,6 +465,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
}
}
if
(
!
obj_desc
)
{
if
(
!
obj_desc
)
{
/* This could be a null element of a package */
/* This could be a null element of a package */
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Null Object Descriptor
\n
"
));
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Null Object Descriptor
\n
"
));
...
@@ -522,7 +525,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
...
@@ -522,7 +525,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
case
AML_REF_OF_OP
:
case
AML_REF_OF_OP
:
acpi_os_printf
(
"Reference: (
ref_o
f) %p
\n
"
,
acpi_os_printf
(
"Reference: (
RefO
f) %p
\n
"
,
obj_desc
->
reference
.
object
);
obj_desc
->
reference
.
object
);
break
;
break
;
...
@@ -532,6 +535,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
...
@@ -532,6 +535,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
obj_desc
->
reference
.
offset
);
obj_desc
->
reference
.
offset
);
if
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
)
==
ACPI_TYPE_INTEGER
)
{
if
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
)
==
ACPI_TYPE_INTEGER
)
{
/* Value is an Integer */
/* Value is an Integer */
acpi_os_printf
(
" value is [%8.8X%8.8x]"
,
acpi_os_printf
(
" value is [%8.8X%8.8x]"
,
...
@@ -610,7 +614,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
...
@@ -610,7 +614,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
case
ACPI_TYPE_PACKAGE
:
case
ACPI_TYPE_PACKAGE
:
acpi_os_printf
(
"Package [Len %X]
element_a
rray %p
\n
"
,
acpi_os_printf
(
"Package [Len %X]
ElementA
rray %p
\n
"
,
obj_desc
->
package
.
count
,
obj_desc
->
package
.
count
,
obj_desc
->
package
.
elements
);
obj_desc
->
package
.
elements
);
...
@@ -662,13 +666,13 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
...
@@ -662,13 +666,13 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
case
ACPI_TYPE_LOCAL_BANK_FIELD
:
case
ACPI_TYPE_LOCAL_BANK_FIELD
:
acpi_os_printf
(
"
bank_f
ield
\n
"
);
acpi_os_printf
(
"
BankF
ield
\n
"
);
break
;
break
;
case
ACPI_TYPE_LOCAL_REGION_FIELD
:
case
ACPI_TYPE_LOCAL_REGION_FIELD
:
acpi_os_printf
acpi_os_printf
(
"
region_field: Bits=%X acc_w
idth=%X Lock=%X Update=%X at byte=%X bit=%X of below:
\n
"
,
(
"
RegionField: Bits=%X AccW
idth=%X Lock=%X Update=%X at byte=%X bit=%X of below:
\n
"
,
obj_desc
->
field
.
bit_length
,
obj_desc
->
field
.
bit_length
,
obj_desc
->
field
.
access_byte_width
,
obj_desc
->
field
.
access_byte_width
,
obj_desc
->
field
.
field_flags
&
AML_FIELD_LOCK_RULE_MASK
,
obj_desc
->
field
.
field_flags
&
AML_FIELD_LOCK_RULE_MASK
,
...
@@ -681,12 +685,12 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
...
@@ -681,12 +685,12 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
case
ACPI_TYPE_LOCAL_INDEX_FIELD
:
case
ACPI_TYPE_LOCAL_INDEX_FIELD
:
acpi_os_printf
(
"
index_f
ield
\n
"
);
acpi_os_printf
(
"
IndexF
ield
\n
"
);
break
;
break
;
case
ACPI_TYPE_BUFFER_FIELD
:
case
ACPI_TYPE_BUFFER_FIELD
:
acpi_os_printf
(
"
buffer_f
ield: %X bits at byte %X bit %X of
\n
"
,
acpi_os_printf
(
"
BufferF
ield: %X bits at byte %X bit %X of
\n
"
,
obj_desc
->
buffer_field
.
bit_length
,
obj_desc
->
buffer_field
.
bit_length
,
obj_desc
->
buffer_field
.
base_byte_offset
,
obj_desc
->
buffer_field
.
base_byte_offset
,
obj_desc
->
buffer_field
.
start_field_bit_offset
);
obj_desc
->
buffer_field
.
start_field_bit_offset
);
...
@@ -777,7 +781,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands,
...
@@ -777,7 +781,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands,
{
{
acpi_native_uint
i
;
acpi_native_uint
i
;
ACPI_FUNCTION_NAME
(
"ex_dump_operands"
);
ACPI_FUNCTION_NAME
(
ex_dump_operands
);
if
(
!
ident
)
{
if
(
!
ident
)
{
ident
=
"?"
;
ident
=
"?"
;
...
@@ -901,7 +905,7 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc)
...
@@ -901,7 +905,7 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc)
acpi_os_printf
(
"Could not convert name to pathname
\n
"
);
acpi_os_printf
(
"Could not convert name to pathname
\n
"
);
}
else
{
}
else
{
acpi_os_printf
(
"%s
\n
"
,
(
char
*
)
ret_buf
.
pointer
);
acpi_os_printf
(
"%s
\n
"
,
(
char
*
)
ret_buf
.
pointer
);
ACPI_
MEM_
FREE
(
ret_buf
.
pointer
);
ACPI_FREE
(
ret_buf
.
pointer
);
}
}
}
else
if
(
obj_desc
->
reference
.
object
)
{
}
else
if
(
obj_desc
->
reference
.
object
)
{
acpi_os_printf
(
"
\n
Referenced Object: %p
\n
"
,
acpi_os_printf
(
"
\n
Referenced Object: %p
\n
"
,
...
@@ -1017,7 +1021,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc,
...
@@ -1017,7 +1021,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc,
void
void
acpi_ex_dump_object_descriptor
(
union
acpi_operand_object
*
obj_desc
,
u32
flags
)
acpi_ex_dump_object_descriptor
(
union
acpi_operand_object
*
obj_desc
,
u32
flags
)
{
{
ACPI_FUNCTION_TRACE
(
"ex_dump_object_descriptor"
);
ACPI_FUNCTION_TRACE
(
ex_dump_object_descriptor
);
if
(
!
obj_desc
)
{
if
(
!
obj_desc
)
{
return_VOID
;
return_VOID
;
...
@@ -1046,7 +1050,7 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags)
...
@@ -1046,7 +1050,7 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags)
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
obj_desc
)
!=
ACPI_DESC_TYPE_OPERAND
)
{
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
obj_desc
)
!=
ACPI_DESC_TYPE_OPERAND
)
{
acpi_os_printf
acpi_os_printf
(
"
ex_dump_object_d
escriptor: %p is not an ACPI operand object: [%s]
\n
"
,
(
"
ExDumpObjectD
escriptor: %p is not an ACPI operand object: [%s]
\n
"
,
obj_desc
,
acpi_ut_get_descriptor_name
(
obj_desc
));
obj_desc
,
acpi_ut_get_descriptor_name
(
obj_desc
));
return_VOID
;
return_VOID
;
}
}
...
...
drivers/acpi/executer/exfield.c
浏览文件 @
b3899c66
...
@@ -73,7 +73,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
...
@@ -73,7 +73,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
void
*
buffer
;
void
*
buffer
;
u8
locked
;
u8
locked
;
ACPI_FUNCTION_TRACE_PTR
(
"ex_read_data_from_field"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
ex_read_data_from_field
,
obj_desc
);
/* Parameter validation */
/* Parameter validation */
...
@@ -142,6 +142,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
...
@@ -142,6 +142,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
length
=
length
=
(
acpi_size
)
ACPI_ROUND_BITS_UP_TO_BYTES
(
obj_desc
->
field
.
bit_length
);
(
acpi_size
)
ACPI_ROUND_BITS_UP_TO_BYTES
(
obj_desc
->
field
.
bit_length
);
if
(
length
>
acpi_gbl_integer_byte_width
)
{
if
(
length
>
acpi_gbl_integer_byte_width
)
{
/* Field is too large for an Integer, create a Buffer instead */
/* Field is too large for an Integer, create a Buffer instead */
buffer_desc
=
acpi_ut_create_buffer_object
(
length
);
buffer_desc
=
acpi_ut_create_buffer_object
(
length
);
...
@@ -163,11 +164,11 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
...
@@ -163,11 +164,11 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
}
}
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
"
field_read [TO]: Obj %p, Type %X, Buf %p, byte_l
en %X
\n
"
,
"
FieldRead [TO]: Obj %p, Type %X, Buf %p, ByteL
en %X
\n
"
,
obj_desc
,
ACPI_GET_OBJECT_TYPE
(
obj_desc
),
buffer
,
obj_desc
,
ACPI_GET_OBJECT_TYPE
(
obj_desc
),
buffer
,
(
u32
)
length
));
(
u32
)
length
));
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
"
field_read [FROM]: bit_len %X, bit_off %X, byte_o
ff %X
\n
"
,
"
FieldRead [FROM]: BitLen %X, BitOff %X, ByteO
ff %X
\n
"
,
obj_desc
->
common_field
.
bit_length
,
obj_desc
->
common_field
.
bit_length
,
obj_desc
->
common_field
.
start_field_bit_offset
,
obj_desc
->
common_field
.
start_field_bit_offset
,
obj_desc
->
common_field
.
base_byte_offset
));
obj_desc
->
common_field
.
base_byte_offset
));
...
@@ -219,7 +220,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
...
@@ -219,7 +220,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
u8
locked
;
u8
locked
;
union
acpi_operand_object
*
buffer_desc
;
union
acpi_operand_object
*
buffer_desc
;
ACPI_FUNCTION_TRACE_PTR
(
"ex_write_data_to_field"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
ex_write_data_to_field
,
obj_desc
);
/* Parameter validation */
/* Parameter validation */
...
@@ -329,9 +330,10 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
...
@@ -329,9 +330,10 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
ACPI_ROUND_BITS_UP_TO_BYTES
(
obj_desc
->
common_field
.
bit_length
);
ACPI_ROUND_BITS_UP_TO_BYTES
(
obj_desc
->
common_field
.
bit_length
);
if
(
length
<
required_length
)
{
if
(
length
<
required_length
)
{
/* We need to create a new buffer */
/* We need to create a new buffer */
new_buffer
=
ACPI_
MEM_CALLOCATE
(
required_length
);
new_buffer
=
ACPI_
ALLOCATE_ZEROED
(
required_length
);
if
(
!
new_buffer
)
{
if
(
!
new_buffer
)
{
return_ACPI_STATUS
(
AE_NO_MEMORY
);
return_ACPI_STATUS
(
AE_NO_MEMORY
);
}
}
...
@@ -347,14 +349,14 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
...
@@ -347,14 +349,14 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
}
}
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
"
field_write [FROM]: Obj %p (%s:%X), Buf %p, byte_l
en %X
\n
"
,
"
FieldWrite [FROM]: Obj %p (%s:%X), Buf %p, ByteL
en %X
\n
"
,
source_desc
,
source_desc
,
acpi_ut_get_type_name
(
ACPI_GET_OBJECT_TYPE
acpi_ut_get_type_name
(
ACPI_GET_OBJECT_TYPE
(
source_desc
)),
(
source_desc
)),
ACPI_GET_OBJECT_TYPE
(
source_desc
),
buffer
,
length
));
ACPI_GET_OBJECT_TYPE
(
source_desc
),
buffer
,
length
));
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
"
field_write [TO]: Obj %p (%s:%X), bit_len %X, bit_off %X, byte_o
ff %X
\n
"
,
"
FieldWrite [TO]: Obj %p (%s:%X), BitLen %X, BitOff %X, ByteO
ff %X
\n
"
,
obj_desc
,
obj_desc
,
acpi_ut_get_type_name
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
)),
acpi_ut_get_type_name
(
ACPI_GET_OBJECT_TYPE
(
obj_desc
)),
ACPI_GET_OBJECT_TYPE
(
obj_desc
),
ACPI_GET_OBJECT_TYPE
(
obj_desc
),
...
@@ -375,7 +377,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
...
@@ -375,7 +377,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
/* Free temporary buffer if we used one */
/* Free temporary buffer if we used one */
if
(
new_buffer
)
{
if
(
new_buffer
)
{
ACPI_
MEM_
FREE
(
new_buffer
);
ACPI_FREE
(
new_buffer
);
}
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
...
...
drivers/acpi/executer/exfldio.c
浏览文件 @
b3899c66
...
@@ -87,7 +87,7 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
...
@@ -87,7 +87,7 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
union
acpi_operand_object
*
rgn_desc
;
union
acpi_operand_object
*
rgn_desc
;
ACPI_FUNCTION_TRACE_U32
(
"ex_setup_region"
,
field_datum_byte_offset
);
ACPI_FUNCTION_TRACE_U32
(
ex_setup_region
,
field_datum_byte_offset
);
rgn_desc
=
obj_desc
->
common_field
.
region_obj
;
rgn_desc
=
obj_desc
->
common_field
.
region_obj
;
...
@@ -112,7 +112,18 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
...
@@ -112,7 +112,18 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
}
}
}
}
/* Exit if Address/Length have been disallowed by the host OS */
if
(
rgn_desc
->
common
.
flags
&
AOPOBJ_INVALID
)
{
return_ACPI_STATUS
(
AE_AML_ILLEGAL_ADDRESS
);
}
/*
* Exit now for SMBus address space, it has a non-linear address space
* and the request cannot be directly validated
*/
if
(
rgn_desc
->
region
.
space_id
==
ACPI_ADR_SPACE_SMBUS
)
{
if
(
rgn_desc
->
region
.
space_id
==
ACPI_ADR_SPACE_SMBUS
)
{
/* SMBus has a non-linear address space */
/* SMBus has a non-linear address space */
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
@@ -134,10 +145,10 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
...
@@ -134,10 +145,10 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,
* length of one field datum (access width) must fit within the region.
* length of one field datum (access width) must fit within the region.
* (Region length is specified in bytes)
* (Region length is specified in bytes)
*/
*/
if
(
rgn_desc
->
region
.
length
<
(
obj_desc
->
common_field
.
base_byte_offset
+
if
(
rgn_desc
->
region
.
length
<
field_datum
_byte_offset
+
(
obj_desc
->
common_field
.
base
_byte_offset
+
obj_desc
->
common_field
.
field_datum_byte_offset
+
access_byte_width
))
{
obj_desc
->
common_field
.
access_byte_width
))
{
if
(
acpi_gbl_enable_interpreter_slack
)
{
if
(
acpi_gbl_enable_interpreter_slack
)
{
/*
/*
* Slack mode only: We will go ahead and allow access to this
* Slack mode only: We will go ahead and allow access to this
...
@@ -217,7 +228,7 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
...
@@ -217,7 +228,7 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
union
acpi_operand_object
*
rgn_desc
;
union
acpi_operand_object
*
rgn_desc
;
acpi_physical_address
address
;
acpi_physical_address
address
;
ACPI_FUNCTION_TRACE
(
"ex_access_region"
);
ACPI_FUNCTION_TRACE
(
ex_access_region
);
/*
/*
* Ensure that the region operands are fully evaluated and verify
* Ensure that the region operands are fully evaluated and verify
...
@@ -246,7 +257,7 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
...
@@ -246,7 +257,7 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
}
}
ACPI_DEBUG_PRINT_RAW
((
ACPI_DB_BFIELD
,
ACPI_DEBUG_PRINT_RAW
((
ACPI_DB_BFIELD
,
" Region [%s:%X], Width %X,
byte_b
ase %X, Offset %X at %8.8X%8.8X
\n
"
,
" Region [%s:%X], Width %X,
ByteB
ase %X, Offset %X at %8.8X%8.8X
\n
"
,
acpi_ut_get_region_name
(
rgn_desc
->
region
.
acpi_ut_get_region_name
(
rgn_desc
->
region
.
space_id
),
space_id
),
rgn_desc
->
region
.
space_id
,
rgn_desc
->
region
.
space_id
,
...
@@ -352,7 +363,7 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
...
@@ -352,7 +363,7 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
acpi_status
status
;
acpi_status
status
;
acpi_integer
local_value
;
acpi_integer
local_value
;
ACPI_FUNCTION_TRACE_U32
(
"ex_field_datum_io"
,
field_datum_byte_offset
);
ACPI_FUNCTION_TRACE_U32
(
ex_field_datum_io
,
field_datum_byte_offset
);
if
(
read_write
==
ACPI_READ
)
{
if
(
read_write
==
ACPI_READ
)
{
if
(
!
value
)
{
if
(
!
value
)
{
...
@@ -487,10 +498,11 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
...
@@ -487,10 +498,11 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc,
}
}
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
"I/O to Data Register:
value_p
tr %p
\n
"
,
"I/O to Data Register:
ValueP
tr %p
\n
"
,
value
));
value
));
if
(
read_write
==
ACPI_READ
)
{
if
(
read_write
==
ACPI_READ
)
{
/* Read the datum from the data_register */
/* Read the datum from the data_register */
status
=
status
=
...
@@ -559,7 +571,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
...
@@ -559,7 +571,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
acpi_integer
merged_value
;
acpi_integer
merged_value
;
acpi_integer
current_value
;
acpi_integer
current_value
;
ACPI_FUNCTION_TRACE_U32
(
"ex_write_with_update_rule"
,
mask
);
ACPI_FUNCTION_TRACE_U32
(
ex_write_with_update_rule
,
mask
);
/* Start with the new bits */
/* Start with the new bits */
...
@@ -568,6 +580,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
...
@@ -568,6 +580,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
/* If the mask is all ones, we don't need to worry about the update rule */
/* If the mask is all ones, we don't need to worry about the update rule */
if
(
mask
!=
ACPI_INTEGER_MAX
)
{
if
(
mask
!=
ACPI_INTEGER_MAX
)
{
/* Decode the update rule */
/* Decode the update rule */
switch
(
obj_desc
->
common_field
.
switch
(
obj_desc
->
common_field
.
...
@@ -614,7 +627,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
...
@@ -614,7 +627,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
default:
default:
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Unknown
update_r
ule value: %X"
,
"Unknown
UpdateR
ule value: %X"
,
(
obj_desc
->
common_field
.
(
obj_desc
->
common_field
.
field_flags
&
field_flags
&
AML_FIELD_UPDATE_RULE_MASK
)));
AML_FIELD_UPDATE_RULE_MASK
)));
...
@@ -623,7 +636,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
...
@@ -623,7 +636,7 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
}
}
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
ACPI_DEBUG_PRINT
((
ACPI_DB_BFIELD
,
"Mask %8.8X%8.8X,
datum_offset %X, Width %X, Value %8.8X%8.8X, merged_v
alue %8.8X%8.8X
\n
"
,
"Mask %8.8X%8.8X,
DatumOffset %X, Width %X, Value %8.8X%8.8X, MergedV
alue %8.8X%8.8X
\n
"
,
ACPI_FORMAT_UINT64
(
mask
),
ACPI_FORMAT_UINT64
(
mask
),
field_datum_byte_offset
,
field_datum_byte_offset
,
obj_desc
->
common_field
.
access_byte_width
,
obj_desc
->
common_field
.
access_byte_width
,
...
@@ -666,7 +679,7 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
...
@@ -666,7 +679,7 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
u32
field_datum_count
;
u32
field_datum_count
;
u32
i
;
u32
i
;
ACPI_FUNCTION_TRACE
(
"ex_extract_from_field"
);
ACPI_FUNCTION_TRACE
(
ex_extract_from_field
);
/* Validate target buffer and clear it */
/* Validate target buffer and clear it */
...
@@ -704,6 +717,7 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
...
@@ -704,6 +717,7 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
/* Read the rest of the field */
/* Read the rest of the field */
for
(
i
=
1
;
i
<
field_datum_count
;
i
++
)
{
for
(
i
=
1
;
i
<
field_datum_count
;
i
++
)
{
/* Get next input datum from the field */
/* Get next input datum from the field */
field_offset
+=
obj_desc
->
common_field
.
access_byte_width
;
field_offset
+=
obj_desc
->
common_field
.
access_byte_width
;
...
@@ -771,6 +785,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
...
@@ -771,6 +785,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
{
{
acpi_status
status
;
acpi_status
status
;
acpi_integer
mask
;
acpi_integer
mask
;
acpi_integer
width_mask
;
acpi_integer
merged_datum
;
acpi_integer
merged_datum
;
acpi_integer
raw_datum
=
0
;
acpi_integer
raw_datum
=
0
;
u32
field_offset
=
0
;
u32
field_offset
=
0
;
...
@@ -780,7 +795,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
...
@@ -780,7 +795,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
u32
field_datum_count
;
u32
field_datum_count
;
u32
i
;
u32
i
;
ACPI_FUNCTION_TRACE
(
"ex_insert_into_field"
);
ACPI_FUNCTION_TRACE
(
ex_insert_into_field
);
/* Validate input buffer */
/* Validate input buffer */
...
@@ -795,15 +810,20 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
...
@@ -795,15 +810,20 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
/* Compute the number of datums (access width data items) */
/* Compute the number of datums (access width data items) */
width_mask
=
ACPI_MASK_BITS_ABOVE
(
obj_desc
->
common_field
.
access_bit_width
);
mask
=
mask
=
ACPI_MASK_BITS_BELOW
(
obj_desc
->
common_field
.
start_field_bit_offset
);
width_mask
&
ACPI_MASK_BITS_BELOW
(
obj_desc
->
common_field
.
datum_count
=
start_field_bit_offset
);
ACPI_ROUND_UP_TO
(
obj_desc
->
common_field
.
bit_length
,
obj_desc
->
common_field
.
access_bit_width
);
datum_count
=
ACPI_ROUND_UP_TO
(
obj_desc
->
common_field
.
bit_length
,
field_datum_count
=
obj_desc
->
common_field
.
access_bit_width
);
ACPI_ROUND_UP_TO
(
obj_desc
->
common_field
.
bit_length
+
obj_desc
->
common_field
.
start_field_bit_offset
,
field_datum_count
=
ACPI_ROUND_UP_TO
(
obj_desc
->
common_field
.
bit_length
+
obj_desc
->
common_field
.
access_bit_width
);
obj_desc
->
common_field
.
start_field_bit_offset
,
obj_desc
->
common_field
.
access_bit_width
);
/* Get initial Datum from the input buffer */
/* Get initial Datum from the input buffer */
...
@@ -817,6 +837,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
...
@@ -817,6 +837,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
/* Write the entire field */
/* Write the entire field */
for
(
i
=
1
;
i
<
field_datum_count
;
i
++
)
{
for
(
i
=
1
;
i
<
field_datum_count
;
i
++
)
{
/* Write merged datum to the target field */
/* Write merged datum to the target field */
merged_datum
&=
mask
;
merged_datum
&=
mask
;
...
@@ -833,7 +854,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
...
@@ -833,7 +854,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
merged_datum
=
raw_datum
>>
merged_datum
=
raw_datum
>>
(
obj_desc
->
common_field
.
access_bit_width
-
(
obj_desc
->
common_field
.
access_bit_width
-
obj_desc
->
common_field
.
start_field_bit_offset
);
obj_desc
->
common_field
.
start_field_bit_offset
);
mask
=
ACPI_INTEGER_MAX
;
mask
=
width_mask
;
if
(
i
==
datum_count
)
{
if
(
i
==
datum_count
)
{
break
;
break
;
...
...
drivers/acpi/executer/exmisc.c
浏览文件 @
b3899c66
...
@@ -72,7 +72,7 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc,
...
@@ -72,7 +72,7 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc,
union
acpi_operand_object
*
reference_obj
;
union
acpi_operand_object
*
reference_obj
;
union
acpi_operand_object
*
referenced_obj
;
union
acpi_operand_object
*
referenced_obj
;
ACPI_FUNCTION_TRACE_PTR
(
"ex_get_object_reference"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
ex_get_object_reference
,
obj_desc
);
*
return_desc
=
NULL
;
*
return_desc
=
NULL
;
...
@@ -168,7 +168,7 @@ acpi_ex_concat_template(union acpi_operand_object *operand0,
...
@@ -168,7 +168,7 @@ acpi_ex_concat_template(union acpi_operand_object *operand0,
acpi_size
length1
;
acpi_size
length1
;
acpi_size
new_length
;
acpi_size
new_length
;
ACPI_FUNCTION_TRACE
(
"ex_concat_template"
);
ACPI_FUNCTION_TRACE
(
ex_concat_template
);
/*
/*
* Find the end_tag descriptor in each resource template.
* Find the end_tag descriptor in each resource template.
...
@@ -250,7 +250,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
...
@@ -250,7 +250,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,
char
*
new_buf
;
char
*
new_buf
;
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ex_do_concatenate"
);
ACPI_FUNCTION_TRACE
(
ex_do_concatenate
);
/*
/*
* Convert the second operand if necessary. The first operand
* Convert the second operand if necessary. The first operand
...
@@ -445,10 +445,24 @@ acpi_ex_do_math_op(u16 opcode, acpi_integer integer0, acpi_integer integer1)
...
@@ -445,10 +445,24 @@ acpi_ex_do_math_op(u16 opcode, acpi_integer integer0, acpi_integer integer1)
case
AML_SHIFT_LEFT_OP
:
/* shift_left (Operand, shift_count, Result) */
case
AML_SHIFT_LEFT_OP
:
/* shift_left (Operand, shift_count, Result) */
/*
* We need to check if the shiftcount is larger than the integer bit
* width since the behavior of this is not well-defined in the C language.
*/
if
(
integer1
>=
acpi_gbl_integer_bit_width
)
{
return
(
0
);
}
return
(
integer0
<<
integer1
);
return
(
integer0
<<
integer1
);
case
AML_SHIFT_RIGHT_OP
:
/* shift_right (Operand, shift_count, Result) */
case
AML_SHIFT_RIGHT_OP
:
/* shift_right (Operand, shift_count, Result) */
/*
* We need to check if the shiftcount is larger than the integer bit
* width since the behavior of this is not well-defined in the C language.
*/
if
(
integer1
>=
acpi_gbl_integer_bit_width
)
{
return
(
0
);
}
return
(
integer0
>>
integer1
);
return
(
integer0
>>
integer1
);
case
AML_SUBTRACT_OP
:
/* Subtract (Integer0, Integer1, Result) */
case
AML_SUBTRACT_OP
:
/* Subtract (Integer0, Integer1, Result) */
...
@@ -489,7 +503,7 @@ acpi_ex_do_logical_numeric_op(u16 opcode,
...
@@ -489,7 +503,7 @@ acpi_ex_do_logical_numeric_op(u16 opcode,
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
u8
local_result
=
FALSE
;
u8
local_result
=
FALSE
;
ACPI_FUNCTION_TRACE
(
"ex_do_logical_numeric_op"
);
ACPI_FUNCTION_TRACE
(
ex_do_logical_numeric_op
);
switch
(
opcode
)
{
switch
(
opcode
)
{
case
AML_LAND_OP
:
/* LAnd (Integer0, Integer1) */
case
AML_LAND_OP
:
/* LAnd (Integer0, Integer1) */
...
@@ -557,7 +571,7 @@ acpi_ex_do_logical_op(u16 opcode,
...
@@ -557,7 +571,7 @@ acpi_ex_do_logical_op(u16 opcode,
u8
local_result
=
FALSE
;
u8
local_result
=
FALSE
;
int
compare
;
int
compare
;
ACPI_FUNCTION_TRACE
(
"ex_do_logical_op"
);
ACPI_FUNCTION_TRACE
(
ex_do_logical_op
);
/*
/*
* Convert the second operand if necessary. The first operand
* Convert the second operand if necessary. The first operand
...
@@ -649,6 +663,7 @@ acpi_ex_do_logical_op(u16 opcode,
...
@@ -649,6 +663,7 @@ acpi_ex_do_logical_op(u16 opcode,
/* Length and all bytes must be equal */
/* Length and all bytes must be equal */
if
((
length0
==
length1
)
&&
(
compare
==
0
))
{
if
((
length0
==
length1
)
&&
(
compare
==
0
))
{
/* Length and all bytes match ==> TRUE */
/* Length and all bytes match ==> TRUE */
local_result
=
TRUE
;
local_result
=
TRUE
;
...
...
drivers/acpi/executer/exmutex.c
浏览文件 @
b3899c66
...
@@ -61,7 +61,7 @@ acpi_ex_link_mutex(union acpi_operand_object *obj_desc,
...
@@ -61,7 +61,7 @@ acpi_ex_link_mutex(union acpi_operand_object *obj_desc,
*
*
* RETURN: None
* RETURN: None
*
*
* DESCRIPTION: Remove a mutex from the "
acquired_m
utex" list
* DESCRIPTION: Remove a mutex from the "
AcquiredM
utex" list
*
*
******************************************************************************/
******************************************************************************/
...
@@ -95,7 +95,7 @@ void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc)
...
@@ -95,7 +95,7 @@ void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc)
*
*
* RETURN: None
* RETURN: None
*
*
* DESCRIPTION: Add a mutex to the "
acquired_m
utex" list for this walk
* DESCRIPTION: Add a mutex to the "
AcquiredM
utex" list for this walk
*
*
******************************************************************************/
******************************************************************************/
...
@@ -144,7 +144,7 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
...
@@ -144,7 +144,7 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE_PTR
(
"ex_acquire_mutex"
,
obj_desc
);
ACPI_FUNCTION_TRACE_PTR
(
ex_acquire_mutex
,
obj_desc
);
if
(
!
obj_desc
)
{
if
(
!
obj_desc
)
{
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
...
@@ -165,7 +165,7 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
...
@@ -165,7 +165,7 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
*/
*/
if
(
walk_state
->
thread
->
current_sync_level
>
obj_desc
->
mutex
.
sync_level
)
{
if
(
walk_state
->
thread
->
current_sync_level
>
obj_desc
->
mutex
.
sync_level
)
{
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Cannot acquire Mutex [%4.4s], incorrect
sync_l
evel"
,
"Cannot acquire Mutex [%4.4s], incorrect
SyncL
evel"
,
acpi_ut_get_node_name
(
obj_desc
->
mutex
.
node
)));
acpi_ut_get_node_name
(
obj_desc
->
mutex
.
node
)));
return_ACPI_STATUS
(
AE_AML_MUTEX_ORDER
);
return_ACPI_STATUS
(
AE_AML_MUTEX_ORDER
);
}
}
...
@@ -173,6 +173,7 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
...
@@ -173,6 +173,7 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
/* Support for multiple acquires by the owning thread */
/* Support for multiple acquires by the owning thread */
if
(
obj_desc
->
mutex
.
owner_thread
)
{
if
(
obj_desc
->
mutex
.
owner_thread
)
{
/* Special case for Global Lock, allow all threads */
/* Special case for Global Lock, allow all threads */
if
((
obj_desc
->
mutex
.
owner_thread
->
thread_id
==
if
((
obj_desc
->
mutex
.
owner_thread
->
thread_id
==
...
@@ -192,6 +193,7 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
...
@@ -192,6 +193,7 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
status
=
acpi_ex_system_acquire_mutex
(
time_desc
,
obj_desc
);
status
=
acpi_ex_system_acquire_mutex
(
time_desc
,
obj_desc
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
/* Includes failure from a timeout on time_desc */
/* Includes failure from a timeout on time_desc */
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
...
@@ -232,7 +234,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
...
@@ -232,7 +234,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
{
{
acpi_status
status
;
acpi_status
status
;
ACPI_FUNCTION_TRACE
(
"ex_release_mutex"
);
ACPI_FUNCTION_TRACE
(
ex_release_mutex
);
if
(
!
obj_desc
)
{
if
(
!
obj_desc
)
{
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
return_ACPI_STATUS
(
AE_BAD_PARAMETER
);
...
@@ -277,7 +279,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
...
@@ -277,7 +279,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
*/
*/
if
(
obj_desc
->
mutex
.
sync_level
>
walk_state
->
thread
->
current_sync_level
)
{
if
(
obj_desc
->
mutex
.
sync_level
>
walk_state
->
thread
->
current_sync_level
)
{
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Cannot release Mutex [%4.4s], incorrect
sync_l
evel"
,
"Cannot release Mutex [%4.4s], incorrect
SyncL
evel"
,
acpi_ut_get_node_name
(
obj_desc
->
mutex
.
node
)));
acpi_ut_get_node_name
(
obj_desc
->
mutex
.
node
)));
return_ACPI_STATUS
(
AE_AML_MUTEX_ORDER
);
return_ACPI_STATUS
(
AE_AML_MUTEX_ORDER
);
}
}
...
@@ -286,6 +288,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
...
@@ -286,6 +288,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
obj_desc
->
mutex
.
acquisition_depth
--
;
obj_desc
->
mutex
.
acquisition_depth
--
;
if
(
obj_desc
->
mutex
.
acquisition_depth
!=
0
)
{
if
(
obj_desc
->
mutex
.
acquisition_depth
!=
0
)
{
/* Just decrement the depth and return */
/* Just decrement the depth and return */
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
...
...
drivers/acpi/executer/exnames.c
浏览文件 @
b3899c66
...
@@ -77,7 +77,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs)
...
@@ -77,7 +77,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs)
char
*
name_string
;
char
*
name_string
;
u32
size_needed
;
u32
size_needed
;
ACPI_FUNCTION_TRACE
(
"ex_allocate_name_string"
);
ACPI_FUNCTION_TRACE
(
ex_allocate_name_string
);
/*
/*
* Allow room for all \ and ^ prefixes, all segments and a multi_name_prefix.
* Allow room for all \ and ^ prefixes, all segments and a multi_name_prefix.
...
@@ -85,6 +85,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs)
...
@@ -85,6 +85,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs)
* This may actually be somewhat longer than needed.
* This may actually be somewhat longer than needed.
*/
*/
if
(
prefix_count
==
ACPI_UINT32_MAX
)
{
if
(
prefix_count
==
ACPI_UINT32_MAX
)
{
/* Special case for root */
/* Special case for root */
size_needed
=
1
+
(
ACPI_NAME_SIZE
*
num_name_segs
)
+
2
+
1
;
size_needed
=
1
+
(
ACPI_NAME_SIZE
*
num_name_segs
)
+
2
+
1
;
...
@@ -97,7 +98,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs)
...
@@ -97,7 +98,7 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs)
* Allocate a buffer for the name.
* Allocate a buffer for the name.
* This buffer must be deleted by the caller!
* This buffer must be deleted by the caller!
*/
*/
name_string
=
ACPI_
MEM_
ALLOCATE
(
size_needed
);
name_string
=
ACPI_ALLOCATE
(
size_needed
);
if
(
!
name_string
)
{
if
(
!
name_string
)
{
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Could not allocate size %d"
,
size_needed
));
"Could not allocate size %d"
,
size_needed
));
...
@@ -119,11 +120,13 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs)
...
@@ -119,11 +120,13 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs)
/* Set up Dual or Multi prefixes if needed */
/* Set up Dual or Multi prefixes if needed */
if
(
num_name_segs
>
2
)
{
if
(
num_name_segs
>
2
)
{
/* Set up multi prefixes */
/* Set up multi prefixes */
*
temp_ptr
++
=
AML_MULTI_NAME_PREFIX_OP
;
*
temp_ptr
++
=
AML_MULTI_NAME_PREFIX_OP
;
*
temp_ptr
++
=
(
char
)
num_name_segs
;
*
temp_ptr
++
=
(
char
)
num_name_segs
;
}
else
if
(
2
==
num_name_segs
)
{
}
else
if
(
2
==
num_name_segs
)
{
/* Set up dual prefixes */
/* Set up dual prefixes */
*
temp_ptr
++
=
AML_DUAL_NAME_PREFIX
;
*
temp_ptr
++
=
AML_DUAL_NAME_PREFIX
;
...
@@ -159,7 +162,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)
...
@@ -159,7 +162,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)
u32
index
;
u32
index
;
char
char_buf
[
5
];
char
char_buf
[
5
];
ACPI_FUNCTION_TRACE
(
"ex_name_segment"
);
ACPI_FUNCTION_TRACE
(
ex_name_segment
);
/*
/*
* If first character is a digit, then we know that we aren't looking at a
* If first character is a digit, then we know that we aren't looking at a
...
@@ -176,7 +179,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)
...
@@ -176,7 +179,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)
for
(
index
=
0
;
for
(
index
=
0
;
(
index
<
ACPI_NAME_SIZE
)
(
index
<
ACPI_NAME_SIZE
)
&&
(
acpi_ut_valid_acpi_char
acter
(
*
aml_address
));
index
++
)
{
&&
(
acpi_ut_valid_acpi_char
(
*
aml_address
,
0
));
index
++
)
{
char_buf
[
index
]
=
*
aml_address
++
;
char_buf
[
index
]
=
*
aml_address
++
;
ACPI_DEBUG_PRINT
((
ACPI_DB_LOAD
,
"%c
\n
"
,
char_buf
[
index
]));
ACPI_DEBUG_PRINT
((
ACPI_DB_LOAD
,
"%c
\n
"
,
char_buf
[
index
]));
}
}
...
@@ -184,6 +187,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)
...
@@ -184,6 +187,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string)
/* Valid name segment */
/* Valid name segment */
if
(
index
==
4
)
{
if
(
index
==
4
)
{
/* Found 4 valid characters */
/* Found 4 valid characters */
char_buf
[
4
]
=
'\0'
;
char_buf
[
4
]
=
'\0'
;
...
@@ -249,11 +253,12 @@ acpi_ex_get_name_string(acpi_object_type data_type,
...
@@ -249,11 +253,12 @@ acpi_ex_get_name_string(acpi_object_type data_type,
u32
prefix_count
=
0
;
u32
prefix_count
=
0
;
u8
has_prefix
=
FALSE
;
u8
has_prefix
=
FALSE
;
ACPI_FUNCTION_TRACE_PTR
(
"ex_get_name_string"
,
aml_address
);
ACPI_FUNCTION_TRACE_PTR
(
ex_get_name_string
,
aml_address
);
if
(
ACPI_TYPE_LOCAL_REGION_FIELD
==
data_type
||
if
(
ACPI_TYPE_LOCAL_REGION_FIELD
==
data_type
||
ACPI_TYPE_LOCAL_BANK_FIELD
==
data_type
||
ACPI_TYPE_LOCAL_BANK_FIELD
==
data_type
||
ACPI_TYPE_LOCAL_INDEX_FIELD
==
data_type
)
{
ACPI_TYPE_LOCAL_INDEX_FIELD
==
data_type
)
{
/* Disallow prefixes for types associated with field_unit names */
/* Disallow prefixes for types associated with field_unit names */
name_string
=
acpi_ex_allocate_name_string
(
0
,
1
);
name_string
=
acpi_ex_allocate_name_string
(
0
,
1
);
...
@@ -272,7 +277,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
...
@@ -272,7 +277,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
case
AML_ROOT_PREFIX
:
case
AML_ROOT_PREFIX
:
ACPI_DEBUG_PRINT
((
ACPI_DB_LOAD
,
ACPI_DEBUG_PRINT
((
ACPI_DB_LOAD
,
"
root_p
refix(
\\
) at %p
\n
"
,
"
RootP
refix(
\\
) at %p
\n
"
,
aml_address
));
aml_address
));
/*
/*
...
@@ -290,7 +295,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
...
@@ -290,7 +295,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
do
{
do
{
ACPI_DEBUG_PRINT
((
ACPI_DB_LOAD
,
ACPI_DEBUG_PRINT
((
ACPI_DB_LOAD
,
"
parent_p
refix (^) at %p
\n
"
,
"
ParentP
refix (^) at %p
\n
"
,
aml_address
));
aml_address
));
aml_address
++
;
aml_address
++
;
...
@@ -314,7 +319,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
...
@@ -314,7 +319,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
case
AML_DUAL_NAME_PREFIX
:
case
AML_DUAL_NAME_PREFIX
:
ACPI_DEBUG_PRINT
((
ACPI_DB_LOAD
,
ACPI_DEBUG_PRINT
((
ACPI_DB_LOAD
,
"
dual_name_p
refix at %p
\n
"
,
"
DualNameP
refix at %p
\n
"
,
aml_address
));
aml_address
));
aml_address
++
;
aml_address
++
;
...
@@ -341,7 +346,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
...
@@ -341,7 +346,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
case
AML_MULTI_NAME_PREFIX_OP
:
case
AML_MULTI_NAME_PREFIX_OP
:
ACPI_DEBUG_PRINT
((
ACPI_DB_LOAD
,
ACPI_DEBUG_PRINT
((
ACPI_DB_LOAD
,
"
multi_name_p
refix at %p
\n
"
,
"
MultiNameP
refix at %p
\n
"
,
aml_address
));
aml_address
));
/* Fetch count of segments remaining in name path */
/* Fetch count of segments remaining in name path */
...
@@ -377,7 +382,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
...
@@ -377,7 +382,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
if
(
prefix_count
==
ACPI_UINT32_MAX
)
{
if
(
prefix_count
==
ACPI_UINT32_MAX
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"
name_s
eg is
\"\\\"
followed by NULL
\n
"
));
"
NameS
eg is
\"\\\"
followed by NULL
\n
"
));
}
}
/* Consume the NULL byte */
/* Consume the NULL byte */
...
@@ -410,6 +415,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
...
@@ -410,6 +415,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
}
}
if
(
AE_CTRL_PENDING
==
status
&&
has_prefix
)
{
if
(
AE_CTRL_PENDING
==
status
&&
has_prefix
)
{
/* Ran out of segments after processing a prefix */
/* Ran out of segments after processing a prefix */
ACPI_ERROR
((
AE_INFO
,
"Malformed Name at %p"
,
name_string
));
ACPI_ERROR
((
AE_INFO
,
"Malformed Name at %p"
,
name_string
));
...
@@ -418,7 +424,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
...
@@ -418,7 +424,7 @@ acpi_ex_get_name_string(acpi_object_type data_type,
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
if
(
name_string
)
{
if
(
name_string
)
{
ACPI_
MEM_
FREE
(
name_string
);
ACPI_FREE
(
name_string
);
}
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
...
drivers/acpi/executer/exoparg1.c
浏览文件 @
b3899c66
...
@@ -89,7 +89,7 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state)
...
@@ -89,7 +89,7 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state)
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
union
acpi_operand_object
*
return_desc
=
NULL
;
union
acpi_operand_object
*
return_desc
=
NULL
;
ACPI_FUNCTION_TRACE_STR
(
"ex_opcode_0A_0T_1R"
,
ACPI_FUNCTION_TRACE_STR
(
ex_opcode_0A_0T_1R
,
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
/* Examine the AML opcode */
/* Examine the AML opcode */
...
@@ -150,7 +150,7 @@ acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state)
...
@@ -150,7 +150,7 @@ acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state)
union
acpi_operand_object
**
operand
=
&
walk_state
->
operands
[
0
];
union
acpi_operand_object
**
operand
=
&
walk_state
->
operands
[
0
];
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE_STR
(
"ex_opcode_1A_0T_0R"
,
ACPI_FUNCTION_TRACE_STR
(
ex_opcode_1A_0T_0R
,
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
/* Examine the AML opcode */
/* Examine the AML opcode */
...
@@ -216,7 +216,7 @@ acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state)
...
@@ -216,7 +216,7 @@ acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state)
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
union
acpi_operand_object
**
operand
=
&
walk_state
->
operands
[
0
];
union
acpi_operand_object
**
operand
=
&
walk_state
->
operands
[
0
];
ACPI_FUNCTION_TRACE_STR
(
"ex_opcode_1A_1T_0R"
,
ACPI_FUNCTION_TRACE_STR
(
ex_opcode_1A_1T_0R
,
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
/* Examine the AML opcode */
/* Examine the AML opcode */
...
@@ -264,7 +264,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -264,7 +264,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
acpi_integer
power_of_ten
;
acpi_integer
power_of_ten
;
acpi_integer
digit
;
acpi_integer
digit
;
ACPI_FUNCTION_TRACE_STR
(
"ex_opcode_1A_1T_1R"
,
ACPI_FUNCTION_TRACE_STR
(
ex_opcode_1A_1T_1R
,
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
/* Examine the AML opcode */
/* Examine the AML opcode */
...
@@ -322,8 +322,9 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -322,8 +322,9 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
/* Since the bit position is one-based, subtract from 33 (65) */
/* Since the bit position is one-based, subtract from 33 (65) */
return_desc
->
integer
.
value
=
temp32
==
0
?
0
:
return_desc
->
integer
.
value
=
(
ACPI_INTEGER_BIT_SIZE
+
1
)
-
temp32
;
temp32
==
0
?
0
:
(
ACPI_INTEGER_BIT_SIZE
+
1
)
-
temp32
;
break
;
break
;
case
AML_FROM_BCD_OP
:
/* from_bcd (BCDValue, Result) */
case
AML_FROM_BCD_OP
:
/* from_bcd (BCDValue, Result) */
...
@@ -342,6 +343,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -342,6 +343,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
for
(
i
=
0
;
for
(
i
=
0
;
(
i
<
acpi_gbl_integer_nybble_width
)
&&
(
digit
>
0
);
(
i
<
acpi_gbl_integer_nybble_width
)
&&
(
digit
>
0
);
i
++
)
{
i
++
)
{
/* Get the least significant 4-bit BCD digit */
/* Get the least significant 4-bit BCD digit */
temp32
=
((
u32
)
digit
)
&
0xF
;
temp32
=
((
u32
)
digit
)
&
0xF
;
...
@@ -487,6 +489,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -487,6 +489,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
status
=
acpi_ex_convert_to_string
(
operand
[
0
],
&
return_desc
,
status
=
acpi_ex_convert_to_string
(
operand
[
0
],
&
return_desc
,
ACPI_EXPLICIT_CONVERT_DECIMAL
);
ACPI_EXPLICIT_CONVERT_DECIMAL
);
if
(
return_desc
==
operand
[
0
])
{
if
(
return_desc
==
operand
[
0
])
{
/* No conversion performed, add ref to handle return value */
/* No conversion performed, add ref to handle return value */
acpi_ut_add_reference
(
return_desc
);
acpi_ut_add_reference
(
return_desc
);
}
}
...
@@ -497,6 +500,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -497,6 +500,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
status
=
acpi_ex_convert_to_string
(
operand
[
0
],
&
return_desc
,
status
=
acpi_ex_convert_to_string
(
operand
[
0
],
&
return_desc
,
ACPI_EXPLICIT_CONVERT_HEX
);
ACPI_EXPLICIT_CONVERT_HEX
);
if
(
return_desc
==
operand
[
0
])
{
if
(
return_desc
==
operand
[
0
])
{
/* No conversion performed, add ref to handle return value */
/* No conversion performed, add ref to handle return value */
acpi_ut_add_reference
(
return_desc
);
acpi_ut_add_reference
(
return_desc
);
}
}
...
@@ -506,6 +510,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -506,6 +510,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
status
=
acpi_ex_convert_to_buffer
(
operand
[
0
],
&
return_desc
);
status
=
acpi_ex_convert_to_buffer
(
operand
[
0
],
&
return_desc
);
if
(
return_desc
==
operand
[
0
])
{
if
(
return_desc
==
operand
[
0
])
{
/* No conversion performed, add ref to handle return value */
/* No conversion performed, add ref to handle return value */
acpi_ut_add_reference
(
return_desc
);
acpi_ut_add_reference
(
return_desc
);
}
}
...
@@ -516,6 +521,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -516,6 +521,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
status
=
acpi_ex_convert_to_integer
(
operand
[
0
],
&
return_desc
,
status
=
acpi_ex_convert_to_integer
(
operand
[
0
],
&
return_desc
,
ACPI_ANY_BASE
);
ACPI_ANY_BASE
);
if
(
return_desc
==
operand
[
0
])
{
if
(
return_desc
==
operand
[
0
])
{
/* No conversion performed, add ref to handle return value */
/* No conversion performed, add ref to handle return value */
acpi_ut_add_reference
(
return_desc
);
acpi_ut_add_reference
(
return_desc
);
}
}
...
@@ -541,6 +547,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -541,6 +547,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
}
}
if
(
ACPI_SUCCESS
(
status
))
{
if
(
ACPI_SUCCESS
(
status
))
{
/* Store the return value computed above into the target object */
/* Store the return value computed above into the target object */
status
=
acpi_ex_store
(
return_desc
,
operand
[
1
],
walk_state
);
status
=
acpi_ex_store
(
return_desc
,
operand
[
1
],
walk_state
);
...
@@ -548,16 +555,18 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -548,16 +555,18 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
cleanup:
cleanup:
if
(
!
walk_state
->
result_obj
)
{
walk_state
->
result_obj
=
return_desc
;
}
/* Delete return object on error */
/* Delete return object on error */
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
acpi_ut_remove_reference
(
return_desc
);
acpi_ut_remove_reference
(
return_desc
);
}
}
/* Save return object on success */
else
if
(
!
walk_state
->
result_obj
)
{
walk_state
->
result_obj
=
return_desc
;
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
...
@@ -582,7 +591,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
...
@@ -582,7 +591,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
u32
type
;
u32
type
;
acpi_integer
value
;
acpi_integer
value
;
ACPI_FUNCTION_TRACE_STR
(
"ex_opcode_1A_0T_1R"
,
ACPI_FUNCTION_TRACE_STR
(
ex_opcode_1A_0T_1R
,
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
/* Examine the AML opcode */
/* Examine the AML opcode */
...
@@ -625,6 +634,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
...
@@ -625,6 +634,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
temp_desc
=
operand
[
0
];
temp_desc
=
operand
[
0
];
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
temp_desc
)
==
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
temp_desc
)
==
ACPI_DESC_TYPE_OPERAND
)
{
ACPI_DESC_TYPE_OPERAND
)
{
/* Internal reference object - prevent deletion */
/* Internal reference object - prevent deletion */
acpi_ut_add_reference
(
temp_desc
);
acpi_ut_add_reference
(
temp_desc
);
...
@@ -689,6 +699,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
...
@@ -689,6 +699,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
goto
cleanup
;
goto
cleanup
;
}
}
/* Allocate a descriptor to hold the type. */
/* Allocate a descriptor to hold the type. */
return_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_INTEGER
);
return_desc
=
acpi_ut_create_internal_object
(
ACPI_TYPE_INTEGER
);
...
@@ -777,8 +788,25 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
...
@@ -777,8 +788,25 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
/* Check for a method local or argument, or standalone String */
/* Check for a method local or argument, or standalone String */
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
operand
[
0
])
!
=
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
operand
[
0
])
=
=
ACPI_DESC_TYPE_NAMED
)
{
ACPI_DESC_TYPE_NAMED
)
{
temp_desc
=
acpi_ns_get_attached_object
((
struct
acpi_namespace_node
*
)
operand
[
0
]);
if
(
temp_desc
&&
((
ACPI_GET_OBJECT_TYPE
(
temp_desc
)
==
ACPI_TYPE_STRING
)
||
(
ACPI_GET_OBJECT_TYPE
(
temp_desc
)
==
ACPI_TYPE_LOCAL_REFERENCE
)))
{
operand
[
0
]
=
temp_desc
;
acpi_ut_add_reference
(
temp_desc
);
}
else
{
status
=
AE_AML_OPERAND_TYPE
;
goto
cleanup
;
}
}
else
{
switch
(
ACPI_GET_OBJECT_TYPE
(
operand
[
0
]))
{
switch
(
ACPI_GET_OBJECT_TYPE
(
operand
[
0
]))
{
case
ACPI_TYPE_LOCAL_REFERENCE
:
case
ACPI_TYPE_LOCAL_REFERENCE
:
/*
/*
...
@@ -827,26 +855,35 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
...
@@ -827,26 +855,35 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
break
;
break
;
case
ACPI_TYPE_STRING
:
case
ACPI_TYPE_STRING
:
break
;
default:
status
=
AE_AML_OPERAND_TYPE
;
goto
cleanup
;
}
}
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
operand
[
0
])
!=
ACPI_DESC_TYPE_NAMED
)
{
if
(
ACPI_GET_OBJECT_TYPE
(
operand
[
0
])
==
ACPI_TYPE_STRING
)
{
/*
/*
* This is a deref_of (String). The string is a reference
* This is a deref_of (String). The string is a reference
* to a named ACPI object.
* to a named ACPI object.
*
*
* 1) Find the owning Node
* 1) Find the owning Node
* 2) Dereference the node to an actual object.
Could be a
* 2) Dereference the node to an actual object. Could be a
* Field, so we need to resolve the node to a value.
* Field, so we need to resolve the node to a value.
*/
*/
status
=
status
=
acpi_ns_get_node_by_path
(
operand
[
0
]
->
string
.
acpi_ns_get_node
(
walk_state
->
scope_info
->
pointer
,
scope
.
node
,
walk_state
->
operand
[
0
]
->
string
.
pointer
,
scope_info
->
scope
.
ACPI_NS_SEARCH_PARENT
,
node
,
ACPI_CAST_INDIRECT_PTR
ACPI_NS_SEARCH_PARENT
,
(
struct
ACPI_CAST_INDIRECT_PTR
acpi_namespace_node
,
(
struct
&
return_desc
));
acpi_namespace_node
,
&
return_desc
));
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
goto
cleanup
;
goto
cleanup
;
}
}
...
@@ -857,11 +894,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
...
@@ -857,11 +894,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
(
struct
acpi_namespace_node
,
&
return_desc
),
(
struct
acpi_namespace_node
,
&
return_desc
),
walk_state
);
walk_state
);
goto
cleanup
;
goto
cleanup
;
default:
status
=
AE_AML_OPERAND_TYPE
;
goto
cleanup
;
}
}
}
}
...
@@ -937,13 +969,12 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
...
@@ -937,13 +969,12 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
acpi_ut_add_reference
acpi_ut_add_reference
(
return_desc
);
(
return_desc
);
}
}
break
;
break
;
default:
default:
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Unknown Index
target_t
ype %X in obj %p"
,
"Unknown Index
TargetT
ype %X in obj %p"
,
operand
[
0
]
->
reference
.
operand
[
0
]
->
reference
.
target_type
,
operand
[
0
]));
target_type
,
operand
[
0
]));
status
=
AE_AML_OPERAND_TYPE
;
status
=
AE_AML_OPERAND_TYPE
;
...
@@ -957,7 +988,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
...
@@ -957,7 +988,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
return_desc
)
==
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
return_desc
)
==
ACPI_DESC_TYPE_NAMED
)
{
ACPI_DESC_TYPE_NAMED
)
{
return_desc
=
return_desc
=
acpi_ns_get_attached_object
((
struct
acpi_ns_get_attached_object
((
struct
acpi_namespace_node
acpi_namespace_node
...
@@ -972,7 +1002,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
...
@@ -972,7 +1002,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
default:
default:
ACPI_ERROR
((
AE_INFO
,
ACPI_ERROR
((
AE_INFO
,
"Unknown opcode in ref(%p) - %X"
,
"Unknown opcode in ref
erence
(%p) - %X"
,
operand
[
0
],
operand
[
0
],
operand
[
0
]
->
reference
.
opcode
));
operand
[
0
]
->
reference
.
opcode
));
...
@@ -998,6 +1028,11 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
...
@@ -998,6 +1028,11 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
acpi_ut_remove_reference
(
return_desc
);
acpi_ut_remove_reference
(
return_desc
);
}
}
walk_state
->
result_obj
=
return_desc
;
/* Save return object on success */
else
{
walk_state
->
result_obj
=
return_desc
;
}
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
drivers/acpi/executer/exoparg2.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/executer/exoparg3.c
浏览文件 @
b3899c66
...
@@ -88,20 +88,19 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
...
@@ -88,20 +88,19 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
struct
acpi_signal_fatal_info
*
fatal
;
struct
acpi_signal_fatal_info
*
fatal
;
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
ACPI_FUNCTION_TRACE_STR
(
"ex_opcode_3A_0T_0R"
,
ACPI_FUNCTION_TRACE_STR
(
ex_opcode_3A_0T_0R
,
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
switch
(
walk_state
->
opcode
)
{
switch
(
walk_state
->
opcode
)
{
case
AML_FATAL_OP
:
/* Fatal (fatal_type fatal_code fatal_arg) */
case
AML_FATAL_OP
:
/* Fatal (fatal_type fatal_code fatal_arg) */
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"
fatal_o
p: Type %X Code %X Arg %X <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
\n
"
,
"
FatalO
p: Type %X Code %X Arg %X <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
\n
"
,
(
u32
)
operand
[
0
]
->
integer
.
value
,
(
u32
)
operand
[
0
]
->
integer
.
value
,
(
u32
)
operand
[
1
]
->
integer
.
value
,
(
u32
)
operand
[
1
]
->
integer
.
value
,
(
u32
)
operand
[
2
]
->
integer
.
value
));
(
u32
)
operand
[
2
]
->
integer
.
value
));
fatal
=
fatal
=
ACPI_ALLOCATE
(
sizeof
(
struct
acpi_signal_fatal_info
));
ACPI_MEM_ALLOCATE
(
sizeof
(
struct
acpi_signal_fatal_info
));
if
(
fatal
)
{
if
(
fatal
)
{
fatal
->
type
=
(
u32
)
operand
[
0
]
->
integer
.
value
;
fatal
->
type
=
(
u32
)
operand
[
0
]
->
integer
.
value
;
fatal
->
code
=
(
u32
)
operand
[
1
]
->
integer
.
value
;
fatal
->
code
=
(
u32
)
operand
[
1
]
->
integer
.
value
;
...
@@ -114,7 +113,7 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
...
@@ -114,7 +113,7 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
/* Might return while OS is shutting down, just continue */
/* Might return while OS is shutting down, just continue */
ACPI_
MEM_
FREE
(
fatal
);
ACPI_FREE
(
fatal
);
break
;
break
;
default:
default:
...
@@ -151,7 +150,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -151,7 +150,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
acpi_integer
index
;
acpi_integer
index
;
acpi_size
length
;
acpi_size
length
;
ACPI_FUNCTION_TRACE_STR
(
"ex_opcode_3A_1T_1R"
,
ACPI_FUNCTION_TRACE_STR
(
ex_opcode_3A_1T_1R
,
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
switch
(
walk_state
->
opcode
)
{
switch
(
walk_state
->
opcode
)
{
...
@@ -196,7 +195,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -196,7 +195,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
/* Always allocate a new buffer for the String */
/* Always allocate a new buffer for the String */
buffer
=
ACPI_
MEM_CALLOCATE
((
acpi_size
)
length
+
1
);
buffer
=
ACPI_
ALLOCATE_ZEROED
((
acpi_size
)
length
+
1
);
if
(
!
buffer
)
{
if
(
!
buffer
)
{
status
=
AE_NO_MEMORY
;
status
=
AE_NO_MEMORY
;
goto
cleanup
;
goto
cleanup
;
...
@@ -208,9 +207,10 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -208,9 +207,10 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
/* If the requested length is zero, don't allocate a buffer */
/* If the requested length is zero, don't allocate a buffer */
if
(
length
>
0
)
{
if
(
length
>
0
)
{
/* Allocate a new buffer for the Buffer */
/* Allocate a new buffer for the Buffer */
buffer
=
ACPI_
MEM_CALLOCATE
(
length
);
buffer
=
ACPI_
ALLOCATE_ZEROED
(
length
);
if
(
!
buffer
)
{
if
(
!
buffer
)
{
status
=
AE_NO_MEMORY
;
status
=
AE_NO_MEMORY
;
goto
cleanup
;
goto
cleanup
;
...
@@ -225,6 +225,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
...
@@ -225,6 +225,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
}
}
if
(
buffer
)
{
if
(
buffer
)
{
/* We have a buffer, copy the portion requested */
/* We have a buffer, copy the portion requested */
ACPI_MEMCPY
(
buffer
,
operand
[
0
]
->
string
.
pointer
+
index
,
ACPI_MEMCPY
(
buffer
,
operand
[
0
]
->
string
.
pointer
+
index
,
...
...
drivers/acpi/executer/exoparg6.c
浏览文件 @
b3899c66
...
@@ -220,7 +220,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
...
@@ -220,7 +220,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
acpi_integer
index
;
acpi_integer
index
;
union
acpi_operand_object
*
this_element
;
union
acpi_operand_object
*
this_element
;
ACPI_FUNCTION_TRACE_STR
(
"ex_opcode_6A_0T_1R"
,
ACPI_FUNCTION_TRACE_STR
(
ex_opcode_6A_0T_1R
,
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
acpi_ps_get_opcode_name
(
walk_state
->
opcode
));
switch
(
walk_state
->
opcode
)
{
switch
(
walk_state
->
opcode
)
{
...
@@ -276,6 +276,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
...
@@ -276,6 +276,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state)
* match was found.
* match was found.
*/
*/
for
(;
index
<
operand
[
0
]
->
package
.
count
;
index
++
)
{
for
(;
index
<
operand
[
0
]
->
package
.
count
;
index
++
)
{
/* Get the current package element */
/* Get the current package element */
this_element
=
operand
[
0
]
->
package
.
elements
[
index
];
this_element
=
operand
[
0
]
->
package
.
elements
[
index
];
...
...
drivers/acpi/executer/exprep.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/executer/exregion.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/executer/exresnte.c
浏览文件 @
b3899c66
...
@@ -87,7 +87,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
...
@@ -87,7 +87,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
struct
acpi_namespace_node
*
node
;
struct
acpi_namespace_node
*
node
;
acpi_object_type
entry_type
;
acpi_object_type
entry_type
;
ACPI_FUNCTION_TRACE
(
"ex_resolve_node_to_value"
);
ACPI_FUNCTION_TRACE
(
ex_resolve_node_to_value
);
/*
/*
* The stack pointer points to a struct acpi_namespace_node (Node). Get the
* The stack pointer points to a struct acpi_namespace_node (Node). Get the
...
@@ -97,12 +97,13 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
...
@@ -97,12 +97,13 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
source_desc
=
acpi_ns_get_attached_object
(
node
);
source_desc
=
acpi_ns_get_attached_object
(
node
);
entry_type
=
acpi_ns_get_type
((
acpi_handle
)
node
);
entry_type
=
acpi_ns_get_type
((
acpi_handle
)
node
);
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Entry=%p
source_d
esc=%p [%s]
\n
"
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"Entry=%p
SourceD
esc=%p [%s]
\n
"
,
node
,
source_desc
,
node
,
source_desc
,
acpi_ut_get_type_name
(
entry_type
)));
acpi_ut_get_type_name
(
entry_type
)));
if
((
entry_type
==
ACPI_TYPE_LOCAL_ALIAS
)
||
if
((
entry_type
==
ACPI_TYPE_LOCAL_ALIAS
)
||
(
entry_type
==
ACPI_TYPE_LOCAL_METHOD_ALIAS
))
{
(
entry_type
==
ACPI_TYPE_LOCAL_METHOD_ALIAS
))
{
/* There is always exactly one level of indirection */
/* There is always exactly one level of indirection */
node
=
ACPI_CAST_PTR
(
struct
acpi_namespace_node
,
node
->
object
);
node
=
ACPI_CAST_PTR
(
struct
acpi_namespace_node
,
node
->
object
);
...
@@ -113,10 +114,11 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
...
@@ -113,10 +114,11 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
/*
/*
* Several object types require no further processing:
* Several object types require no further processing:
* 1) Device
s rarely have an attached
object, return the Node
* 1) Device
/Thermal objects don't have a "real" sub
object, return the Node
* 2) Method locals and arguments have a pseudo-Node
* 2) Method locals and arguments have a pseudo-Node
*/
*/
if
(
entry_type
==
ACPI_TYPE_DEVICE
||
if
((
entry_type
==
ACPI_TYPE_DEVICE
)
||
(
entry_type
==
ACPI_TYPE_THERMAL
)
||
(
node
->
flags
&
(
ANOBJ_METHOD_ARG
|
ANOBJ_METHOD_LOCAL
)))
{
(
node
->
flags
&
(
ANOBJ_METHOD_ARG
|
ANOBJ_METHOD_LOCAL
)))
{
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
}
}
...
@@ -141,6 +143,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
...
@@ -141,6 +143,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
status
=
acpi_ds_get_package_arguments
(
source_desc
);
status
=
acpi_ds_get_package_arguments
(
source_desc
);
if
(
ACPI_SUCCESS
(
status
))
{
if
(
ACPI_SUCCESS
(
status
))
{
/* Return an additional reference to the object */
/* Return an additional reference to the object */
obj_desc
=
source_desc
;
obj_desc
=
source_desc
;
...
@@ -158,6 +161,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
...
@@ -158,6 +161,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
status
=
acpi_ds_get_buffer_arguments
(
source_desc
);
status
=
acpi_ds_get_buffer_arguments
(
source_desc
);
if
(
ACPI_SUCCESS
(
status
))
{
if
(
ACPI_SUCCESS
(
status
))
{
/* Return an additional reference to the object */
/* Return an additional reference to the object */
obj_desc
=
source_desc
;
obj_desc
=
source_desc
;
...
@@ -199,7 +203,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
...
@@ -199,7 +203,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
case
ACPI_TYPE_LOCAL_INDEX_FIELD
:
case
ACPI_TYPE_LOCAL_INDEX_FIELD
:
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
ACPI_DEBUG_PRINT
((
ACPI_DB_EXEC
,
"
field_read Node=%p source_d
esc=%p Type=%X
\n
"
,
"
FieldRead Node=%p SourceD
esc=%p Type=%X
\n
"
,
node
,
source_desc
,
entry_type
));
node
,
source_desc
,
entry_type
));
status
=
status
=
...
@@ -213,7 +217,6 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
...
@@ -213,7 +217,6 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
case
ACPI_TYPE_METHOD
:
case
ACPI_TYPE_METHOD
:
case
ACPI_TYPE_POWER
:
case
ACPI_TYPE_POWER
:
case
ACPI_TYPE_PROCESSOR
:
case
ACPI_TYPE_PROCESSOR
:
case
ACPI_TYPE_THERMAL
:
case
ACPI_TYPE_EVENT
:
case
ACPI_TYPE_EVENT
:
case
ACPI_TYPE_REGION
:
case
ACPI_TYPE_REGION
:
...
@@ -240,6 +243,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
...
@@ -240,6 +243,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
/* This is a ddb_handle */
/* This is a ddb_handle */
/* Return an additional reference to the object */
/* Return an additional reference to the object */
case
AML_REF_OF_OP
:
obj_desc
=
source_desc
;
obj_desc
=
source_desc
;
acpi_ut_add_reference
(
obj_desc
);
acpi_ut_add_reference
(
obj_desc
);
break
;
break
;
...
...
drivers/acpi/executer/exresolv.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/executer/exresop.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/executer/exstore.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/executer/exstoren.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/executer/exstorob.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/executer/exsystem.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/executer/exutils.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/hardware/hwacpi.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/hardware/hwgpe.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/hardware/hwregs.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/hardware/hwsleep.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/hardware/hwtimer.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsaccess.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsalloc.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsdump.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsdumpdv.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nseval.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsinit.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsload.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsnames.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsobject.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsparse.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nssearch.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsutils.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nswalk.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsxfeval.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsxfname.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/namespace/nsxfobj.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/osl.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/parser/psargs.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/parser/psloop.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/parser/psopcode.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/parser/psparse.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/parser/psscope.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/parser/pstree.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/parser/psutils.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/parser/pswalk.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/parser/psxface.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/resources/rscalc.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/resources/rscreate.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/resources/rsdump.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/resources/rsinfo.c
浏览文件 @
b3899c66
...
@@ -141,6 +141,7 @@ struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = {
...
@@ -141,6 +141,7 @@ struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = {
acpi_rs_dump_generic_reg
,
/* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
acpi_rs_dump_generic_reg
,
/* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
};
};
#endif
#endif
#endif
/* ACPI_FUTURE_USAGE */
#endif
/* ACPI_FUTURE_USAGE */
/*
/*
* Base sizes for external AML resource descriptors, indexed by internal type.
* Base sizes for external AML resource descriptors, indexed by internal type.
...
...
drivers/acpi/resources/rslist.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/resources/rsmisc.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/resources/rsutils.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/resources/rsxface.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/system.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/tables.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/tables/tbconvrt.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/tables/tbget.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/tables/tbgetall.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/tables/tbinstal.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/tables/tbrsdt.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/tables/tbutils.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/tables/tbxface.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/tables/tbxfroot.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/thermal.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utalloc.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utcache.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utcopy.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utdebug.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utdelete.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/uteval.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utglobal.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utinit.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utmath.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utmisc.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utmutex.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utobject.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utresrc.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utstate.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/acpi/utilities/utxface.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
drivers/char/agp/hp-agp.c
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acconfig.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acdisasm.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acdispat.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acevents.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acexcep.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acglobal.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/aclocal.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acmacros.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acnamesp.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acobject.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acopcode.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acoutput.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acparser.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acpi_bus.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acpiosxf.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acpixf.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acresrc.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acstruct.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/actables.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/actbl.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/actbl1.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/actbl2.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/actypes.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/acutils.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/amlcode.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/amlresrc.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/platform/acenv.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
include/acpi/platform/aclinux.h
浏览文件 @
b3899c66
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录