From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Moore, Robert" <robert.moore@intel.com>
Cc: "Lin, Ming M" <ming.m.lin@intel.com>, lenb <lenb@kernel.org>,
linux-acpi <linux-acpi@vger.kernel.org>
Subject: Re: [RFC PATCH] ACPICA: Improve GPE detect
Date: Fri, 17 Dec 2010 21:23:13 +0100 [thread overview]
Message-ID: <201012172123.13502.rjw@sisk.pl> (raw)
In-Reply-To: <4911F71203A09E4D9981D27F9D830858BF9AB116@orsmsx503.amr.corp.intel.com>
On Wednesday, December 15, 2010, Moore, Robert wrote:
> + if (!gpe_register_info->enable_for_run &&
> + !gpe_register_info->enable_for_wake) {
>
> I would bitwise OR them together first
>
> + if (!(gpe_register_info->enable_for_run |
> + gpe_register_info->enable_for_wake)) {
Well, I think a || would be a little better (they are treated as flags rather
than bit patterns everywhere else), but I generally agree.
The patch looks good apart from this.
Thanks,
Rafael
> -----Original Message-----
> From: Lin, Ming M
> Sent: Wednesday, December 15, 2010 12:00 AM
> To: Rafael J. Wysocki
> Cc: lenb; Moore, Robert; linux-acpi
> Subject: [RFC PATCH] ACPICA: Improve GPE detect
>
> 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 prev parent reply other threads:[~2010-12-17 20:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=201012172123.13502.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--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