Queue the CPU-probing task after all acpi_cpu devices are attached.
Eventually with earlier AP startup this code will change to call the startup function synchronously instead of queueing the task. Moving the time we queue the task should be a no-op since taskqueue threads don't start executing tasks until much later, but this reduces the diff with the earlier AP startup patches. Sponsored by: Netflix
This commit is contained in:
parent
be4e639d7a
commit
f8887b894c
@ -355,9 +355,6 @@ acpi_cpu_attach(device_t dev)
|
||||
cpu_sysctl_tree = SYSCTL_ADD_NODE(&cpu_sysctl_ctx,
|
||||
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "cpu",
|
||||
CTLFLAG_RD, 0, "node for CPU children");
|
||||
|
||||
/* Queue post cpu-probing task handler */
|
||||
AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_cpu_startup, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -423,17 +420,27 @@ acpi_cpu_postattach(void *unused __unused)
|
||||
device_t *devices;
|
||||
int err;
|
||||
int i, n;
|
||||
int attached;
|
||||
|
||||
err = devclass_get_devices(acpi_cpu_devclass, &devices, &n);
|
||||
if (err != 0) {
|
||||
printf("devclass_get_devices(acpi_cpu_devclass) failed\n");
|
||||
return;
|
||||
}
|
||||
attached = 0;
|
||||
for (i = 0; i < n; i++)
|
||||
if (device_is_attached(devices[i]))
|
||||
attached = 1;
|
||||
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);
|
||||
|
||||
if (attached) {
|
||||
/* Queue post cpu-probing task handler */
|
||||
AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_cpu_startup, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE,
|
||||
|
Loading…
Reference in New Issue
Block a user