From: Andrew Morton <akpm@osdl.org>
To: "Brown, Len" <len.brown@intel.com>
Cc: vladimir.p.lebedev@intel.com, pavel@ucw.cz,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [patch] fix boot with acpi=off
Date: Mon, 10 Jul 2006 14:35:42 -0700 [thread overview]
Message-ID: <20060710143542.e1be4877.akpm@osdl.org> (raw)
In-Reply-To: <CFF307C98FEABE47A452B27C06B85BB6ED0026@hdsmsx411.amr.corp.intel.com>
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;
_
next prev parent reply other threads:[~2006-07-10 21:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 18:37 [patch] fix boot with acpi=off Brown, Len
2006-07-10 21:35 ` Andrew Morton [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-07-10 18:08 Lebedev, Vladimir P
2006-07-10 6:15 Brown, Len
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=20060710143542.e1be4877.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=vladimir.p.lebedev@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