]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ACPICA: Fix for hang on GPE method invocation
authorBob Moore <robert.moore@intel.com>
Tue, 10 Jun 2008 04:38:10 +0000 (12:38 +0800)
committerAndi Kleen <andi@basil.nowhere.org>
Wed, 16 Jul 2008 21:27:03 +0000 (23:27 +0200)
Fixes problem where the new method argument count validation mechanism
will enter an infinite loop when a GPE method is dispatched.
Problem fixed be removing the obsolete code that passes GPE block
information to the notify handler via the control method parameter pointer.

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>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/acpi/dispatcher/dsmethod.c
drivers/acpi/dispatcher/dswstate.c
drivers/acpi/events/evgpe.c
drivers/acpi/events/evregion.c
drivers/acpi/namespace/nsinit.c
drivers/acpi/namespace/nsxfeval.c
drivers/acpi/parser/psxface.c
drivers/acpi/resources/rsutils.c
drivers/acpi/utilities/uteval.c
include/acpi/acstruct.h

index 2509809a36cf3bb4ac269bb2b09c80fb869a1454..4613b9ca57929f5c4ba867c6f8aa496a887d3dbe 100644 (file)
@@ -377,7 +377,6 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
        }
 
        info->parameters = &this_walk_state->operands[0];
-       info->parameter_type = ACPI_PARAM_ARGS;
 
        status = acpi_ds_init_aml_walk(next_walk_state, NULL, method_node,
                                       obj_desc->method.aml_start,
index 1386ced332ecedcacdd0a7c3d61fdcf89f409b20..bda23ed60645d758bb00f0255038a879ebb56183 100644 (file)
@@ -615,14 +615,8 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state,
        walk_state->pass_number = pass_number;
 
        if (info) {
-               if (info->parameter_type == ACPI_PARAM_GPE) {
-                       walk_state->gpe_event_info =
-                           ACPI_CAST_PTR(struct acpi_gpe_event_info,
-                                         info->parameters);
-               } else {
-                       walk_state->params = info->parameters;
-                       walk_state->caller_return_desc = &info->return_object;
-               }
+               walk_state->params = info->parameters;
+               walk_state->caller_return_desc = &info->return_object;
        }
 
        status = acpi_ps_init_scope(&walk_state->parser_state, op);
index e0339d4139a4e44de3d727558754d61c5af49555..ca356e5ae2c3f73e3b2c5b9853d262a2024b3702 100644 (file)
@@ -565,10 +565,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
                         */
                        info->prefix_node =
                            local_gpe_event_info.dispatch.method_node;
-                       info->parameters =
-                           ACPI_CAST_PTR(union acpi_operand_object *,
-                                         gpe_event_info);
-                       info->parameter_type = ACPI_PARAM_GPE;
                        info->flags = ACPI_IGNORE_RETURN_VALUE;
 
                        status = acpi_ns_evaluate(info);
index 1628f59347524c9bbf49bc800581b93a224fb5c2..5ab4c01417dfb10fd346b7f143599755a83623c4 100644 (file)
@@ -219,7 +219,6 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
        info->prefix_node = region_obj2->extra.method_REG;
        info->pathname = NULL;
        info->parameters = args;
-       info->parameter_type = ACPI_PARAM_ARGS;
        info->flags = ACPI_IGNORE_RETURN_VALUE;
 
        /*
index 6d6d930c8e1820d21d0bc40441065dddf9ba0ef9..e4c57510d798753cd8366f4a2fbbaecb4d545450 100644 (file)
@@ -542,7 +542,6 @@ acpi_ns_init_one_device(acpi_handle obj_handle,
        info->prefix_node = device_node;
        info->pathname = METHOD_NAME__INI;
        info->parameters = NULL;
-       info->parameter_type = ACPI_PARAM_ARGS;
        info->flags = ACPI_IGNORE_RETURN_VALUE;
 
        /*
index a8d549187c84262d5ae7ca9bd34ceee6d4a358dd..b4e135eab7c7c49b16eed0cc1529d92d7f7943e7 100644 (file)
@@ -182,7 +182,6 @@ acpi_evaluate_object(acpi_handle handle,
        }
 
        info->pathname = pathname;
-       info->parameter_type = ACPI_PARAM_ARGS;
 
        /* Convert and validate the device handle */
 
index 52581454c47c3a21ca071df64818d19f173f25f0..5ee09e1245e3b3fa37bf02840bdd6a42fdfd993a 100644 (file)
@@ -335,7 +335,7 @@ acpi_ps_update_parameter_list(struct acpi_evaluate_info *info, u16 action)
 {
        acpi_native_uint i;
 
-       if ((info->parameter_type == ACPI_PARAM_ARGS) && (info->parameters)) {
+       if (info->parameters) {
 
                /* Update reference count for each parameter */
 
index befe2302f41b31b622dec454924a68ab5b847dd7..90ed83d05375a078cfae330e9ffe2173144bbb51 100644 (file)
@@ -679,7 +679,6 @@ acpi_rs_set_srs_method_data(struct acpi_namespace_node *node,
        info->prefix_node = node;
        info->pathname = METHOD_NAME__SRS;
        info->parameters = args;
-       info->parameter_type = ACPI_PARAM_ARGS;
        info->flags = ACPI_IGNORE_RETURN_VALUE;
 
        /*
index 05e61be267d5b09450f9299f4a1e1e73c91c62f5..7f1f6341242d89fc3cbbdebde8a33d5a717008f2 100644 (file)
@@ -217,7 +217,6 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
 
        info->prefix_node = prefix_node;
        info->pathname = path;
-       info->parameter_type = ACPI_PARAM_ARGS;
 
        /* Evaluate the object/method */
 
index 1cc74504f1c4885212455f0f7b784a2d15c8a104..818c24d7d2d12ef681ddbb54607c38cc8a9f5899 100644 (file)
@@ -108,7 +108,6 @@ struct acpi_walk_state {
        union acpi_operand_object **caller_return_desc;
        union acpi_generic_state *control_state;        /* List of control states (nested IFs) */
        struct acpi_namespace_node *deferred_node;      /* Used when executing deferred opcodes */
-       struct acpi_gpe_event_info *gpe_event_info;     /* Info for GPE (_Lxx/_Exx methods only */
        union acpi_operand_object *implicit_return_obj;
        struct acpi_namespace_node *method_call_node;   /* Called method Node */
        union acpi_parse_object *method_call_op;        /* method_call Op if running a method */
@@ -191,16 +190,10 @@ struct acpi_evaluate_info {
        union acpi_operand_object *return_object;
        u8 param_count;
        u8 pass_number;
-       u8 parameter_type;
        u8 return_object_type;
        u8 flags;
 };
 
-/* Types for parameter_type above */
-
-#define ACPI_PARAM_ARGS                 0
-#define ACPI_PARAM_GPE                  1
-
 /* Values for Flags above */
 
 #define ACPI_IGNORE_RETURN_VALUE        1