diff options
author | Bob Moore <robert.moore@intel.com> | 2008-11-13 02:45:35 +0100 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-12-30 04:38:37 +0100 |
commit | a8fadc923d1659f1a322194d420808d5b255883c (patch) | |
tree | b8afd36cc4217400efb0e71c550c69bfc8822352 /drivers/acpi/parser/psxface.c | |
parent | ACPICA: Reformat comments, no functional changes (diff) | |
download | linux-a8fadc923d1659f1a322194d420808d5b255883c.tar.xz linux-a8fadc923d1659f1a322194d420808d5b255883c.zip |
ACPICA: Add support to externally execute _OSI method
The current implemenation of _OSI within ACPICA only allows other
control methods to execute _OSI. This change allows the host
OS to execute _OSI via the AcpiEvaluateObject interface. _OSI
is a special method -- it does not exist in the AML code, it is
implemented within ACPICA.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/parser/psxface.c')
-rw-r--r-- | drivers/acpi/parser/psxface.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/acpi/parser/psxface.c b/drivers/acpi/parser/psxface.c index 270469aae842..4985ce58c024 100644 --- a/drivers/acpi/parser/psxface.c +++ b/drivers/acpi/parser/psxface.c @@ -45,6 +45,7 @@ #include <acpi/acparser.h> #include <acpi/acdispat.h> #include <acpi/acinterp.h> +#include <acpi/amlcode.h> #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME("psxface") @@ -278,6 +279,22 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info) goto cleanup; } + /* Invoke an internal method if necessary */ + + if (info->obj_desc->method.method_flags & AML_METHOD_INTERNAL_ONLY) { + status = info->obj_desc->method.implementation(walk_state); + info->return_object = walk_state->return_desc; + + /* Cleanup states */ + + acpi_ds_scope_stack_clear(walk_state); + acpi_ps_cleanup_scope(&walk_state->parser_state); + acpi_ds_terminate_control_method(walk_state->method_desc, + walk_state); + acpi_ds_delete_walk_state(walk_state); + goto cleanup; + } + /* Parse the AML */ status = acpi_ps_parse_aml(walk_state); |