aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2010-03-11 08:55:03 +0000
committerAndriy Gapon <avg@FreeBSD.org>2010-03-11 08:55:03 +0000
commit57ff35ce7463326ebf23f67f798a1da7f8c5b3fb (patch)
tree6bdfb29e5288d56b9418d37ce6bc463beb077b2f /sys/dev
parent060d3bde0412a787c9bf84a535d07d4fa9639f3f (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/acpi.c10
-rw-r--r--sys/dev/acpica/acpi_cpu.c26
2 files changed, 27 insertions, 9 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 8de8d9004729..63112721dc4b 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -1691,14 +1691,14 @@ acpi_probe_order(ACPI_HANDLE handle, int *order)
* 100000. CPUs
*/
AcpiGetType(handle, &type);
- if (acpi_MatchHid(handle, "PNP0C01") || acpi_MatchHid(handle, "PNP0C02"))
+ if (type == ACPI_TYPE_PROCESSOR)
*order = 1;
- else if (acpi_MatchHid(handle, "PNP0C09"))
+ else if (acpi_MatchHid(handle, "PNP0C01") || acpi_MatchHid(handle, "PNP0C02"))
*order = 2;
- else if (acpi_MatchHid(handle, "PNP0C0F"))
+ else if (acpi_MatchHid(handle, "PNP0C09"))
*order = 3;
- else if (type == ACPI_TYPE_PROCESSOR)
- *order = 100000;
+ else if (acpi_MatchHid(handle, "PNP0C0F"))
+ *order = 4;
}
/*
diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c
index bbbd23926c2c..06c295481322 100644
--- a/sys/dev/acpica/acpi_cpu.c
+++ b/sys/dev/acpica/acpi_cpu.c
@@ -384,13 +384,31 @@ acpi_cpu_attach(device_t dev)
/* Probe for Cx state support. */
acpi_cpu_cx_probe(sc);
- /* Finally, call identify and probe/attach for child devices. */
- bus_generic_probe(dev);
- bus_generic_attach(dev);
-
return (0);
}
+static void
+acpi_cpu_postattach(void *unused __unused)
+{
+ device_t *devices;
+ int err;
+ int i, n;
+
+ err = devclass_get_devices(acpi_cpu_devclass, &devices, &n);
+ if (err != 0) {
+ printf("devclass_get_devices(acpi_cpu_devclass) failed\n");
+ return;
+ }
+ for (i = 0; i < n; i++)
+ bus_generic_probe(devices[i]);
+ for (i = 0; i < n; i++)
+ bus_generic_attach(devices[i]);
+ free(devices, M_TEMP);
+}
+
+SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE,
+ acpi_cpu_postattach, NULL);
+
/*
* Disable any entry to the idle function during suspend and re-enable it
* during resume.