Attach the cpufreq child devices with specific orders to enforce relative

priority of some of the drivers that manage the same state (e.g. ichss0
vs est0).  Specifically, powernow, est, and p4tcc are added at order 10,
ichss at order 20, and smist at order 30.  Previously, some laptops were
seeing both ichss0 and est0 attaching and stomping on each other.

XXX: This isn't quite ideal, but works with the existing hacks, I think
what we really want instead is a single "speedstep0" device for CPUs
that the ichss, est, and smist drivers probe (but with differing
priorities).

MFC after:	1 week
This commit is contained in:
jhb 2008-08-13 16:09:40 +00:00
parent c392c35035
commit 3c198486dc
5 changed files with 5 additions and 5 deletions

View File

@ -181,7 +181,7 @@ ichss_identify(driver_t *driver, device_t parent)
}
DPRINT("ichss: PMBASE is %#x\n", pmbase);
child = BUS_ADD_CHILD(parent, 0, "ichss", 0);
child = BUS_ADD_CHILD(parent, 20, "ichss", 0);
if (child == NULL) {
device_printf(parent, "add SpeedStep child failed\n");
return;

View File

@ -967,7 +967,7 @@ est_identify(driver_t *driver, device_t parent)
* We add a child for each CPU since settings must be performed
* on each CPU in the SMP case.
*/
child = BUS_ADD_CHILD(parent, 0, "est", -1);
child = BUS_ADD_CHILD(parent, 10, "est", -1);
if (child == NULL)
device_printf(parent, "add est child failed\n");
}

View File

@ -131,7 +131,7 @@ p4tcc_identify(driver_t *driver, device_t parent)
* of the IA32 Intel Architecture Software Developer's Manual,
* Volume 3, for more info.
*/
if (BUS_ADD_CHILD(parent, 0, "p4tcc", -1) == NULL)
if (BUS_ADD_CHILD(parent, 10, "p4tcc", -1) == NULL)
device_printf(parent, "add p4tcc child failed\n");
}

View File

@ -894,7 +894,7 @@ pn_identify(driver_t *driver, device_t parent)
}
if (device_find_child(parent, "powernow", -1) != NULL)
return;
if ((child = BUS_ADD_CHILD(parent, 0, "powernow", -1)) == NULL)
if ((child = BUS_ADD_CHILD(parent, 10, "powernow", -1)) == NULL)
device_printf(parent, "powernow: add child failed\n");
}

View File

@ -308,7 +308,7 @@ smist_identify(driver_t *driver, device_t parent)
if (device_find_child(parent, "smist", -1) != NULL)
return;
if (BUS_ADD_CHILD(parent, 0, "smist", -1) == NULL)
if (BUS_ADD_CHILD(parent, 30, "smist", -1) == NULL)
device_printf(parent, "smist: add child failed\n");
}