Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
6ac47735
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6ac47735
编写于
12月 02, 2007
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Pull bugzilla-9429 into release branch
上级
7ac3ae32
152c300d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
85 addition
and
6 deletion
+85
-6
drivers/acpi/dispatcher/dsobject.c
drivers/acpi/dispatcher/dsobject.c
+85
-6
未找到文件。
drivers/acpi/dispatcher/dsobject.c
浏览文件 @
6ac47735
...
...
@@ -137,6 +137,71 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
return_ACPI_STATUS
(
status
);
}
}
/* Special object resolution for elements of a package */
if
((
op
->
common
.
parent
->
common
.
aml_opcode
==
AML_PACKAGE_OP
)
||
(
op
->
common
.
parent
->
common
.
aml_opcode
==
AML_VAR_PACKAGE_OP
))
{
/*
* Attempt to resolve the node to a value before we insert it into
* the package. If this is a reference to a common data type,
* resolve it immediately. According to the ACPI spec, package
* elements can only be "data objects" or method references.
* Attempt to resolve to an Integer, Buffer, String or Package.
* If cannot, return the named reference (for things like Devices,
* Methods, etc.) Buffer Fields and Fields will resolve to simple
* objects (int/buf/str/pkg).
*
* NOTE: References to things like Devices, Methods, Mutexes, etc.
* will remain as named references. This behavior is not described
* in the ACPI spec, but it appears to be an oversight.
*/
obj_desc
=
(
union
acpi_operand_object
*
)
op
->
common
.
node
;
status
=
acpi_ex_resolve_node_to_value
(
ACPI_CAST_INDIRECT_PTR
(
struct
acpi_namespace_node
,
&
obj_desc
),
walk_state
);
if
(
ACPI_FAILURE
(
status
))
{
return_ACPI_STATUS
(
status
);
}
switch
(
op
->
common
.
node
->
type
)
{
/*
* For these types, we need the actual node, not the subobject.
* However, the subobject got an extra reference count above.
*/
case
ACPI_TYPE_MUTEX
:
case
ACPI_TYPE_METHOD
:
case
ACPI_TYPE_POWER
:
case
ACPI_TYPE_PROCESSOR
:
case
ACPI_TYPE_EVENT
:
case
ACPI_TYPE_REGION
:
case
ACPI_TYPE_DEVICE
:
case
ACPI_TYPE_THERMAL
:
obj_desc
=
(
union
acpi_operand_object
*
)
op
->
common
.
node
;
break
;
default:
break
;
}
/*
* If above resolved to an operand object, we are done. Otherwise,
* we have a NS node, we must create the package entry as a named
* reference.
*/
if
(
ACPI_GET_DESCRIPTOR_TYPE
(
obj_desc
)
!=
ACPI_DESC_TYPE_NAMED
)
{
goto
exit
;
}
}
}
/* Create and init a new internal ACPI object */
...
...
@@ -156,6 +221,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
return_ACPI_STATUS
(
status
);
}
exit:
*
obj_desc_ptr
=
obj_desc
;
return_ACPI_STATUS
(
AE_OK
);
}
...
...
@@ -356,12 +422,25 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
arg
=
arg
->
common
.
next
;
for
(
i
=
0
;
arg
&&
(
i
<
element_count
);
i
++
)
{
if
(
arg
->
common
.
aml_opcode
==
AML_INT_RETURN_VALUE_OP
)
{
/* This package element is already built, just get it */
obj_desc
->
package
.
elements
[
i
]
=
ACPI_CAST_PTR
(
union
acpi_operand_object
,
arg
->
common
.
node
);
if
(
arg
->
common
.
node
->
type
==
ACPI_TYPE_METHOD
)
{
/*
* A method reference "looks" to the parser to be a method
* invocation, so we special case it here
*/
arg
->
common
.
aml_opcode
=
AML_INT_NAMEPATH_OP
;
status
=
acpi_ds_build_internal_object
(
walk_state
,
arg
,
&
obj_desc
->
package
.
elements
[
i
]);
}
else
{
/* This package element is already built, just get it */
obj_desc
->
package
.
elements
[
i
]
=
ACPI_CAST_PTR
(
union
acpi_operand_object
,
arg
->
common
.
node
);
}
}
else
{
status
=
acpi_ds_build_internal_object
(
walk_state
,
arg
,
&
obj_desc
->
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录