All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Shaohua Li <shaohua.li@intel.com>
Cc: linux acpi <linux-acpi@vger.kernel.org>,
	Len Brown <lenb@kernel.org>,
	"robert.moore" <robert.moore@intel.com>
Subject: Re: [RFC] clear GPE earily in resume
Date: Wed, 20 Jun 2007 00:06:32 +0200	[thread overview]
Message-ID: <200706200006.35413.rjw@sisk.pl> (raw)
In-Reply-To: <1181785011.19274.6.camel@sli10-conroe.sh.intel.com>

On Thursday, 14 June 2007 03:36, Shaohua Li wrote:
> Wakeup GPE hasn't a handler. If system is waked up by such GPE like a
> USB hotplug, I saw a lot of error reporting the GPE hasn't handler.
> acpi_leave_sleep_state will clear the GPE but it's too late, we should
> doe it before interrupt is re-enabled. 
> 
> Maybe we should just clear wakeup GPE here, but clear all GPEs sounds
> not harmful in my test. Not sure other systems.

I think that the clearing all of the GPEs is the right thing to do here.

> Index: 2.6.22-rc/drivers/acpi/sleep/main.c
> ===================================================================
> --- 2.6.22-rc.orig/drivers/acpi/sleep/main.c	2007-06-11 15:31:03.000000000 +0800
> +++ 2.6.22-rc/drivers/acpi/sleep/main.c	2007-06-14 09:31:54.000000000 +0800
> @@ -104,6 +104,8 @@
>  	if (ACPI_SUCCESS(status) && (acpi_state == ACPI_STATE_S3))
>  		acpi_clear_event(ACPI_EVENT_POWER_BUTTON);
>  

I'd add a comment saying why we're clearing the GPEs at this point.

> +	acpi_hw_disable_all_gpes();
> +
>  	local_irq_restore(flags);
>  	printk(KERN_DEBUG "Back to C!\n");
>  
> -

Greetings,
Rafael


-- 
"Premature optimization is the root of all evil." - Donald Knuth

  reply	other threads:[~2007-06-19 21:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14  1:36 [RFC] clear GPE earily in resume Shaohua Li
2007-06-19 22:06 ` Rafael J. Wysocki [this message]
2007-06-20  1:17   ` Shaohua Li
2007-06-20 11:35     ` Rafael J. Wysocki
2007-12-13 22:26       ` Len Brown

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=200706200006.35413.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=robert.moore@intel.com \
    --cc=shaohua.li@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.