Skip to contentSkip to conversation

ACPI related hangup during boot, 2.6.6 worked ok, 2.6.7-rc2 freezes

PATCH Pozsar Balazs 2 participants 2 messages Jun 3, 2004 – Jun 4, 2004 ACPI

lore
Share & tools
lore
#0 lore raw

Hi!

On an Intel D865GRH motherboard kernel 2.6.6 works fine, but 2.6.7-rc2 (vanilla, -mm1 and -mm2 too) freezes during boot if acpi is enabled. (using acpi=off, it boots and works)

I could not gather any useable call trace or other debug information.

I could though find the diff which causes the trouble, to revert 2.6.7-rc2 to a working version, I have to apply:

drivers/acpi/acpi_ksyms.c +1 -1
diff -Naurd linux-bad/drivers/acpi/acpi_ksyms.c linux-good/drivers/acpi/acpi_ksyms.c
@@ -106,7 +106,7 @@
 EXPORT_SYMBOL(acpi_os_create_semaphore);
 EXPORT_SYMBOL(acpi_os_delete_semaphore);
 EXPORT_SYMBOL(acpi_os_wait_semaphore);
-EXPORT_SYMBOL(acpi_os_wait_events_complete);
+
 EXPORT_SYMBOL(acpi_os_read_pci_configuration);
 
 /* ACPI Utilities (acpi_utils.c) */
drivers/acpi/events/evxface.c +0 -27
diff -Naurd linux-bad/drivers/acpi/events/evxface.c linux-good/drivers/acpi/events/evxface.c
@@ -406,15 +406,6 @@
 			goto unlock_and_exit;
 		}
 
-		/* Make sure all deferred tasks are completed */
-
-		(void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
-		acpi_os_wait_events_complete(NULL);
-		status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE);
-		if (ACPI_FAILURE (status)) {
-			return_ACPI_STATUS (status);
- 		}
-
 		if (handler_type == ACPI_SYSTEM_NOTIFY) {
 			acpi_gbl_system_notify.node  = NULL;
 			acpi_gbl_system_notify.handler = NULL;
@@ -461,15 +452,6 @@
 			goto unlock_and_exit;
 		}
 
-		/* Make sure all deferred tasks are completed */
-
-		(void) acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
-		acpi_os_wait_events_complete(NULL);
-		status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE);
-		if (ACPI_FAILURE (status)) {
-			return_ACPI_STATUS (status);
- 		}
-
 		/* Remove the handler */
 
 		if (handler_type == ACPI_SYSTEM_NOTIFY) {
@@ -632,15 +614,6 @@
 		goto unlock_and_exit;
 	}
 
-	/* Make sure all deferred tasks are completed */
-
-	(void) acpi_ut_release_mutex (ACPI_MTX_EVENTS);
-	acpi_os_wait_events_complete(NULL);
-	status = acpi_ut_acquire_mutex (ACPI_MTX_EVENTS);
-	if (ACPI_FAILURE (status)) {
-		return_ACPI_STATUS (status);
- 	}
-
 	/* Remove the handler */
 
 	acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
drivers/acpi/osl.c +2 -14
diff -Naurd linux-bad/drivers/acpi/osl.c linux-good/drivers/acpi/osl.c
@@ -66,7 +66,6 @@
 static unsigned int acpi_irq_irq;
 static OSD_HANDLER acpi_irq_handler;
 static void *acpi_irq_context;
-static struct workqueue_struct *kacpid_wq;
 
 acpi_status
 acpi_os_initialize(void)
@@ -81,8 +80,6 @@
 		return AE_NULL_ENTRY;
 	}
 #endif
-	kacpid_wq = create_singlethread_workqueue("kacpid");
-	BUG_ON(!kacpid_wq);
 
 	return AE_OK;
 }
@@ -95,8 +92,6 @@
 						 acpi_irq_handler);
 	}
 
-	destroy_workqueue(kacpid_wq);
-
 	return AE_OK;
 }
 
@@ -659,8 +654,8 @@
 	task = (void *)(dpc+1);
 	INIT_WORK(task, acpi_os_execute_deferred, (void*)dpc);
 
-	if (!queue_work(kacpid_wq, task)) {
-		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Call to queue_work() failed.\n"));
+	if (!schedule_work(task)) {
+		ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Call to schedule_work() failed.\n"));
 		kfree(dpc);
 		status = AE_ERROR;
 	}
@@ -668,13 +663,6 @@
 	return_ACPI_STATUS (status);
 }
 
-void
-acpi_os_wait_events_complete(
-	void *context)
-{
-	flush_workqueue(kacpid_wq);
-}
-
 /*
  * Allocate the memory for a spinlock and initialize it.
  */

Understanding why this is needed is beyond my current capabilities, but I hope you can find it out :)

Signature · 1 line
pozsy
#1 lore raw
Quoted 5 lines · Pozsar Balazs

On an Intel D865GRH motherboard kernel 2.6.6 works fine, but 2.6.7-rc2 (vanilla, -mm1 and -mm2 too) freezes during boot if acpi is enabled. (using acpi=off, it boots and works)

I could not gather any useable call trace or other debug information.

I think I've hit this bug as well or possibly something related to it, but back in 2.6.7-rc1, however I was not able to recreate the issue. I posted a message about this to lkml on the 28/05/04 with the subject of:
[2.6.7-rc1][BUG][ACPI] os_wait_semaphore: Failed to aquire semaphore (loop)

Attached was my config and some debug output, which included a call trace and register dump.

Reason I think it's related to this one is that the problem was a continual loop on os_wait_semaphore. I was running with CONFIG_ACPI_DEBUG=y, otherwise I doubt I would have noticed why it froze.

Hope this helps.

Signature · 2 lines
 Stuart Young (aka Cef)
 [email protected] is for LKML and related email only