Skip to content

Commit

Permalink
ACPICA: AML Parser: ignore all exceptions resulting from incorrect AM…
Browse files Browse the repository at this point in the history
…L 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>
  • Loading branch information
Erik Schmauss authored and Rafael J. Wysocki committed Aug 14, 2018
1 parent 2c20443 commit d46b653
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
26 changes: 13 additions & 13 deletions drivers/acpi/acpica/psloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,20 +709,20 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
} else
if ((walk_state->
parse_flags & ACPI_PARSE_MODULE_LEVEL)
&& status != AE_CTRL_TRANSFER
&& ACPI_FAILURE(status)) {
&& (ACPI_AML_EXCEPTION(status)
|| status == AE_ALREADY_EXISTS
|| status == AE_NOT_FOUND)) {
/*
* ACPI_PARSE_MODULE_LEVEL flag means that we are currently
* loading a table by executing it as a control method.
* However, if we encounter an error while loading the table,
* we need to keep trying to load the table rather than
* aborting the table load (setting the status to AE_OK
* continues the table load). If we get a failure at this
* point, it means that the dispatcher got an error while
* processing Op (most likely an AML operand error) or a
* control method was called from module level and the
* dispatcher returned AE_CTRL_TRANSFER. In the latter case,
* leave the status alone, there's nothing wrong with it.
* ACPI_PARSE_MODULE_LEVEL flag means that we
* are currently loading a table by executing
* it as a control method. However, if we
* encounter an error while loading the table,
* we need to keep trying to load the table
* rather than aborting the table load (setting
* the status to AE_OK continues the table
* load). If we get a failure at this point, it
* means that the dispatcher got an error while
* trying to execute the Op.
*/
status = AE_OK;
}
Expand Down
6 changes: 6 additions & 0 deletions include/acpi/acexcep.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ struct acpi_exception_info {

#define AE_OK (acpi_status) 0x0000

#define ACPI_ENV_EXCEPTION(status) (status & AE_CODE_ENVIRONMENTAL)
#define ACPI_AML_EXCEPTION(status) (status & AE_CODE_AML)
#define ACPI_PROG_EXCEPTION(status) (status & AE_CODE_PROGRAMMER)
#define ACPI_TABLE_EXCEPTION(status) (status & AE_CODE_ACPI_TABLES)
#define ACPI_CNTL_EXCEPTION(status) (status & AE_CODE_CONTROL)

/*
* Environmental exceptions
*/
Expand Down

0 comments on commit d46b653

Please sign in to comment.