From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Lan Tianyu <tianyu.lan@intel.com>
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/2] ACPI/Wakup: Enable button wakeup GPEs if these GPEs have associated GPE methods.
Date: Wed, 09 Jul 2014 15:00:32 +0200 [thread overview]
Message-ID: <1566864.H9h1bMoShf@vostro.rjw.lan> (raw)
In-Reply-To: <53BCB23A.1070304@intel.com>
On Wednesday, July 09, 2014 11:08:42 AM Lan Tianyu wrote:
> On 2014年07月08日 21:26, Rafael J. Wysocki wrote:
> > On Tuesday, July 08, 2014 02:57:58 PM Lan Tianyu wrote:
> >> The button wakeup GPEs are enabled unconditionally in the current world by
> >> commit 2a5d24(ACPI / Wakeup: Enable button GPEs unconditionally during
> >> initialization). Because button's GPE methods needs to be run to clear
> >> GPE status on some machines when there is GPE interrupt. If not, it will
> >> cause machines resume immediately after being suspended since GPE status
> >> isn't cleared correctly.
> >>
> >> But if there is no GPE method for button wakeup GPE, these GPEs should not
> >> be enabled since nothing needs to be done when they are triggered and this
> >> also causes LID GPE storm on Lenovo Ideapad y560p.
> >>
> >> This patch is to check Button GPE method and enable it if there is associated
> >> GPE method.
> >
> > Part of the problem is that we call acpi_setup_gpe_for_wake() for buttons too
> > and it sets ACPI_GPE_DISPATCH_NOTIFY unconditionally.
>
> Yes, this is why the GPE wasn't disabled by CA. From my opinion,
> original reason of enabling button wakeup GPE in the runtime is that it
> may have associated GPE method and the method will notify button driver
> and clear some hardware status. But if it didn't have GPE method, I
> don't why we need to enable the GPE.
I think you're right, but "is there a handler method for that GPE present?"
is a bit too low-level question to ask from outside of ACPICA. We should be
asking "is there any kind of handling registered for it?" if anything, but in
my opinion the cleanest approach would be to modify acpi_enable_gpe() to
return an error code if there's no handler/method/notify for the GPE in
question.
The patch I attached to the BZ entry doesn't do that just yet, because I'm
wondering whether or not it will make the ACPICA's auto-disabling trigger. :-)
Rafael
next prev parent reply other threads:[~2014-07-09 12:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-08 6:57 [RFC PATCH 1/2] ACPICA: Add acpi_check_gpe_method() to check GPE method Lan Tianyu
2014-07-08 6:57 ` [RFC PATCH 2/2] ACPI/Wakup: Enable button wakeup GPEs if these GPEs have associated GPE methods Lan Tianyu
2014-07-08 13:26 ` Rafael J. Wysocki
2014-07-09 3:08 ` Lan Tianyu
2014-07-09 13:00 ` Rafael J. Wysocki [this message]
2014-07-08 13:19 ` [RFC PATCH 1/2] ACPICA: Add acpi_check_gpe_method() to check GPE method Rafael J. Wysocki
2014-07-10 19:32 ` Moore, Robert
2014-07-11 2:35 ` Lan Tianyu
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=1566864.H9h1bMoShf@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tianyu.lan@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
all inboxes | Powered by JetHome®