diff options
Diffstat (limited to 'drivers/acpi/acpica/dspkginit.c')
-rw-r--r-- | drivers/acpi/acpica/dspkginit.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/dspkginit.c b/drivers/acpi/acpica/dspkginit.c index d703a5594a02..584853385268 100644 --- a/drivers/acpi/acpica/dspkginit.c +++ b/drivers/acpi/acpica/dspkginit.c | |||
@@ -152,6 +152,32 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state, | |||
152 | */ | 152 | */ |
153 | for (i = 0; arg && (i < element_count); i++) { | 153 | for (i = 0; arg && (i < element_count); i++) { |
154 | if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) { | 154 | if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) { |
155 | if (!arg->common.node) { | ||
156 | /* | ||
157 | * This is the case where an expression has returned a value. | ||
158 | * The use of expressions (term_args) within individual | ||
159 | * package elements is not supported by the AML interpreter, | ||
160 | * even though the ASL grammar supports it. Example: | ||
161 | * | ||
162 | * Name (INT1, 0x1234) | ||
163 | * | ||
164 | * Name (PKG3, Package () { | ||
165 | * Add (INT1, 0xAAAA0000) | ||
166 | * }) | ||
167 | * | ||
168 | * 1) No known AML interpreter supports this type of construct | ||
169 | * 2) This fixes a fault if the construct is encountered | ||
170 | */ | ||
171 | ACPI_EXCEPTION((AE_INFO, AE_SUPPORT, | ||
172 | "Expressions within package elements are not supported")); | ||
173 | |||
174 | /* Cleanup the return object, it is not needed */ | ||
175 | |||
176 | acpi_ut_remove_reference(walk_state->results-> | ||
177 | results.obj_desc[0]); | ||
178 | return_ACPI_STATUS(AE_SUPPORT); | ||
179 | } | ||
180 | |||
155 | if (arg->common.node->type == ACPI_TYPE_METHOD) { | 181 | if (arg->common.node->type == ACPI_TYPE_METHOD) { |
156 | /* | 182 | /* |
157 | * A method reference "looks" to the parser to be a method | 183 | * A method reference "looks" to the parser to be a method |