diff options
Diffstat (limited to 'tools/power/cpupower/utils/helpers/helpers.h')
| -rw-r--r-- | tools/power/cpupower/utils/helpers/helpers.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/power/cpupower/utils/helpers/helpers.h b/tools/power/cpupower/utils/helpers/helpers.h index 2eb584cf2f55..aa9e95486a2d 100644 --- a/tools/power/cpupower/utils/helpers/helpers.h +++ b/tools/power/cpupower/utils/helpers/helpers.h | |||
| @@ -92,6 +92,14 @@ extern int get_cpu_info(unsigned int cpu, struct cpupower_cpu_info *cpu_info); | |||
| 92 | extern struct cpupower_cpu_info cpupower_cpu_info; | 92 | extern struct cpupower_cpu_info cpupower_cpu_info; |
| 93 | /* cpuid and cpuinfo helpers **************************/ | 93 | /* cpuid and cpuinfo helpers **************************/ |
| 94 | 94 | ||
| 95 | struct cpuid_core_info { | ||
| 96 | int pkg; | ||
| 97 | int core; | ||
| 98 | int cpu; | ||
| 99 | |||
| 100 | /* flags */ | ||
| 101 | unsigned int is_online:1; | ||
| 102 | }; | ||
| 95 | 103 | ||
| 96 | /* CPU topology/hierarchy parsing ******************/ | 104 | /* CPU topology/hierarchy parsing ******************/ |
| 97 | struct cpupower_topology { | 105 | struct cpupower_topology { |
| @@ -101,18 +109,12 @@ struct cpupower_topology { | |||
| 101 | unsigned int threads; /* per core */ | 109 | unsigned int threads; /* per core */ |
| 102 | 110 | ||
| 103 | /* Array gets mallocated with cores entries, holding per core info */ | 111 | /* Array gets mallocated with cores entries, holding per core info */ |
| 104 | struct { | 112 | struct cpuid_core_info *core_info; |
| 105 | int pkg; | ||
| 106 | int core; | ||
| 107 | int cpu; | ||
| 108 | |||
| 109 | /* flags */ | ||
| 110 | unsigned int is_online:1; | ||
| 111 | } *core_info; | ||
| 112 | }; | 113 | }; |
| 113 | 114 | ||
| 114 | extern int get_cpu_topology(struct cpupower_topology *cpu_top); | 115 | extern int get_cpu_topology(struct cpupower_topology *cpu_top); |
| 115 | extern void cpu_topology_release(struct cpupower_topology cpu_top); | 116 | extern void cpu_topology_release(struct cpupower_topology cpu_top); |
| 117 | |||
| 116 | /* CPU topology/hierarchy parsing ******************/ | 118 | /* CPU topology/hierarchy parsing ******************/ |
| 117 | 119 | ||
| 118 | /* X86 ONLY ****************************************/ | 120 | /* X86 ONLY ****************************************/ |
