public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] ACPICA: Improve GPE detect
@ 2010-12-15  7:59 Lin Ming
  2010-12-15 22:57 ` Moore, Robert
  0 siblings, 1 reply; 5+ messages in thread
From: Lin Ming @ 2010-12-15  7:59 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: lenb, Moore, Robert, linux-acpi

Hi, Rafael

Currently, the ACPICA GPE interrupt handler reads all the GPE registers to
detect which GPEs, if any, have fired. This is done on each and every SCI,
since there is no way to know up front if any GPEs have been raised.

However, since ACPICA internally keeps a GPE enable mask for every GPE
register, it may be possible to ignore any GPE registers whose internal
GPE enable mask is zero. This would eliminate reading the status and enable
registers for that particular GPE register pair.

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

I have tested suspend/resume and it works OK.
What do you think about below simple patch?

Thanks.
---
 drivers/acpi/acpica/evgpe.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index 7c339d3..49fab43 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -373,6 +373,14 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
 
 			gpe_register_info = &gpe_block->register_info[i];
 
+			if (!gpe_register_info->enable_for_run &&
+				!gpe_register_info->enable_for_wake) {
+
+				/* Disabled for both "runtime" and "wakeup", move on */
+
+				continue;
+			}
+
 			/* Read the Status Register */
 
 			status =



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-17 22:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-15  7:59 [RFC PATCH] ACPICA: Improve GPE detect Lin Ming
2010-12-15 22:57 ` Moore, Robert
2010-12-17 20:23   ` Rafael J. Wysocki
2010-12-17 20:48     ` Moore, Robert
2010-12-17 22:25       ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox