Loading drivers/acpi/acpica/acevents.h +0 −4 Original line number Diff line number Diff line Loading @@ -80,10 +80,6 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list); acpi_status acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info); acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info); acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info); struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, u32 gpe_number); Loading drivers/acpi/acpica/achware.h +5 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,11 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width); /* * hwgpe - GPE support */ acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info); u32 acpi_hw_gpe_register_bit(struct acpi_gpe_event_info *gpe_event_info, struct acpi_gpe_register_info *gpe_register_info); acpi_status acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u8 action); acpi_status acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_info); Loading drivers/acpi/acpica/evgpe.c +5 −110 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ acpi_status acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info) { struct acpi_gpe_register_info *gpe_register_info; u8 register_bit; u32 register_bit; ACPI_FUNCTION_TRACE(ev_update_gpe_enable_masks); Loading @@ -78,9 +78,8 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info) return_ACPI_STATUS(AE_NOT_EXIST); } register_bit = (u8) (1 << (gpe_event_info->gpe_number - gpe_register_info->base_gpe_number)); register_bit = acpi_hw_gpe_register_bit(gpe_event_info, gpe_register_info); /* Clear the wake/run bits up front */ Loading @@ -100,106 +99,6 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info) return_ACPI_STATUS(AE_OK); } /******************************************************************************* * * FUNCTION: acpi_ev_enable_gpe * * PARAMETERS: gpe_event_info - GPE to enable * * RETURN: Status * * DESCRIPTION: Hardware-enable a GPE. Always enables the GPE, regardless * of type or number of references. * * Note: The GPE lock should be already acquired when this function is called. * ******************************************************************************/ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) { acpi_status status; ACPI_FUNCTION_TRACE(ev_enable_gpe); /* * We will only allow a GPE to be enabled if it has either an * associated method (_Lxx/_Exx) or a handler. Otherwise, the * GPE will be immediately disabled by acpi_ev_gpe_dispatch the * first time it fires. */ if (!(gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK)) { return_ACPI_STATUS(AE_NO_HANDLER); } /* Ensure the HW enable masks are current */ status = acpi_ev_update_gpe_enable_masks(gpe_event_info); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* Clear the GPE (of stale events) */ status = acpi_hw_clear_gpe(gpe_event_info); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* Enable the requested GPE */ status = acpi_hw_write_gpe_enable_reg(gpe_event_info); return_ACPI_STATUS(status); } /******************************************************************************* * * FUNCTION: acpi_ev_disable_gpe * * PARAMETERS: gpe_event_info - GPE to disable * * RETURN: Status * * DESCRIPTION: Hardware-disable a GPE. Always disables the requested GPE, * regardless of the type or number of references. * * Note: The GPE lock should be already acquired when this function is called. * ******************************************************************************/ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) { acpi_status status; ACPI_FUNCTION_TRACE(ev_disable_gpe); /* * Note: Always disable the GPE, even if we think that that it is already * disabled. It is possible that the AML or some other code has enabled * the GPE behind our back. */ /* Ensure the HW enable masks are current */ status = acpi_ev_update_gpe_enable_masks(gpe_event_info); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* * Always H/W disable this GPE, even if we don't know the GPE type. * Simply clear the enable bit for this particular GPE, but do not * write out the current GPE enable mask since this may inadvertently * enable GPEs too early. An example is a rogue GPE that has arrived * during ACPICA initialization - possibly because AML or other code * has enabled the GPE. */ status = acpi_hw_low_disable_gpe(gpe_event_info); return_ACPI_STATUS(status); } /******************************************************************************* * Loading Loading @@ -451,10 +350,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) return_VOID; } /* Update the GPE register masks for return to enabled state */ (void)acpi_ev_update_gpe_enable_masks(gpe_event_info); /* * Take a snapshot of the GPE info for this level - we copy the info to * prevent a race condition with remove_handler/remove_block. Loading Loading @@ -607,7 +502,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) * Disable the GPE, so it doesn't keep firing before the method has a * chance to run (it runs asynchronously with interrupts enabled). */ status = acpi_ev_disable_gpe(gpe_event_info); status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_DISABLE); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Unable to disable GPE[0x%2X]", Loading Loading @@ -644,7 +539,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) * Disable the GPE. The GPE will remain disabled a handler * is installed or ACPICA is restarted. */ status = acpi_ev_disable_gpe(gpe_event_info); status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_DISABLE); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Unable to disable GPE[0x%2X]", Loading drivers/acpi/acpica/evgpeblk.c +13 −1 Original line number Diff line number Diff line Loading @@ -500,6 +500,19 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, gpe_index = (i * ACPI_GPE_REGISTER_WIDTH) + j; gpe_event_info = &gpe_block->event_info[gpe_index]; gpe_number = gpe_index + gpe_block->block_base_number; /* * If the GPE has already been enabled for runtime * signaling, make sure it remains enabled, but do not * increment its reference counter. */ if (gpe_event_info->runtime_count) { acpi_set_gpe(gpe_device, gpe_number, ACPI_GPE_ENABLE); gpe_enabled_count++; continue; } if (gpe_event_info->flags & ACPI_GPE_CAN_WAKE) { wake_gpe_count++; Loading @@ -516,7 +529,6 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, /* Enable this GPE */ gpe_number = gpe_index + gpe_block->block_base_number; status = acpi_enable_gpe(gpe_device, gpe_number, ACPI_GPE_TYPE_RUNTIME); if (ACPI_FAILURE(status)) { Loading drivers/acpi/acpica/evxface.c +0 −7 Original line number Diff line number Diff line Loading @@ -719,13 +719,6 @@ acpi_install_gpe_handler(acpi_handle gpe_device, handler->context = context; handler->method_node = gpe_event_info->dispatch.method_node; /* Disable the GPE before installing the handler */ status = acpi_ev_disable_gpe(gpe_event_info); if (ACPI_FAILURE (status)) { goto unlock_and_exit; } /* Install the handler */ flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); Loading Loading
drivers/acpi/acpica/acevents.h +0 −4 Original line number Diff line number Diff line Loading @@ -80,10 +80,6 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list); acpi_status acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info); acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info); acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info); struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, u32 gpe_number); Loading
drivers/acpi/acpica/achware.h +5 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,11 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width); /* * hwgpe - GPE support */ acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info); u32 acpi_hw_gpe_register_bit(struct acpi_gpe_event_info *gpe_event_info, struct acpi_gpe_register_info *gpe_register_info); acpi_status acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u8 action); acpi_status acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_info); Loading
drivers/acpi/acpica/evgpe.c +5 −110 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ acpi_status acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info) { struct acpi_gpe_register_info *gpe_register_info; u8 register_bit; u32 register_bit; ACPI_FUNCTION_TRACE(ev_update_gpe_enable_masks); Loading @@ -78,9 +78,8 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info) return_ACPI_STATUS(AE_NOT_EXIST); } register_bit = (u8) (1 << (gpe_event_info->gpe_number - gpe_register_info->base_gpe_number)); register_bit = acpi_hw_gpe_register_bit(gpe_event_info, gpe_register_info); /* Clear the wake/run bits up front */ Loading @@ -100,106 +99,6 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info) return_ACPI_STATUS(AE_OK); } /******************************************************************************* * * FUNCTION: acpi_ev_enable_gpe * * PARAMETERS: gpe_event_info - GPE to enable * * RETURN: Status * * DESCRIPTION: Hardware-enable a GPE. Always enables the GPE, regardless * of type or number of references. * * Note: The GPE lock should be already acquired when this function is called. * ******************************************************************************/ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) { acpi_status status; ACPI_FUNCTION_TRACE(ev_enable_gpe); /* * We will only allow a GPE to be enabled if it has either an * associated method (_Lxx/_Exx) or a handler. Otherwise, the * GPE will be immediately disabled by acpi_ev_gpe_dispatch the * first time it fires. */ if (!(gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK)) { return_ACPI_STATUS(AE_NO_HANDLER); } /* Ensure the HW enable masks are current */ status = acpi_ev_update_gpe_enable_masks(gpe_event_info); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* Clear the GPE (of stale events) */ status = acpi_hw_clear_gpe(gpe_event_info); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* Enable the requested GPE */ status = acpi_hw_write_gpe_enable_reg(gpe_event_info); return_ACPI_STATUS(status); } /******************************************************************************* * * FUNCTION: acpi_ev_disable_gpe * * PARAMETERS: gpe_event_info - GPE to disable * * RETURN: Status * * DESCRIPTION: Hardware-disable a GPE. Always disables the requested GPE, * regardless of the type or number of references. * * Note: The GPE lock should be already acquired when this function is called. * ******************************************************************************/ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) { acpi_status status; ACPI_FUNCTION_TRACE(ev_disable_gpe); /* * Note: Always disable the GPE, even if we think that that it is already * disabled. It is possible that the AML or some other code has enabled * the GPE behind our back. */ /* Ensure the HW enable masks are current */ status = acpi_ev_update_gpe_enable_masks(gpe_event_info); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* * Always H/W disable this GPE, even if we don't know the GPE type. * Simply clear the enable bit for this particular GPE, but do not * write out the current GPE enable mask since this may inadvertently * enable GPEs too early. An example is a rogue GPE that has arrived * during ACPICA initialization - possibly because AML or other code * has enabled the GPE. */ status = acpi_hw_low_disable_gpe(gpe_event_info); return_ACPI_STATUS(status); } /******************************************************************************* * Loading Loading @@ -451,10 +350,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context) return_VOID; } /* Update the GPE register masks for return to enabled state */ (void)acpi_ev_update_gpe_enable_masks(gpe_event_info); /* * Take a snapshot of the GPE info for this level - we copy the info to * prevent a race condition with remove_handler/remove_block. Loading Loading @@ -607,7 +502,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) * Disable the GPE, so it doesn't keep firing before the method has a * chance to run (it runs asynchronously with interrupts enabled). */ status = acpi_ev_disable_gpe(gpe_event_info); status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_DISABLE); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Unable to disable GPE[0x%2X]", Loading Loading @@ -644,7 +539,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) * Disable the GPE. The GPE will remain disabled a handler * is installed or ACPICA is restarted. */ status = acpi_ev_disable_gpe(gpe_event_info); status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_DISABLE); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Unable to disable GPE[0x%2X]", Loading
drivers/acpi/acpica/evgpeblk.c +13 −1 Original line number Diff line number Diff line Loading @@ -500,6 +500,19 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, gpe_index = (i * ACPI_GPE_REGISTER_WIDTH) + j; gpe_event_info = &gpe_block->event_info[gpe_index]; gpe_number = gpe_index + gpe_block->block_base_number; /* * If the GPE has already been enabled for runtime * signaling, make sure it remains enabled, but do not * increment its reference counter. */ if (gpe_event_info->runtime_count) { acpi_set_gpe(gpe_device, gpe_number, ACPI_GPE_ENABLE); gpe_enabled_count++; continue; } if (gpe_event_info->flags & ACPI_GPE_CAN_WAKE) { wake_gpe_count++; Loading @@ -516,7 +529,6 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, /* Enable this GPE */ gpe_number = gpe_index + gpe_block->block_base_number; status = acpi_enable_gpe(gpe_device, gpe_number, ACPI_GPE_TYPE_RUNTIME); if (ACPI_FAILURE(status)) { Loading
drivers/acpi/acpica/evxface.c +0 −7 Original line number Diff line number Diff line Loading @@ -719,13 +719,6 @@ acpi_install_gpe_handler(acpi_handle gpe_device, handler->context = context; handler->method_node = gpe_event_info->dispatch.method_node; /* Disable the GPE before installing the handler */ status = acpi_ev_disable_gpe(gpe_event_info); if (ACPI_FAILURE (status)) { goto unlock_and_exit; } /* Install the handler */ flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); Loading