diff options
| author | Ingo Molnar <mingo@elte.hu> | 2011-09-18 14:01:26 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2011-09-18 14:01:39 +0200 |
| commit | bfa322c48dc69bfdaee10faf3bd8dbc23b39a21c (patch) | |
| tree | 95360c5d253115003080264d878f3c0f907f2978 /tools/power/cpupower/utils/helpers/topology.c | |
| parent | 88ebc08ea9f721d1345d5414288a308ea42ac458 (diff) | |
| parent | 003f6c9df54970d8b19578d195b3e2b398cdbde2 (diff) | |
Merge branch 'linus' into sched/core
Merge reason: We are queueing up a dependent patch.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/power/cpupower/utils/helpers/topology.c')
| -rw-r--r-- | tools/power/cpupower/utils/helpers/topology.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/power/cpupower/utils/helpers/topology.c b/tools/power/cpupower/utils/helpers/topology.c index 385ee5c7570c..4eae2c47ba48 100644 --- a/tools/power/cpupower/utils/helpers/topology.c +++ b/tools/power/cpupower/utils/helpers/topology.c @@ -41,6 +41,8 @@ struct cpuid_core_info { unsigned int pkg; unsigned int thread; unsigned int cpu; + /* flags */ + unsigned int is_online:1; }; static int __compare(const void *t1, const void *t2) @@ -78,6 +80,8 @@ int get_cpu_topology(struct cpupower_topology *cpu_top) return -ENOMEM; cpu_top->pkgs = cpu_top->cores = 0; for (cpu = 0; cpu < cpus; cpu++) { + cpu_top->core_info[cpu].cpu = cpu; + cpu_top->core_info[cpu].is_online = sysfs_is_cpu_online(cpu); cpu_top->core_info[cpu].pkg = sysfs_topology_read_file(cpu, "physical_package_id"); if ((int)cpu_top->core_info[cpu].pkg != -1 && @@ -85,7 +89,6 @@ int get_cpu_topology(struct cpupower_topology *cpu_top) cpu_top->pkgs = cpu_top->core_info[cpu].pkg; cpu_top->core_info[cpu].core = sysfs_topology_read_file(cpu, "core_id"); - cpu_top->core_info[cpu].cpu = cpu; } cpu_top->pkgs++; |
