From: Lin Ming <ming.m.lin@intel.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: lenb <lenb@kernel.org>, "Moore, Robert" <robert.moore@intel.com>,
linux-acpi <linux-acpi@vger.kernel.org>
Subject: [RFC PATCH] ACPICA: Improve GPE detect
Date: Wed, 15 Dec 2010 15:59:36 +0800 [thread overview]
Message-ID: <1292399976.10384.187.camel@minggr.sh.intel.com> (raw)
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 =
next reply other threads:[~2010-12-15 7:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-15 7:59 Lin Ming [this message]
2010-12-15 22:57 ` [RFC PATCH] ACPICA: Improve GPE detect 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1292399976.10384.187.camel@minggr.sh.intel.com \
--to=ming.m.lin@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=robert.moore@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox