From: "Yu, Luming" <luming.yu@intel.com>
To: "Sanjoy Mahajan" <sanjoy@mrao.cam.ac.uk>, <linux-acpi@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, "Andrew Morton" <akpm@osdl.org>,
"Brown, Len" <len.brown@intel.com>
Subject: RE: 2.6.16-rc5: known regressions [TP 600X S3, vanilla DSDT]
Date: Wed, 5 Apr 2006 11:03:47 +0800 [thread overview]
Message-ID: <554C5F4C5BA7384EB2B412FD46A3BAD118FD44@pdsmsx411.ccr.corp.intel.com> (raw)
>diff -r ac486e270597 -r abd89292c539 drivers/acpi/osl.c
>--- a/drivers/acpi/osl.c Sat Mar 18 08:35:34 2006 -0500
>+++ b/drivers/acpi/osl.c Thu Mar 30 10:59:57 2006 -0500
>@@ -634,6 +634,8 @@ static void acpi_os_execute_deferred(voi
> return_VOID;
> }
>
>+extern int acpi_in_suspend;
>+
> acpi_status
> acpi_os_queue_for_execution(u32 priority,
> acpi_osd_exec_callback function,
>void *context)
>@@ -643,6 +645,8 @@ acpi_os_queue_for_execution(u32 priority
> struct work_struct *task;
>
> ACPI_FUNCTION_TRACE("os_queue_for_execution");
>+ if (acpi_in_suspend) /* in case kacpid is causing
>the queue */
>+ return_ACPI_STATUS(AE_OK);
The request will be dropped silently , So, it sounds ugly.
At least, you need to put some warning here.
The long-term solution is to fix the invoker to NOT ask
kacpid to invoke AML methods during suspend-resume period.
>
> ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
> "Scheduling function [%p(%p)] for
>deferred execution.\n",
>diff -r ac486e270597 -r abd89292c539 drivers/acpi/sleep/main.c
>--- a/drivers/acpi/sleep/main.c Sat Mar 18 08:35:34 2006 -0500
>+++ b/drivers/acpi/sleep/main.c Thu Mar 30 10:59:57 2006 -0500
>@@ -19,6 +19,12 @@
> #include <acpi/acpi_drivers.h>
> #include "sleep.h"
>
>+/* for functions putting machine to sleep to know that we're
>+ suspending, so that they can careful about what AML methods they
>+ invoke (to avoid trying untested BIOS code paths) */
>+int acpi_in_suspend;
>+EXPORT_SYMBOL(acpi_in_suspend);
>+
> u8 sleep_states[ACPI_S_STATE_COUNT];
>
> static struct pm_ops acpi_pm_ops;
>@@ -55,6 +61,8 @@ static int acpi_pm_prepare(suspend_state
> printk("acpi_pm_prepare does not support %d
>\n", pm_state);
> return -EPERM;
> }
>+ acpi_os_wait_events_complete(NULL);
>+ acpi_in_suspend = TRUE;
> return acpi_sleep_prepare(acpi_state);
There is race condition here.
Probably, it should be :
acpi_in_suspend = TURE;
acpi_os_wait_events_complete(NULL);
> }
>
>@@ -132,6 +140,7 @@ static int acpi_pm_finish(suspend_state_
> u32 acpi_state = acpi_suspend_states[pm_state];
>
> acpi_leave_sleep_state(acpi_state);
>+ acpi_in_suspend = FALSE;
> acpi_disable_wakeup_device(acpi_state);
>
> /* reset firmware waking vector */
>diff -r ac486e270597 -r abd89292c539 drivers/acpi/thermal.c
>--- a/drivers/acpi/thermal.c Sat Mar 18 08:35:34 2006 -0500
>+++ b/drivers/acpi/thermal.c Thu Mar 30 10:59:57 2006 -0500
>@@ -79,6 +79,8 @@ static int tzp;
> static int tzp;
> module_param(tzp, int, 0);
> MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in
>1/10 seconds.\n");
>+
>+extern int acpi_in_suspend;
>
> static int acpi_thermal_add(struct acpi_device *device);
> static int acpi_thermal_remove(struct acpi_device *device, int type);
>@@ -683,6 +685,8 @@ static void acpi_thermal_run(unsigned lo
> static void acpi_thermal_run(unsigned long data)
> {
> struct acpi_thermal *tz = (struct acpi_thermal *)data;
>+ if (acpi_in_suspend) /* thermal methods might cause a hang */
>+ return_VOID; /* so don't do them */
If you fixed kacpid, then this part could be removed.
> if (!tz->zombie)
> acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
> acpi_thermal_check,
>(void *)data);
>@@ -705,6 +709,8 @@ static void acpi_thermal_check(void *dat
>
> state = tz->state;
>
>+ if (acpi_in_suspend)
>+ return_VOID;
Could it cause trouble to caller?
> result = acpi_thermal_get_temperature(tz);
> if (result)
> return_VOID;
>@@ -1224,6 +1230,9 @@ static void acpi_thermal_notify(acpi_han
> struct acpi_device *device = NULL;
>
> ACPI_FUNCTION_TRACE("acpi_thermal_notify");
>+
>+ if (acpi_in_suspend) /* thermal methods might cause a hang */
>+ return_VOID; /* so don't do them */
Could it cause trouble to caller?
>
> if (!tz)
> return_VOID;
next reply other threads:[~2006-04-05 3:03 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-05 3:03 Yu, Luming [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-05-23 13:29 Yu, Luming
2006-05-23 17:12 ` Sanjoy Mahajan
2006-03-24 1:31 Yu, Luming
2006-04-04 6:49 ` Sanjoy Mahajan
2006-03-23 9:10 Yu, Luming
2006-03-23 19:19 ` Sanjoy Mahajan
2006-03-23 4:46 Yu, Luming
2006-03-23 6:25 ` Sanjoy Mahajan
2006-03-22 7:28 Yu, Luming
2006-03-22 14:16 ` Sanjoy Mahajan
2006-03-22 4:58 Yu, Luming
2006-03-22 5:13 ` Sanjoy Mahajan
2006-03-24 1:17 ` Sanjoy Mahajan
2006-03-22 1:34 Yu, Luming
2006-03-22 7:00 ` Sanjoy Mahajan
2006-03-22 1:30 Yu, Luming
2006-03-22 4:35 ` Sanjoy Mahajan
2006-03-22 7:15 ` Sanjoy Mahajan
2006-03-21 9:11 Yu, Luming
2006-03-21 20:37 ` Sanjoy Mahajan
2006-03-21 22:09 ` Sanjoy Mahajan
2006-03-21 1:38 Yu, Luming
2006-03-21 7:27 ` Sanjoy Mahajan
2006-03-21 8:47 ` Sanjoy Mahajan
2006-03-19 4:12 Yu, Luming
2006-03-19 14:33 ` Sanjoy Mahajan
2006-03-20 6:39 ` Sanjoy Mahajan
2006-03-18 17:08 Yu, Luming
2006-03-18 20:12 ` Sanjoy Mahajan
2006-03-18 16:37 Yu, Luming
2006-03-18 17:03 ` Sanjoy Mahajan
2006-03-18 15:58 Yu, Luming
2006-03-18 16:27 ` Sanjoy Mahajan
2006-03-18 15:10 Yu, Luming
2006-03-18 15:48 ` Sanjoy Mahajan
2006-03-18 13:24 Yu, Luming
2006-03-18 14:37 ` Sanjoy Mahajan
2006-03-18 2:02 Yu, Luming
2006-03-18 7:23 ` Sanjoy Mahajan
2006-03-17 7:50 Yu, Luming
2006-03-17 18:43 ` Sanjoy Mahajan
2006-03-17 6:57 Yu, Luming
2006-03-17 7:11 ` Sanjoy Mahajan
2006-03-17 7:32 ` Sanjoy Mahajan
2006-03-17 1:17 Yu, Luming
2006-03-17 6:28 ` Sanjoy Mahajan
2006-03-16 8:18 Yu, Luming
2006-03-16 15:15 ` Sanjoy Mahajan
2006-03-16 7:28 Yu, Luming
2006-03-16 7:57 ` Sanjoy Mahajan
2006-03-16 6:41 Yu, Luming
2006-03-16 6:54 ` Sanjoy Mahajan
2006-03-16 7:14 ` Sanjoy Mahajan
2006-03-15 8:02 Yu, Luming
2006-03-16 0:03 ` Sanjoy Mahajan
2006-03-16 5:47 ` Sanjoy Mahajan
2006-03-16 6:46 ` Sanjoy Mahajan
2006-03-15 6:47 Yu, Luming
2006-03-15 7:06 ` Sanjoy Mahajan
2006-03-15 6:25 Yu, Luming
2006-03-15 6:16 Yu, Luming
2006-03-15 6:35 ` Sanjoy Mahajan
2006-03-15 1:46 Yu, Luming
2006-03-15 5:40 ` Sanjoy Mahajan
2006-03-15 5:57 ` Sanjoy Mahajan
2006-03-14 1:48 Yu, Luming
2006-03-14 8:28 ` Sanjoy Mahajan
2006-03-13 8:35 Yu, Luming
2006-03-13 15:21 ` Sanjoy Mahajan
2006-03-13 4:51 Yu, Luming
2006-03-13 7:28 ` Sanjoy Mahajan
2006-03-13 2:00 Yu, Luming
2006-03-13 4:38 ` Sanjoy Mahajan
2006-03-10 6:46 Yu, Luming
2006-03-10 13:27 ` Sanjoy Mahajan
2006-03-10 13:36 ` Sanjoy Mahajan
2006-03-10 6:12 Yu, Luming
2006-03-10 6:27 ` Sanjoy Mahajan
2006-02-27 9:04 2.6.16-rc5: known regressions Yu, Luming
2006-03-10 5:26 ` 2.6.16-rc5: known regressions [TP 600X S3, vanilla DSDT] Sanjoy Mahajan
2006-05-19 13:44 ` Thomas Renninger
2006-05-21 0:12 ` Sanjoy Mahajan
2006-05-21 0:40 ` Carl-Daniel Hailfinger
2006-05-21 1:30 ` Joshua Hudson
2006-05-21 3:53 ` Lee Revell
2006-05-22 9:55 ` Pavel Machek
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=554C5F4C5BA7384EB2B412FD46A3BAD118FD44@pdsmsx411.ccr.corp.intel.com \
--to=luming.yu@intel.com \
--cc=akpm@osdl.org \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sanjoy@mrao.cam.ac.uk \
/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®