Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xcap-capability-linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xcap
xcap-capability-linux
Commits
6ac47735
Commit
6ac47735
authored
17 years ago
by
Len Brown
Browse files
Options
Downloads
Plain Diff
Pull bugzilla-9429 into release branch
parents
7ac3ae32
152c300d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/acpi/dispatcher/dsobject.c
+85
-6
85 additions, 6 deletions
drivers/acpi/dispatcher/dsobject.c
with
85 additions
and
6 deletions
drivers/acpi/dispatcher/dsobject.c
+
85
−
6
View file @
6ac47735
...
@@ -137,6 +137,71 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
...
@@ -137,6 +137,71 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
return_ACPI_STATUS
(
status
);
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 */
/* Create and init a new internal ACPI object */
...
@@ -156,6 +221,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
...
@@ -156,6 +221,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
return_ACPI_STATUS
(
status
);
return_ACPI_STATUS
(
status
);
}
}
exit:
*
obj_desc_ptr
=
obj_desc
;
*
obj_desc_ptr
=
obj_desc
;
return_ACPI_STATUS
(
AE_OK
);
return_ACPI_STATUS
(
AE_OK
);
}
}
...
@@ -356,12 +422,25 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
...
@@ -356,12 +422,25 @@ 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
<
element_count
);
i
++
)
{
for
(
i
=
0
;
arg
&&
(
i
<
element_count
);
i
++
)
{
if
(
arg
->
common
.
aml_opcode
==
AML_INT_RETURN_VALUE_OP
)
{
if
(
arg
->
common
.
aml_opcode
==
AML_INT_RETURN_VALUE_OP
)
{
if
(
arg
->
common
.
node
->
type
==
ACPI_TYPE_METHOD
)
{
/* This package element is already built, just get it */
/*
* A method reference "looks" to the parser to be a method
obj_desc
->
package
.
elements
[
i
]
=
* invocation, so we special case it here
ACPI_CAST_PTR
(
union
acpi_operand_object
,
*/
arg
->
common
.
node
);
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
{
}
else
{
status
=
acpi_ds_build_internal_object
(
walk_state
,
arg
,
status
=
acpi_ds_build_internal_object
(
walk_state
,
arg
,
&
obj_desc
->
&
obj_desc
->
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment