* [PATCH] Subject: Add constraints on usage of ACPI Sleep function
@ 2010-05-06 17:30 Alexey Starikovskiy
0 siblings, 0 replies; 2+ messages in thread
From: Alexey Starikovskiy @ 2010-05-06 17:30 UTC (permalink / raw)
To: Len Brown; +Cc: Linux-acpi
Panasonic Toughbook CF-52 may use uninitialized variable as argument
to Sleep(), thus stopping init sequence for about 45 days (0xf0000def ms).
Add constraints to not sleep that long, and also to not sleep during init.
References: http://bugzilla.novell.com/show_bug.cgi?id=557710
http://bugzilla.kernel.org/show_bug.cgi?id=13195
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
drivers/acpi/osl.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 7594f65..7a58dc5 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -438,7 +438,14 @@ acpi_status acpi_os_remove_interrupt_handler(u32 irq, acpi_osd_handler handler)
void acpi_os_sleep(u64 ms)
{
- schedule_timeout_interruptible(msecs_to_jiffies(ms));
+ if (ms > 1000) {
+ printk(KERN_WARNING "ACPI: Limit long sleep to 1 second\n");
+ ms = 1000;
+ }
+ if (system_state == SYSTEM_RUNNING)
+ schedule_timeout_interruptible(msecs_to_jiffies(ms));
+ else
+ acpi_os_stall(ms * 1000);
}
void acpi_os_stall(u32 us)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] Subject: Add constraints on usage of ACPI Sleep function
@ 2010-05-06 17:31 Alexey Starikovskiy
0 siblings, 0 replies; 2+ messages in thread
From: Alexey Starikovskiy @ 2010-05-06 17:31 UTC (permalink / raw)
To: Len Brown; +Cc: Linux-acpi
Panasonic Toughbook CF-52 may use uninitialized variable as argument
to Sleep(), thus stopping init sequence for about 45 days (0xf0000def ms).
Add constraints to not sleep that long, and also to not sleep during init.
References: http://bugzilla.novell.com/show_bug.cgi?id=557710
http://bugzilla.kernel.org/show_bug.cgi?id=13195
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---
drivers/acpi/osl.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 7594f65..b3451a0 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -438,7 +438,15 @@ acpi_status acpi_os_remove_interrupt_handler(u32 irq, acpi_osd_handler handler)
void acpi_os_sleep(u64 ms)
{
- schedule_timeout_interruptible(msecs_to_jiffies(ms));
+ if (ms > 1000) {
+ printk(KERN_WARNING FW_BUG
+ "ACPI: Limit %lld sleep to 1 second\n", ms);
+ ms = 1000;
+ }
+ if (system_state == SYSTEM_RUNNING)
+ schedule_timeout_interruptible(msecs_to_jiffies(ms));
+ else
+ acpi_os_stall(ms * 1000);
}
void acpi_os_stall(u32 us)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-06 17:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 17:31 [PATCH] Subject: Add constraints on usage of ACPI Sleep function Alexey Starikovskiy
-- strict thread matches above, loose matches on Subject: below --
2010-05-06 17:30 Alexey Starikovskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).