Break out the checks for duplicates and absolute settings being too high
instead of trying to do them all at once. This should fix the level sorting problems from the previous revision. Testing help: ume
This commit is contained in:
parent
1f71de49e1
commit
9000b91eb9
@ -760,14 +760,23 @@ cpufreq_dup_set(struct cpufreq_softc *sc, struct cf_level *dup,
|
|||||||
KASSERT(!TAILQ_EMPTY(list), ("all levels list empty in dup set"));
|
KASSERT(!TAILQ_EMPTY(list), ("all levels list empty in dup set"));
|
||||||
TAILQ_FOREACH_REVERSE(itr, list, cf_level_lst, link) {
|
TAILQ_FOREACH_REVERSE(itr, list, cf_level_lst, link) {
|
||||||
itr_set = &itr->total_set;
|
itr_set = &itr->total_set;
|
||||||
if (fill_set->freq < itr_set->freq &&
|
if (CPUFREQ_CMP(fill_set->freq, itr_set->freq)) {
|
||||||
!CPUFREQ_CMP(fill_set->freq, itr_set->freq) &&
|
CF_DEBUG("dup set rejecting %d (dupe)\n",
|
||||||
fill->abs_set.freq <= itr->abs_set.freq) {
|
fill_set->freq);
|
||||||
CF_DEBUG(
|
itr = NULL;
|
||||||
"dup done, inserting new level %d after %d\n",
|
break;
|
||||||
fill_set->freq, itr_set->freq);
|
} else if (fill_set->freq < itr_set->freq) {
|
||||||
TAILQ_INSERT_AFTER(list, itr, fill, link);
|
if (fill->abs_set.freq <= itr->abs_set.freq) {
|
||||||
sc->all_count++;
|
CF_DEBUG(
|
||||||
|
"dup done, inserting new level %d after %d\n",
|
||||||
|
fill_set->freq, itr_set->freq);
|
||||||
|
TAILQ_INSERT_AFTER(list, itr, fill, link);
|
||||||
|
sc->all_count++;
|
||||||
|
} else {
|
||||||
|
CF_DEBUG("dup set rejecting %d (abs too big)\n",
|
||||||
|
fill_set->freq);
|
||||||
|
itr = NULL;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user