Index: acpi_cpu.c =================================================================== RCS file: /home/source/dragonfly/cvs/src/sys/dev/acpica5/acpi_cpu.c,v retrieving revision 1.19 diff -u -p -r1.19 acpi_cpu.c --- acpi_cpu.c 22 Feb 2007 04:02:50 -0000 1.19 +++ acpi_cpu.c 24 Feb 2007 11:07:43 -0000 @@ -182,10 +182,15 @@ static devclass_t acpi_cpu_devclass; DRIVER_MODULE(cpu, acpi, acpi_cpu_driver, acpi_cpu_devclass, 0, 0); MODULE_DEPEND(cpu, acpi, 1, 1, 1); +static int acpi_cpu_probe_debug_knob = 0; +TUNABLE_INT("debug.acpi.cpu.knob", &acpi_cpu_probe_debug_knob); +#define DEBUG_KNOB(n) \ + if (acpi_cpu_probe_debug_knob == (n)) return(ENXIO) + static int acpi_cpu_probe(device_t dev) { - int acpi_id, cpu_id, cx_count; + int acpi_id, cpu_id, proc_id, cx_count; ACPI_BUFFER buf; ACPI_HANDLE handle; char msg[32]; @@ -196,14 +201,16 @@ acpi_cpu_probe(device_t dev) return (ENXIO); handle = acpi_get_handle(dev); +DEBUG_KNOB(1); if (cpu_softc == NULL) cpu_softc = kmalloc(sizeof(struct acpi_cpu_softc *) * SMP_MAXCPU, M_TEMP /* XXX */, M_INTWAIT | M_ZERO); - +DEBUG_KNOB(2); /* Get our Processor object. */ buf.Pointer = NULL; buf.Length = ACPI_ALLOCATE_BUFFER; status = AcpiEvaluateObject(handle, NULL, NULL, &buf); +DEBUG_KNOB(3); if (ACPI_FAILURE(status)) { device_printf(dev, "probe failed to get Processor obj - %s\n", AcpiFormatException(status)); @@ -221,18 +228,25 @@ acpi_cpu_probe(device_t dev) * ProcId as a key, however, some boxes do not have the same values * in their Processor object as the ProcId values in the MADT. */ - acpi_id = obj->Processor.ProcId; + acpi_id = proc_id = obj->Processor.ProcId; AcpiOsFree(obj); - if (acpi_pcpu_get_id(device_get_unit(dev), &acpi_id, &cpu_id) != 0) +DEBUG_KNOB(4); + if (acpi_pcpu_get_id(device_get_unit(dev), &acpi_id, &cpu_id) != 0) { + if (bootverbose) + device_printf(dev, "ProcId %d: can't find cpu_id\n", proc_id); return (ENXIO); - + } + if (bootverbose) { + device_printf(dev, "ProcId %d: acpi_id=%d, cpu_id=%d\n", proc_id, + acpi_id, cpu_id); + } /* * Check if we already probed this processor. We scan the bus twice * so it's possible we've already seen this one. */ if (cpu_softc[cpu_id] != NULL) return (ENXIO); - +DEBUG_KNOB(5); /* Get a count of Cx states for our device string. */ cx_count = 0; buf.Pointer = NULL; @@ -263,6 +277,7 @@ acpi_cpu_probe(device_t dev) return (0); } +#undef DEBUG_KNOB static int acpi_cpu_attach(device_t dev)