提交 28f538b5 编写于 作者: B Bob Moore 提交者: Len Brown

ACPICA: Enable Scope change to root during module-level code execution.

Allows constructs like this:
    If (XXXX)
        Scope (\)
        ...
Signed-off-by: NBob Moore <robert.moore@intel.com>
Signed-off-by: NFeng Tang <feng.tang@intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 a950c135
...@@ -230,6 +230,20 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, ...@@ -230,6 +230,20 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
walk_state->scope_info->common.value = ACPI_TYPE_ANY; walk_state->scope_info->common.value = ACPI_TYPE_ANY;
break; break;
case ACPI_TYPE_METHOD:
/*
* Allow scope change to root during execution of module-level
* code. Root is typed METHOD during this time.
*/
if ((node == acpi_gbl_root_node) &&
(walk_state->
parse_flags & ACPI_PARSE_MODULE_LEVEL)) {
break;
}
/*lint -fallthrough */
default: default:
/* All other types are an error */ /* All other types are an error */
......
...@@ -230,6 +230,20 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, ...@@ -230,6 +230,20 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
walk_state->scope_info->common.value = ACPI_TYPE_ANY; walk_state->scope_info->common.value = ACPI_TYPE_ANY;
break; break;
case ACPI_TYPE_METHOD:
/*
* Allow scope change to root during execution of module-level
* code. Root is typed METHOD during this time.
*/
if ((node == acpi_gbl_root_node) &&
(walk_state->
parse_flags & ACPI_PARSE_MODULE_LEVEL)) {
break;
}
/*lint -fallthrough */
default: default:
/* All other types are an error */ /* All other types are an error */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册