summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-07-13 17:57:41 +0000
committernjl <njl@FreeBSD.org>2004-07-13 17:57:41 +0000
commit3b1eaf7f0d34d3f9145cdd339e7503cfeb616df4 (patch)
treefa1a60d4fdb41954f5f06ed9a54dbb703b7e2afe /sys
parentc56c18c56addb1d745401937a138927593c3817e (diff)
downloadFreeBSD-src-3b1eaf7f0d34d3f9145cdd339e7503cfeb616df4.zip
FreeBSD-src-3b1eaf7f0d34d3f9145cdd339e7503cfeb616df4.tar.gz
Call device_identify routines after doing the namespace walk. This is
needed so that sysresource objects are created first to reserve all regions, then other devices can allocate from them. Otherwise, acpi_timer (the only ACPI device with an identify routine), would allocate its resources from the nexus, causing the later sysresource reserve to fail. Debugging by: Taku YAMAMOTO, Andrea Campi
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpica/acpi.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index e7ffbe7..1614d53 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -1107,13 +1107,9 @@ acpi_probe_children(device_t bus)
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
ACPI_ASSERTLOCK;
- /* Create any static children by calling device identify methods. */
- ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "device identify routines\n"));
- bus_generic_probe(bus);
-
/*
* Scan the namespace and insert placeholders for all the devices that
- * we find.
+ * we find. We also probe/attach any early devices.
*
* Note that we use AcpiWalkNamespace rather than AcpiGetDevices because
* we want to create nodes for all devices, not just those that are
@@ -1129,9 +1125,11 @@ acpi_probe_children(device_t bus)
}
}
- /*
- * Scan all of the child devices we have created and let them probe/attach.
- */
+ /* Create any static children by calling device identify methods. */
+ ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "device identify routines\n"));
+ bus_generic_probe(bus);
+
+ /* Probe/attach all children, created staticly and from the namespace. */
ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "first bus_generic_attach\n"));
bus_generic_attach(bus);
OpenPOWER on IntegriCloud