diff options
author | Zoran Markovic <zoran.markovic@linaro.org> | 2014-02-18 15:56:35 -0800 |
---|---|---|
committer | Zoran Markovic <zoran.markovic@linaro.org> | 2014-03-14 15:48:00 -0700 |
commit | 5f5edbc4b214f3db9b2a21db8d6c93865fc6eacf (patch) | |
tree | c869f0d1f99ec44d6f6a8d418705c2291fd412b7 /topology.c | |
parent | 6630a0eebd39a4e759c87322d9e41b95715bad87 (diff) |
Formatted output report to 80 columns. Code reorganization.
Diffstat (limited to 'topology.c')
-rw-r--r-- | topology.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -420,6 +420,7 @@ int establish_idledata_to_topo(struct cpuidle_datas *datas) s_cpu = find_cpu_point(&g_cpu_topo_list, i); if (s_cpu) { s_cpu->cstates = &datas->cstates[i]; + s_cpu->pstates = &datas->pstates[i]; has_topo = 1; } } @@ -438,7 +439,8 @@ int establish_idledata_to_topo(struct cpuidle_datas *datas) } int dump_cpu_topo_info(int state, int count, - int (*dump)(struct cpuidle_cstates *, int, int, char *)) + int (*dump)(struct cpuidle_cstates *, struct cpufreq_pstates *, + int, int, char *)) { struct cpu_physical *s_phy; struct cpu_core *s_core; @@ -448,12 +450,12 @@ int dump_cpu_topo_info(int state, int count, list_for_each_entry(s_phy, &g_cpu_topo_list.physical_head, list_physical) { sprintf(tmp, "cluster%c", s_phy->physical_id + 'A'); - dump(s_phy->cstates, state, count, tmp); + dump(s_phy->cstates, NULL, state, count, tmp); list_for_each_entry(s_core, &s_phy->core_head, list_core) { if (s_core->is_ht) { - sprintf(tmp, "\tcore%d", s_core->core_id); - dump(s_core->cstates, state, count, tmp); + sprintf(tmp, " core%d", s_core->core_id); + dump(s_core->cstates, NULL, state, count, tmp); tab = 1; } else { @@ -461,8 +463,9 @@ int dump_cpu_topo_info(int state, int count, } list_for_each_entry(s_cpu, &s_core->cpu_head, list_cpu) { - sprintf(tmp, "%scpu%d", tab ? "\t\t" : "\t", s_cpu->cpu_id); - dump(s_cpu->cstates, state, count, tmp); + sprintf(tmp, "%*ccpu%d", (tab + 1) * 2, 0x20, s_cpu->cpu_id); + dump(s_cpu->cstates, s_cpu->pstates, state, + count, tmp); } } } |