]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
acpi cpu: probe+attach before all other enumerated children on acpi bus
authoravg <avg@FreeBSD.org>
Thu, 11 Feb 2010 08:50:21 +0000 (08:50 +0000)
committeravg <avg@FreeBSD.org>
Thu, 11 Feb 2010 08:50:21 +0000 (08:50 +0000)
commitc5ddd5cba0b82b6dd5c268f5c079b59889a702e0
tree87b7ddf2a4f80f46acb845235faf84f326cd58f1
parent8c862cf5eb39c7072e9b05f9602e290d07050be4
acpi cpu: probe+attach before all other enumerated children on acpi bus

Some current systems dynamically load SSDT(s) when _PDC/_OSC method
of Processor is evaluated.  Other devices in ACPI namespace may access
objects defined in the dynamic SSDT.  Drivers for such devices might
have to have a rather high priority, because of other dependencies.
Good example is acpi_ec driver for EC.
Thus we attach to Processors as early as possible to load the SSDTs
before any other drivers may try to evaluate control methods.
It also seems to be a natural order for a processor in a device
hierarchy.

On the other hand, some child devices on acpi cpu bus need to access
other system resources like PCI configuration space of chipset devices,
so they need to be probed and attached rather late.
For this reason we probe and attach the cpu bus at
SI_SUB_CONFIGURE:SI_ORDER_MIDDLE SYSINIT level.
In the future this could be done more elegantly via multipass.

Please note that acpi drivers that might access ACPI namespace from
device_identify will do that before _PDC/_OSC of Processors are evaluated.

Legacy cpu driver is not affected by this change.

PR: kern/142561 (in part)
Reviewed by: jhb
Silence from: acpi@
MFC after: 5 weeks
sys/dev/acpica/acpi.c
sys/dev/acpica/acpi_cpu.c