[issue557] 1.9.0-DEVELOPMENT hangs with ACPI enabled

YONETANI Tomokazu qhwt+dfly at les.ath.cx
Tue Feb 20 14:57:51 PST 2007


On Mon, Feb 19, 2007 at 08:31:36AM -0300, Mariano Aliaga wrote:
> Yes, I know. But the problem is that nothing different happens setting
> debug.acpi.layer and debug.acpi.level. The system just hangs at the
> same point (ppi0: <Parallel I/O> on ppbus0)  and without any new
> messages. And when it hangs, I can't even scroll up to see if
> something different shows on boot messages.
> I also tried removing "ACPI_NAMESPACE" from debug.acpi.layer, but
> nothing different happens.

You can use more verbose options found in acpi(4), but since you can't
scroll up once it hangs, you don't want to turn on ALL options yet.
I wrote another patch to find the last function call before it locks up;
please apply attached patch after reverting the first one if you still
have that, and tell me the last dmesg line which looks like this
(the number varies):
  HERE: acpi_cpu_attach:206
In this case, it means that the driver locked up following the line 206 of
acpi_cpu.c(the name before the number is the function name, and it resides
in acpi_cpu.c).

And the next thing I'm going to tell you is to add two lines in the
acpi_cpu.c like this:

  kprintf("HERE: %s:%d\n", __func__, __LINE__);	/* <== line 206 */
      AcpiDbgLayer = ACPI_ALL_COMPONENTS;
      AcpiDbgLevel = ACPI_LV_ALL;
      status = AcpiEvaluateObject(handle, NULL, NULL, &buf);	/* <== possibly offending statement */
      if (ACPI_FAILURE(status)) {

Probably ACPI_ALL_COMPONENTS displays too much messages, so we need
to reduce it to a few component names.  But before doing that, we need
to locate the offending line in acpi_cpu.c.

Cheers.
Index: acpi_cpu.c
===================================================================
RCS file: /home/source/dragonfly/cvs/src/sys/dev/acpica5/acpi_cpu.c,v
retrieving revision 1.18
diff -u -p -r1.18 acpi_cpu.c
--- acpi_cpu.c	17 Jan 2007 17:31:19 -0000	1.18
+++ acpi_cpu.c	20 Feb 2007 21:56:45 -0000
@@ -203,6 +203,7 @@ acpi_cpu_probe(device_t dev)
     /* Get our Processor object. */
     buf.Pointer = NULL;
     buf.Length = ACPI_ALLOCATE_BUFFER;
+kprintf("HERE: %s:%d\n", __func__, __LINE__);
     status = AcpiEvaluateObject(handle, NULL, NULL, &buf);
     if (ACPI_FAILURE(status)) {
 	device_printf(dev, "probe failed to get Processor obj - %s\n",
@@ -215,6 +216,7 @@ acpi_cpu_probe(device_t dev)
 	AcpiOsFree(obj);
 	return (ENXIO);
     }
+kprintf("HERE: %s:%d\n", __func__, __LINE__);
 
     /*
      * Find the processor associated with our unit.  We could use the
@@ -226,6 +228,7 @@ acpi_cpu_probe(device_t dev)
     if (acpi_pcpu_get_id(device_get_unit(dev), &acpi_id, &cpu_id) != 0)
 	return (ENXIO);
 
+kprintf("HERE: %s:%d\n", __func__, __LINE__);
     /*
      * Check if we already probed this processor.  We scan the bus twice
      * so it's possible we've already seen this one.
@@ -238,6 +241,7 @@ acpi_cpu_probe(device_t dev)
     buf.Pointer = NULL;
     buf.Length = ACPI_ALLOCATE_BUFFER;
     status = AcpiEvaluateObject(handle, "_CST", NULL, &buf);
+kprintf("HERE: %s:%d\n", __func__, __LINE__);
     if (ACPI_SUCCESS(status)) {
 	obj = (ACPI_OBJECT *)buf.Pointer;
 	if (ACPI_PKG_VALID(obj, 2))
@@ -283,6 +287,7 @@ acpi_cpu_attach(device_t dev)
     sc->cpu_handle = acpi_get_handle(dev);
     cpu_softc[acpi_get_magic(dev)] = sc;
 
+kprintf("HERE: %s:%d\n", __func__, __LINE__);
     buf.Pointer = NULL;
     buf.Length = ACPI_ALLOCATE_BUFFER;
     status = AcpiEvaluateObject(sc->cpu_handle, NULL, NULL, &buf);
@@ -305,6 +310,7 @@ acpi_cpu_attach(device_t dev)
 				SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree),
 				OID_AUTO, "cpu", CTLFLAG_RD, 0, "");
 
+kprintf("HERE: %s:%d\n", __func__, __LINE__);
     /* If this is the first device probed, check for quirks. */
     if (device_get_unit(dev) == 0)
 	acpi_cpu_quirks(sc);
@@ -313,11 +319,15 @@ acpi_cpu_attach(device_t dev)
      * Probe for throttling and Cx state support.
      * If none of these is present, free up unused resources.
      */
+kprintf("HERE: %s:%d\n", __func__, __LINE__);
     thr_ret = acpi_cpu_throttle_probe(sc);
+kprintf("HERE: %s:%d\n", __func__, __LINE__);
     cx_ret = acpi_cpu_cx_probe(sc);
     if (thr_ret == 0 || cx_ret == 0) {
+kprintf("HERE: %s:%d\n", __func__, __LINE__);
 	status = AcpiInstallNotifyHandler(sc->cpu_handle, ACPI_DEVICE_NOTIFY,
 					  acpi_cpu_notify, sc);
+kprintf("HERE: %s:%d\n", __func__, __LINE__);
 	if (device_get_unit(dev) == 0)
 	    AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_cpu_startup, NULL);
     } else {




More information about the Bugs mailing list