diff options
author | Lin Ming <ming.m.lin@intel.com> | 2008-04-10 19:06:42 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-22 14:29:29 -0400 |
commit | 9accd46459b8c068540451fdab07dbfcefaf7280 (patch) | |
tree | ac022ee80ed0ff6ea3d3fd10759e98bd58933c40 /drivers/acpi/parser | |
parent | 8246934b7cf99d1f0c053d57890775e5d0df9c33 (diff) | |
download | kernel-crypto-9accd46459b8c068540451fdab07dbfcefaf7280.tar.gz kernel-crypto-9accd46459b8c068540451fdab07dbfcefaf7280.tar.xz kernel-crypto-9accd46459b8c068540451fdab07dbfcefaf7280.zip |
ACPICA: Methods now implicitly return 0 in slack mode
Implemented an enhancement to the interpreter "slack mode". In the
absence of an explicit return or an implicitly returned object from
the last executed opcode, a control method will now implicitly
return an integer of value 0 for Microsoft compatibility.
http://www.acpica.org/bugzilla/show_bug.cgi?id=392
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/parser')
-rw-r--r-- | drivers/acpi/parser/psparse.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c index a8995ca52ee..a4c4020c40e 100644 --- a/drivers/acpi/parser/psparse.c +++ b/drivers/acpi/parser/psparse.c @@ -594,6 +594,30 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) * The object is deleted */ if (!previous_walk_state->return_desc) { + /* + * In slack mode execution, if there is no return value + * we should implicitly return zero (0) as a default value. + */ + if (acpi_gbl_enable_interpreter_slack && + !previous_walk_state-> + implicit_return_obj) { + previous_walk_state-> + implicit_return_obj = + acpi_ut_create_internal_object + (ACPI_TYPE_INTEGER); + if (!previous_walk_state-> + implicit_return_obj) { + return_ACPI_STATUS + (AE_NO_MEMORY); + } + + previous_walk_state-> + implicit_return_obj-> + integer.value = 0; + } + + /* Restart the calling control method */ + status = acpi_ds_restart_control_method (walk_state, |