Commit 34f206fd authored by Bob Moore's avatar Bob Moore Committed by Rafael J. Wysocki

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: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarErik Schmauss <erik.schmauss@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent e7c2c3c9
...@@ -413,32 +413,32 @@ acpi_ds_resolve_package_element(union acpi_operand_object **element_ptr) ...@@ -413,32 +413,32 @@ acpi_ds_resolve_package_element(union acpi_operand_object **element_ptr)
scope_info.scope.node = element->reference.node; /* Prefix node */ scope_info.scope.node = element->reference.node; /* Prefix node */
status = acpi_ns_lookup(&scope_info, (char *)element->reference.aml, /* Pointer to AML path */ status = acpi_ns_lookup(&scope_info, (char *)element->reference.aml,
ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
NULL, &resolved_node); NULL, &resolved_node);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
#if defined ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS && !defined ACPI_APPLICATION if ((status == AE_NOT_FOUND)
/* && acpi_gbl_ignore_package_resolution_errors) {
* For the kernel-resident ACPICA, optionally be silent about the /*
* NOT_FOUND case. Although this is potentially a serious problem, * Optionally be silent about the NOT_FOUND case for the referenced
* it can generate a lot of noise/errors on platforms whose * name. Although this is potentially a serious problem,
* firmware carries around a bunch of unused Package objects. * it can generate a lot of noise/errors on platforms whose
* To disable these errors, define ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS * firmware carries around a bunch of unused Package objects.
* in the OS-specific header. * To disable these errors, set this global to TRUE:
* * acpi_gbl_ignore_package_resolution_errors
* All errors are always reported for ACPICA applications such as *
* acpi_exec. * If the AML actually tries to use such a package, the unresolved
*/ * element(s) will be replaced with NULL elements.
if (status == AE_NOT_FOUND) { */
/* Reference name not found, set the element to NULL */ /* Referenced name not found, set the element to NULL */
acpi_ut_remove_reference(*element_ptr); acpi_ut_remove_reference(*element_ptr);
*element_ptr = NULL; *element_ptr = NULL;
return_VOID; return_VOID;
} }
#endif
status2 = acpi_ns_externalize_name(ACPI_UINT32_MAX, status2 = acpi_ns_externalize_name(ACPI_UINT32_MAX,
(char *)element->reference. (char *)element->reference.
aml, NULL, &external_path); aml, NULL, &external_path);
......
...@@ -270,6 +270,16 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE); ...@@ -270,6 +270,16 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
*/ */
ACPI_INIT_GLOBAL(u32, acpi_gbl_max_loop_iterations, ACPI_MAX_LOOP_TIMEOUT); ACPI_INIT_GLOBAL(u32, acpi_gbl_max_loop_iterations, ACPI_MAX_LOOP_TIMEOUT);
/*
* Optionally ignore AE_NOT_FOUND errors from named reference package elements
* during DSDT/SSDT table loading. This reduces error "noise" in platforms
* whose firmware is carrying around a bunch of unused package objects that
* refer to non-existent named objects. However, If the AML actually tries to
* use such a package, the unresolved element(s) will be replaced with NULL
* elements.
*/
ACPI_INIT_GLOBAL(u8, acpi_gbl_ignore_package_resolution_errors, FALSE);
/* /*
* This mechanism is used to trace a specified AML method. The method is * This mechanism is used to trace a specified AML method. The method is
* traced each time it is executed. * traced each time it is executed.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment