lkml.org 
[lkml]   [2006]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] fix boot with acpi=off
On Mon, 10 Jul 2006 14:37:53 -0400
"Brown, Len" <len.brown@intel.com> wrote:

> Dunno why acpi_lock_ac_dir() makes pavel's box fail w/ acpi=off.

a) Because acpi_ac_init() forgot to check acpi_disabled, so
acpi_ac_init() calls acpi_lock_ac_dir() even with acpi=off.

b) Because acpi_lock_ac_dir() is doing down() on an uninitialised
semaphore, which hangs.

The fix to b) is in your tree now.

The fix for a) is below.



From: Pavel Machek <pavel@ucw.cz>

With acpi=off and acpi_ac/battery compiled into kernel, acpi breaks
boot. This fixes it.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

drivers/acpi/ac.c | 2 ++
drivers/acpi/battery.c | 3 +++
2 files changed, 5 insertions(+)

diff -puN drivers/acpi/ac.c~acpi-fix-boot-with-acpi=off drivers/acpi/ac.c
--- a/drivers/acpi/ac.c~acpi-fix-boot-with-acpi=off
+++ a/drivers/acpi/ac.c
@@ -285,6 +285,8 @@ static int __init acpi_ac_init(void)
{
int result;

+ if (acpi_disabled)
+ return -ENODEV;

acpi_ac_dir = acpi_lock_ac_dir();
if (!acpi_ac_dir)
diff -puN drivers/acpi/battery.c~acpi-fix-boot-with-acpi=off drivers/acpi/battery.c
--- a/drivers/acpi/battery.c~acpi-fix-boot-with-acpi=off
+++ a/drivers/acpi/battery.c
@@ -757,6 +757,9 @@ static int __init acpi_battery_init(void
{
int result;

+ if (acpi_disabled)
+ return -ENODEV;
+
acpi_battery_dir = acpi_lock_battery_dir();
if (!acpi_battery_dir)
return -ENODEV;
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-10 23:39    [W:0.046 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site