summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2018-03-14 16:13:04 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-03-18 18:52:00 +0100
commit34f206fd757c5061a67d879a74c300fafc34defb (patch)
tree89746a8405e8166ff2dc9c329fcdd6f69730804e /drivers/acpi
parente7c2c3c909c0bda8ebebfc0a11c3d94745e9b043 (diff)
downloadop-kernel-dev-34f206fd757c5061a67d879a74c300fafc34defb.zip
op-kernel-dev-34f206fd757c5061a67d879a74c300fafc34defb.tar.gz
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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpica/dspkginit.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/acpi/acpica/dspkginit.c b/drivers/acpi/acpica/dspkginit.c
index 7d48525..931da52 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)
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_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
NULL, &resolved_node);
if (ACPI_FAILURE(status)) {
-#if defined ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS && !defined ACPI_APPLICATION
- /*
- * For the kernel-resident ACPICA, optionally be silent about the
- * NOT_FOUND case. Although this is potentially a serious problem,
- * it can generate a lot of noise/errors on platforms whose
- * firmware carries around a bunch of unused Package objects.
- * To disable these errors, define ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS
- * in the OS-specific header.
- *
- * All errors are always reported for ACPICA applications such as
- * acpi_exec.
- */
- if (status == AE_NOT_FOUND) {
+ if ((status == AE_NOT_FOUND)
+ && acpi_gbl_ignore_package_resolution_errors) {
+ /*
+ * Optionally be silent about the NOT_FOUND case for the referenced
+ * name. Although this is potentially a serious problem,
+ * it can generate a lot of noise/errors on platforms whose
+ * firmware carries around a bunch of unused Package objects.
+ * To disable these errors, set this global to TRUE:
+ * acpi_gbl_ignore_package_resolution_errors
+ *
+ * If the AML actually tries to use such a package, the unresolved
+ * element(s) will be replaced with NULL elements.
+ */
- /* Reference name not found, set the element to NULL */
+ /* Referenced name not found, set the element to NULL */
acpi_ut_remove_reference(*element_ptr);
*element_ptr = NULL;
return_VOID;
}
-#endif
+
status2 = acpi_ns_externalize_name(ACPI_UINT32_MAX,
(char *)element->reference.
aml, NULL, &external_path);
OpenPOWER on IntegriCloud