diff options
author | Bob Moore <robert.moore@intel.com> | 2018-03-14 19:13:04 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-03-18 13:52:00 -0400 |
commit | 34f206fd757c5061a67d879a74c300fafc34defb (patch) | |
tree | 89746a8405e8166ff2dc9c329fcdd6f69730804e | |
parent | e7c2c3c909c0bda8ebebfc0a11c3d94745e9b043 (diff) |
ACPICA: Change a compile-time option to a runtime option
Changes the option to ignore package resolution errors into
a runtime option.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpica/dspkginit.c | 32 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 10 |
2 files changed, 26 insertions, 16 deletions
diff --git a/drivers/acpi/acpica/dspkginit.c b/drivers/acpi/acpica/dspkginit.c index 7d48525b5e52..931da52b9774 100644 --- a/drivers/acpi/acpica/dspkginit.c +++ b/drivers/acpi/acpica/dspkginit.c | |||
@@ -413,32 +413,32 @@ acpi_ds_resolve_package_element(union acpi_operand_object **element_ptr) | |||
413 | 413 | ||
414 | scope_info.scope.node = element->reference.node; /* Prefix node */ | 414 | scope_info.scope.node = element->reference.node; /* Prefix node */ |
415 | 415 | ||
416 | status = acpi_ns_lookup(&scope_info, (char *)element->reference.aml, /* Pointer to AML path */ | 416 | status = acpi_ns_lookup(&scope_info, (char *)element->reference.aml, |
417 | ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, | 417 | ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, |
418 | ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, | 418 | ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, |
419 | NULL, &resolved_node); | 419 | NULL, &resolved_node); |
420 | if (ACPI_FAILURE(status)) { | 420 | if (ACPI_FAILURE(status)) { |
421 | #if defined ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS && !defined ACPI_APPLICATION | 421 | if ((status == AE_NOT_FOUND) |
422 | /* | 422 | && acpi_gbl_ignore_package_resolution_errors) { |
423 | * For the kernel-resident ACPICA, optionally be silent about the | 423 | /* |
424 | * NOT_FOUND case. Although this is potentially a serious problem, | 424 | * Optionally be silent about the NOT_FOUND case for the referenced |
425 | * it can generate a lot of noise/errors on platforms whose | 425 | * name. Although this is potentially a serious problem, |
426 | * firmware carries around a bunch of unused Package objects. | 426 | * it can generate a lot of noise/errors on platforms whose |
427 | * To disable these errors, define ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS | 427 | * firmware carries around a bunch of unused Package objects. |
428 | * in the OS-specific header. | 428 | * To disable these errors, set this global to TRUE: |
429 | * | 429 | * acpi_gbl_ignore_package_resolution_errors |
430 | * All errors are always reported for ACPICA applications such as | 430 | * |
431 | * acpi_exec. | 431 | * If the AML actually tries to use such a package, the unresolved |
432 | */ | 432 | * element(s) will be replaced with NULL elements. |
433 | if (status == AE_NOT_FOUND) { | 433 | */ |
434 | 434 | ||
435 | /* Reference name not found, set the element to NULL */ | 435 | /* Referenced name not found, set the element to NULL */ |
436 | 436 | ||
437 | acpi_ut_remove_reference(*element_ptr); | 437 | acpi_ut_remove_reference(*element_ptr); |
438 | *element_ptr = NULL; | 438 | *element_ptr = NULL; |
439 | return_VOID; | 439 | return_VOID; |
440 | } | 440 | } |
441 | #endif | 441 | |
442 | status2 = acpi_ns_externalize_name(ACPI_UINT32_MAX, | 442 | status2 = acpi_ns_externalize_name(ACPI_UINT32_MAX, |
443 | (char *)element->reference. | 443 | (char *)element->reference. |
444 | aml, NULL, &external_path); | 444 | aml, NULL, &external_path); |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index ecd22e45ce3b..b8d42c5c4264 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -271,6 +271,16 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE); | |||
271 | ACPI_INIT_GLOBAL(u32, acpi_gbl_max_loop_iterations, ACPI_MAX_LOOP_TIMEOUT); | 271 | ACPI_INIT_GLOBAL(u32, acpi_gbl_max_loop_iterations, ACPI_MAX_LOOP_TIMEOUT); |
272 | 272 | ||
273 | /* | 273 | /* |
274 | * Optionally ignore AE_NOT_FOUND errors from named reference package elements | ||
275 | * during DSDT/SSDT table loading. This reduces error "noise" in platforms | ||
276 | * whose firmware is carrying around a bunch of unused package objects that | ||
277 | * refer to non-existent named objects. However, If the AML actually tries to | ||
278 | * use such a package, the unresolved element(s) will be replaced with NULL | ||
279 | * elements. | ||
280 | */ | ||
281 | ACPI_INIT_GLOBAL(u8, acpi_gbl_ignore_package_resolution_errors, FALSE); | ||
282 | |||
283 | /* | ||
274 | * This mechanism is used to trace a specified AML method. The method is | 284 | * This mechanism is used to trace a specified AML method. The method is |
275 | * traced each time it is executed. | 285 | * traced each time it is executed. |
276 | */ | 286 | */ |