diff options
Diffstat (limited to 'drivers/acpi/events')
-rw-r--r-- | drivers/acpi/events/evgpe.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c index 4bd9e2291bd9..0dadd2adc800 100644 --- a/drivers/acpi/events/evgpe.c +++ b/drivers/acpi/events/evgpe.c | |||
@@ -270,18 +270,18 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
270 | case ACPI_GPE_TYPE_WAKE_RUN: | 270 | case ACPI_GPE_TYPE_WAKE_RUN: |
271 | ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_WAKE_ENABLED); | 271 | ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_WAKE_ENABLED); |
272 | 272 | ||
273 | /*lint -fallthrough */ | 273 | /* fallthrough */ |
274 | 274 | ||
275 | case ACPI_GPE_TYPE_RUNTIME: | 275 | case ACPI_GPE_TYPE_RUNTIME: |
276 | 276 | ||
277 | /* Disable the requested runtime GPE */ | 277 | /* Disable the requested runtime GPE */ |
278 | 278 | ||
279 | ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED); | 279 | ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED); |
280 | status = acpi_hw_write_gpe_enable_reg(gpe_event_info); | 280 | |
281 | break; | 281 | /* fallthrough */ |
282 | 282 | ||
283 | default: | 283 | default: |
284 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 284 | acpi_hw_write_gpe_enable_reg(gpe_event_info); |
285 | } | 285 | } |
286 | 286 | ||
287 | return_ACPI_STATUS(AE_OK); | 287 | return_ACPI_STATUS(AE_OK); |
@@ -501,6 +501,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) | |||
501 | * an interrupt handler. | 501 | * an interrupt handler. |
502 | * | 502 | * |
503 | ******************************************************************************/ | 503 | ******************************************************************************/ |
504 | static void acpi_ev_asynch_enable_gpe(void *context); | ||
504 | 505 | ||
505 | static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) | 506 | static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) |
506 | { | 507 | { |
@@ -576,22 +577,30 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) | |||
576 | method_node))); | 577 | method_node))); |
577 | } | 578 | } |
578 | } | 579 | } |
580 | /* Defer enabling of GPE until all notify handlers are done */ | ||
581 | acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_ev_asynch_enable_gpe, | ||
582 | gpe_event_info); | ||
583 | return_VOID; | ||
584 | } | ||
579 | 585 | ||
580 | if ((local_gpe_event_info.flags & ACPI_GPE_XRUPT_TYPE_MASK) == | 586 | static void acpi_ev_asynch_enable_gpe(void *context) |
587 | { | ||
588 | struct acpi_gpe_event_info *gpe_event_info = context; | ||
589 | acpi_status status; | ||
590 | if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) == | ||
581 | ACPI_GPE_LEVEL_TRIGGERED) { | 591 | ACPI_GPE_LEVEL_TRIGGERED) { |
582 | /* | 592 | /* |
583 | * GPE is level-triggered, we clear the GPE status bit after | 593 | * GPE is level-triggered, we clear the GPE status bit after |
584 | * handling the event. | 594 | * handling the event. |
585 | */ | 595 | */ |
586 | status = acpi_hw_clear_gpe(&local_gpe_event_info); | 596 | status = acpi_hw_clear_gpe(gpe_event_info); |
587 | if (ACPI_FAILURE(status)) { | 597 | if (ACPI_FAILURE(status)) { |
588 | return_VOID; | 598 | return_VOID; |
589 | } | 599 | } |
590 | } | 600 | } |
591 | 601 | ||
592 | /* Enable this GPE */ | 602 | /* Enable this GPE */ |
593 | 603 | (void)acpi_hw_write_gpe_enable_reg(gpe_event_info); | |
594 | (void)acpi_hw_write_gpe_enable_reg(&local_gpe_event_info); | ||
595 | return_VOID; | 604 | return_VOID; |
596 | } | 605 | } |
597 | 606 | ||