Skip to content

Commit

Permalink
ACPICA: GPE detect optimization - ignore unused GPE registers
Browse files Browse the repository at this point in the history
This optimization will simply ignore GPE registers that contain
no enabled GPEs - there is no need to read the register.
ACPICA bugzilla 884.

http://www.acpica.org/bugzilla/show_bug.cgi?id=884

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Lin Ming authored and Len Brown committed Mar 3, 2011
1 parent dd9c154 commit 6dfad33
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/acpi/acpica/evgpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,15 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)

gpe_register_info = &gpe_block->register_info[i];

/*
* Optimization: If there are no GPEs enabled within this
* register, we can safely ignore the entire register.
*/
if (!(gpe_register_info->enable_for_run |
gpe_register_info->enable_for_wake)) {
continue;
}

/* Read the Status Register */

status =
Expand Down

0 comments on commit 6dfad33

Please sign in to comment.