From 6dfad339645247c9deb553e4d68e21211ddc61bd Mon Sep 17 00:00:00 2001 From: Lin Ming Date: Mon, 14 Feb 2011 15:29:34 +0800 Subject: ACPICA: GPE detect optimization - ignore unused GPE registers 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 Signed-off-by: Bob Moore Signed-off-by: Len Brown diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c index 14988a8..67d44ef 100644 --- a/drivers/acpi/acpica/evgpe.c +++ b/drivers/acpi/acpica/evgpe.c @@ -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 = -- cgit v0.10.2