aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events/evgpe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/events/evgpe.c')
-rw-r--r--drivers/acpi/events/evgpe.c39
1 files changed, 26 insertions, 13 deletions
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c
index aa179dc78011..23fe53ba7375 100644
--- a/drivers/acpi/events/evgpe.c
+++ b/drivers/acpi/events/evgpe.c
@@ -488,9 +488,9 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
488 * 488 *
489 * RETURN: None 489 * RETURN: None
490 * 490 *
491 * DESCRIPTION: Perform the actual execution of a GPE control method. This 491 * DESCRIPTION: Perform the actual execution of a GPE control method. This
492 * function is called from an invocation of acpi_os_exece 492 * function is called from an invocation of acpi_os_execute and
493 * (and therefore does NOT execute at interrupt level) so that 493 * therefore does NOT execute at interrupt level - so that
494 * the control method itself is not executed in the context of 494 * the control method itself is not executed in the context of
495 * an interrupt handler. 495 * an interrupt handler.
496 * 496 *
@@ -502,7 +502,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
502 u32 gpe_number = 0; 502 u32 gpe_number = 0;
503 acpi_status status; 503 acpi_status status;
504 struct acpi_gpe_event_info local_gpe_event_info; 504 struct acpi_gpe_event_info local_gpe_event_info;
505 struct acpi_parameter_info info; 505 struct acpi_evaluate_info *info;
506 506
507 ACPI_FUNCTION_TRACE(ev_asynch_execute_gpe_method); 507 ACPI_FUNCTION_TRACE(ev_asynch_execute_gpe_method);
508 508
@@ -540,16 +540,29 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
540 */ 540 */
541 if ((local_gpe_event_info.flags & ACPI_GPE_DISPATCH_MASK) == 541 if ((local_gpe_event_info.flags & ACPI_GPE_DISPATCH_MASK) ==
542 ACPI_GPE_DISPATCH_METHOD) { 542 ACPI_GPE_DISPATCH_METHOD) {
543 /*
544 * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx
545 * control method that corresponds to this GPE
546 */
547 info.node = local_gpe_event_info.dispatch.method_node;
548 info.parameters =
549 ACPI_CAST_PTR(union acpi_operand_object *, gpe_event_info);
550 info.parameter_type = ACPI_PARAM_GPE;
551 543
552 status = acpi_ns_evaluate_by_handle(&info); 544 /* Allocate the evaluation information block */
545
546 info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
547 if (!info) {
548 status = AE_NO_MEMORY;
549 } else {
550 /*
551 * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx
552 * control method that corresponds to this GPE
553 */
554 info->prefix_node =
555 local_gpe_event_info.dispatch.method_node;
556 info->parameters =
557 ACPI_CAST_PTR(union acpi_operand_object *,
558 gpe_event_info);
559 info->parameter_type = ACPI_PARAM_GPE;
560 info->flags = ACPI_IGNORE_RETURN_VALUE;
561
562 status = acpi_ns_evaluate(info);
563 ACPI_FREE(info);
564 }
565
553 if (ACPI_FAILURE(status)) { 566 if (ACPI_FAILURE(status)) {
554 ACPI_EXCEPTION((AE_INFO, status, 567 ACPI_EXCEPTION((AE_INFO, status,
555 "While evaluating method [%4.4s] for GPE[%2X]", 568 "While evaluating method [%4.4s] for GPE[%2X]",