Lines Matching refs:level
34 int level; member
52 struct cpuinfo_level level[CPUINFO_LVL_MAX]; member
96 static int cpuinfo_id(int cpu, int level) in cpuinfo_id() argument
100 switch (level) { in cpuinfo_id()
193 int n, id, cpu, prev_cpu, last_cpu, level; in build_cpuinfo_tree() local
202 memcpy(&new_tree->level, tmp_level, sizeof(tmp_level)); in build_cpuinfo_tree()
207 for (level = CPUINFO_LVL_PROC; level >= CPUINFO_LVL_ROOT; level--) { in build_cpuinfo_tree()
208 n = new_tree->level[level].start_index; in build_cpuinfo_tree()
210 level_rover[level] = n; in build_cpuinfo_tree()
213 id = cpuinfo_id(cpu, level); in build_cpuinfo_tree()
219 node->level = level; in build_cpuinfo_tree()
222 node->parent_index = (level > CPUINFO_LVL_ROOT) in build_cpuinfo_tree()
223 ? new_tree->level[level - 1].start_index : -1; in build_cpuinfo_tree()
226 (level == CPUINFO_LVL_PROC) in build_cpuinfo_tree()
227 ? cpu : new_tree->level[level + 1].start_index; in build_cpuinfo_tree()
229 prev_id[level] = node->id; in build_cpuinfo_tree()
230 num_cpus[level] = 1; in build_cpuinfo_tree()
242 for (level = CPUINFO_LVL_PROC; level >= CPUINFO_LVL_ROOT; in build_cpuinfo_tree()
243 level--) { in build_cpuinfo_tree()
244 id = cpuinfo_id(cpu, level); in build_cpuinfo_tree()
250 if ((id != prev_id[level]) || (cpu == last_cpu)) { in build_cpuinfo_tree()
251 prev_id[level] = id; in build_cpuinfo_tree()
252 node = &new_tree->nodes[level_rover[level]]; in build_cpuinfo_tree()
253 node->num_cpus = num_cpus[level]; in build_cpuinfo_tree()
254 num_cpus[level] = 1; in build_cpuinfo_tree()
260 if (level == CPUINFO_LVL_ROOT) in build_cpuinfo_tree()
264 level_rover[level - 1]; in build_cpuinfo_tree()
266 if (level == CPUINFO_LVL_PROC) { in build_cpuinfo_tree()
271 level_rover[level + 1] - 1; in build_cpuinfo_tree()
275 n = ++level_rover[level]; in build_cpuinfo_tree()
276 if (n <= new_tree->level[level].end_index) { in build_cpuinfo_tree()
279 node->level = level; in build_cpuinfo_tree()
284 (level == CPUINFO_LVL_PROC) in build_cpuinfo_tree()
285 ? cpu : level_rover[level + 1]; in build_cpuinfo_tree()
288 num_cpus[level]++; in build_cpuinfo_tree()
300 int top_level, level; in increment_rover() local
302 top_level = t->nodes[root_index].level; in increment_rover()
303 for (level = node->level; level >= top_level; level--) { in increment_rover()
310 if ((level == top_level) || in increment_rover()
311 !(rover_inc_table[level] & ROVER_INC_PARENT_ON_LOOP)) in increment_rover()
321 int level, new_index, index = root_index; in iterate_cpu() local
340 for (level = t->nodes[root_index].level; level < CPUINFO_LVL_MAX; in iterate_cpu()
341 level++) { in iterate_cpu()
343 if (rover_inc_table[level] & ROVER_INC_ON_VISIT) in iterate_cpu()