Re: [PATCH] ACPI: don't walk tables if ACPI was disabled

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Vegard Nossum <vegard.nossum@...>
Cc: Len Brown <lenb@...>, <linux-kernel@...>, <linux-acpi@...>, Zhao Yakui <yakui.zhao@...>, Rafael J. Wysocki <rjw@...>, Alexey Starikovskiy <astarikovskiy@...>, Yinghai Lu <yhlu.kernel@...>, Bjorn Helgaas <bjorn.helgaas@...>
Date: Tuesday, June 24, 2008 - 7:41 am

* Vegard Nossum <vegard.nossum@gmail.com> wrote:


wow, rather old bug - i guess lockdep made it more visible.


i havent seen the warning reappear with your fix after thousands of 
bootups - so i guess we can consider it fixed.

Len, please consider the patch below. (it's in tip/out-of-tree)

	Ingo

----------------->
commit acc85833791a5d8f84b8df601afc1cc44568dd18
Author: Vegard Nossum <vegard.nossum@gmail.com>
Date:   Fri Jun 20 15:56:40 2008 +0200

    ACPI: don't walk tables if ACPI was disabled
    
    Ingo Molnar wrote:
    > -tip auto-testing started triggering this spinlock corruption message
    > yesterday:
    >
    > [    3.976213] calling  acpi_rtc_init+0x0/0xd3
    > [    3.980213] ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread F7C50000 could not acquire Mutex [3] [20080321]
    > [    3.992213] BUG: spinlock bad magic on CPU#0, swapper/1
    > [    3.992213]  lock: c2508dc4, .magic: 00000000, .owner: swapper/1, .owner_cpu: 0
    
    This is apparently because some parts of ACPI, including mutexes, are not
    initialized when acpi=off is passed to the kernel.
    
    Reported-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
    Cc: Len Brown <lenb@kernel.org>
    Cc: Zhao Yakui <yakui.zhao@intel.com>
    Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
    Cc: Alexey Starikovskiy <astarikovskiy@suse.de>
    Cc: Yinghai Lu <yhlu.kernel@gmail.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index b4d4ce0..c3e1eeb 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -334,6 +334,9 @@ static int __init acpi_rtc_init(void)
 {
 	struct device *dev = get_rtc_dev();
 
+	if (acpi_disabled)
+		return 0;
+
 	if (dev) {
 		rtc_wake_setup();
 		rtc_info.wake_on = rtc_wake_on;
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
index a8d5491..c274d1d 100644
--- a/drivers/acpi/namespace/nsxfeval.c
+++ b/drivers/acpi/namespace/nsxfeval.c
@@ -391,6 +391,9 @@ acpi_walk_namespace(acpi_object_type type,
 
 	ACPI_FUNCTION_TRACE(acpi_walk_namespace);
 
+	if (acpi_disabled)
+		return_ACPI_STATUS(AE_NO_NAMESPACE);
+
 	/* Parameter validation */
 
 	if ((type > ACPI_TYPE_LOCAL_MAX) || (!max_depth) || (!user_function)) {
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] ACPI: don't walk tables if ACPI was disabled, Vegard Nossum, (Fri Jun 20, 9:56 am)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Vegard Nossum, (Fri Jun 20, 4:40 pm)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Vegard Nossum, (Fri Jun 20, 5:27 pm)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Vegard Nossum, (Sat Jun 21, 4:19 am)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Ingo Molnar, (Tue Jun 24, 7:41 am)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Vegard Nossum, (Tue Jun 24, 7:52 am)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Bjorn Helgaas, (Wed Jun 25, 11:08 am)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Bjorn Helgaas, (Thu Jun 26, 12:44 pm)
Re: [PATCH] ACPI: don't walk tables if ACPI was disabled, Bjorn Helgaas, (Tue Jun 24, 11:22 am)
Re: [PATCH] ACPI: add standard linux WARN() output to ACPI w..., Arjan van de Ven, (Tue Jun 24, 10:49 pm)