Skip to content

Commit d46b653

Browse files
SchmErikrafaeljw
authored andcommitted
ACPICA: AML Parser: ignore all exceptions resulting from incorrect AML during table load
Macros to classify different AML exception codes have been added in order to ignore the exceptions, Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> [ rjw: Fix damaged white space ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 2c20443 commit d46b653

2 files changed

Lines changed: 19 additions & 13 deletions

File tree

‎drivers/acpi/acpica/psloop.c‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -709,20 +709,20 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
709709
} else
710710
if ((walk_state->
711711
parse_flags & ACPI_PARSE_MODULE_LEVEL)
712-
&& status != AE_CTRL_TRANSFER
713-
&& ACPI_FAILURE(status)) {
712+
&& (ACPI_AML_EXCEPTION(status)
713+
|| status == AE_ALREADY_EXISTS
714+
|| status == AE_NOT_FOUND)) {
714715
/*
715-
* ACPI_PARSE_MODULE_LEVEL flag means that we are currently
716-
* loading a table by executing it as a control method.
717-
* However, if we encounter an error while loading the table,
718-
* we need to keep trying to load the table rather than
719-
* aborting the table load (setting the status to AE_OK
720-
* continues the table load). If we get a failure at this
721-
* point, it means that the dispatcher got an error while
722-
* processing Op (most likely an AML operand error) or a
723-
* control method was called from module level and the
724-
* dispatcher returned AE_CTRL_TRANSFER. In the latter case,
725-
* leave the status alone, there's nothing wrong with it.
716+
* ACPI_PARSE_MODULE_LEVEL flag means that we
717+
* are currently loading a table by executing
718+
* it as a control method. However, if we
719+
* encounter an error while loading the table,
720+
* we need to keep trying to load the table
721+
* rather than aborting the table load (setting
722+
* the status to AE_OK continues the table
723+
* load). If we get a failure at this point, it
724+
* means that the dispatcher got an error while
725+
* trying to execute the Op.
726726
*/
727727
status = AE_OK;
728728
}

‎include/acpi/acexcep.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ struct acpi_exception_info {
5959

6060
#define AE_OK (acpi_status) 0x0000
6161

62+
#define ACPI_ENV_EXCEPTION(status) (status & AE_CODE_ENVIRONMENTAL)
63+
#define ACPI_AML_EXCEPTION(status) (status & AE_CODE_AML)
64+
#define ACPI_PROG_EXCEPTION(status) (status & AE_CODE_PROGRAMMER)
65+
#define ACPI_TABLE_EXCEPTION(status) (status & AE_CODE_ACPI_TABLES)
66+
#define ACPI_CNTL_EXCEPTION(status) (status & AE_CODE_CONTROL)
67+
6268
/*
6369
* Environmental exceptions
6470
*/

0 commit comments

Comments
 (0)