Lines Matching refs:lgrp
119 lgrp_rsets_delete(lgrp_t *lgrp, lgrp_id_t lgrpid, int follow_parent) in lgrp_rsets_delete() argument
123 while (lgrp != NULL) { in lgrp_rsets_delete()
125 klgrpset_del(lgrp->lgrp_set[i], lgrpid); in lgrp_rsets_delete()
128 lgrp = lgrp->lgrp_parent; in lgrp_rsets_delete()
203 lgrp_rsets_replace(klgrpset_t *rset, int latency, lgrp_t *lgrp, int shift) in lgrp_rsets_replace() argument
211 cur = lgrp; in lgrp_rsets_replace()
482 lgrp_t *lgrp; in lgrp_collapse_dups() local
484 lgrp = lgrp_table[j]; in lgrp_collapse_dups()
491 if (!LGRP_EXISTS(lgrp) || in lgrp_collapse_dups()
492 lgrp->lgrp_childcnt == 0 || in lgrp_collapse_dups()
493 !lgrp_rsets_equal(lgrp->lgrp_set, in lgrp_collapse_dups()
495 (lgrp->lgrp_latency != target->lgrp_latency && in lgrp_collapse_dups()
504 keep = lgrp; in lgrp_collapse_dups()
512 if (lgrp == lgrp_root) { in lgrp_collapse_dups()
513 lgrp = keep; in lgrp_collapse_dups()
521 lgrp->lgrp_id, (void *)lgrp, in lgrp_collapse_dups()
524 count += lgrp_consolidate(lgrp, keep, in lgrp_collapse_dups()
718 lgrp_t *lgrp; in lgrp_split() local
721 lgrp = lgrp_table[i]; in lgrp_split()
727 if (!LGRP_EXISTS(lgrp) || lgrp == oldleaf || in lgrp_split()
728 !klgrpset_ismember(parent->lgrp_leaves, lgrp->lgrp_id)) in lgrp_split()
734 sibling_latency = lgrp_plat_latency(lgrp->lgrp_plathand, in lgrp_split()
741 lgrp->lgrp_id, newleaf->lgrp_id, sibling_latency); in lgrp_split()
807 lgrp_topo_height(lgrp_t *lgrp) in lgrp_topo_height() argument
811 if (!LGRP_EXISTS(lgrp)) in lgrp_topo_height()
815 while (lgrp != NULL) { in lgrp_topo_height()
816 lgrp = lgrp->lgrp_parent; in lgrp_topo_height()
1196 lgrp_t *lgrp; in lgrp_leaf_add() local
1198 lgrp = lgrps[i]; in lgrp_leaf_add()
1204 if (!LGRP_EXISTS(lgrp) || lgrp == leaf || in lgrp_leaf_add()
1205 lgrp->lgrp_childcnt != 0) { in lgrp_leaf_add()
1210 lgrp->lgrp_id, (void *)lgrp); in lgrp_leaf_add()
1219 leaf->lgrp_id, (void *)leaf, lgrp->lgrp_id, in lgrp_leaf_add()
1220 (void *)lgrp); in lgrp_leaf_add()
1223 count += lgrp_lineage_add(leaf, lgrp, &changes); in lgrp_leaf_add()
1227 count += lgrp_lineage_add(lgrp, leaf, &changes); in lgrp_leaf_add()
1253 lgrp_t *lgrp; in lgrp_leaf_delete() local
1280 lgrp = lgrps[i]; in lgrp_leaf_delete()
1281 if (lgrp == NULL || lgrp->lgrp_id == LGRP_NONE || in lgrp_leaf_delete()
1282 !lgrp_rsets_member(lgrp->lgrp_set, leaf->lgrp_id)) in lgrp_leaf_delete()
1288 " lgrp %d at %p\n", lgrp->lgrp_id, (void *)lgrp); in lgrp_leaf_delete()
1291 lgrp_rsets_delete(lgrp, leaf->lgrp_id, 0); in lgrp_leaf_delete()
1292 klgrpset_del(lgrp->lgrp_leaves, leaf->lgrp_id); in lgrp_leaf_delete()
1294 klgrpset_add(collapse, lgrp->lgrp_id); in lgrp_leaf_delete()
1345 lgrp_t *lgrp; in lgrp_topo_flatten() local
1362 lgrp = lgrps[i]; in lgrp_topo_flatten()
1363 if (!LGRP_EXISTS(lgrp)) in lgrp_topo_flatten()
1366 hdl = lgrp->lgrp_plathand; in lgrp_topo_flatten()
1368 if (lgrp == lgrp_root) { in lgrp_topo_flatten()
1369 lgrp->lgrp_latency = lgrp_plat_latency(hdl, hdl); in lgrp_topo_flatten()
1373 if (lgrp->lgrp_childcnt > 0) { in lgrp_topo_flatten()
1379 parent = lgrp->lgrp_parent; in lgrp_topo_flatten()
1381 klgrpset_add(*changed, lgrp->lgrp_id); in lgrp_topo_flatten()
1387 lgrp->lgrp_id); in lgrp_topo_flatten()
1390 lgrp_destroy(lgrp); in lgrp_topo_flatten()
1391 } else if (lgrp->lgrp_parent != lgrp_root) { in lgrp_topo_flatten()
1397 klgrpset_add(*changed, lgrp->lgrp_id); in lgrp_topo_flatten()
1400 lgrp->lgrp_parent = lgrp_root; in lgrp_topo_flatten()
1401 klgrpset_add(lgrp_root->lgrp_children, lgrp->lgrp_id); in lgrp_topo_flatten()
1403 klgrpset_add(lgrp_root->lgrp_leaves, lgrp->lgrp_id); in lgrp_topo_flatten()
1405 lgrp->lgrp_latency = lgrp_plat_latency(hdl, hdl); in lgrp_topo_flatten()
1464 lgrp_t *lgrp; in lgrp_topo_update() local
1492 lgrp = lgrps[i]; in lgrp_topo_update()
1498 if (lgrp == NULL || lgrp->lgrp_id == LGRP_NONE || in lgrp_topo_update()
1499 lgrp->lgrp_childcnt != 0 || lgrp->lgrp_latency != 0) in lgrp_topo_update()
1505 "of lgrp %d at 0x%p\n", lgrp->lgrp_id, in lgrp_topo_update()
1506 (void *)lgrp); in lgrp_topo_update()
1510 count += lgrp_leaf_add(lgrp, lgrps, lgrp_count, &changes); in lgrp_topo_update()
1538 lgrp_print(lgrp_t *lgrp) in lgrp_print() argument
1542 prom_printf("LGRP %d", lgrp->lgrp_id); in lgrp_print()
1543 if (lgrp->lgrp_childcnt == 0) in lgrp_print()
1545 (void *)lgrp->lgrp_plathand); in lgrp_print()
1549 prom_printf("\tlatency %d\n", lgrp->lgrp_latency); in lgrp_print()
1551 lgrp_rsets_print("\tresources", lgrp->lgrp_set); in lgrp_print()
1553 parent = lgrp->lgrp_parent; in lgrp_print()
1560 prom_printf("\tchild count %d, children ", lgrp->lgrp_childcnt); in lgrp_print()
1561 klgrpset_print(lgrp->lgrp_children); in lgrp_print()
1564 klgrpset_print(lgrp->lgrp_leaves); in lgrp_print()
1581 lgrp_t *lgrp; in lgrp_topo_print() local
1583 lgrp = lgrps[i]; in lgrp_topo_print()
1584 if (lgrp == NULL || !klgrpset_ismember(siblings, i)) in lgrp_topo_print()
1586 lgrp_print(lgrp); in lgrp_topo_print()
1587 klgrpset_or(children, lgrp->lgrp_children); in lgrp_topo_print()