WIP FPC-III support
[linux/fpc-iii.git] / tools / power / cpupower / lib / cpupower.h
blobe4e4292eacec6d52227e67592159a929558f28a2
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __CPUPOWER_CPUPOWER_H__
3 #define __CPUPOWER_CPUPOWER_H__
5 struct cpupower_topology {
6 /* Amount of CPU cores, packages and threads per core in the system */
7 unsigned int cores;
8 unsigned int pkgs;
9 unsigned int threads; /* per core */
11 /* Array gets mallocated with cores entries, holding per core info */
12 struct cpuid_core_info *core_info;
15 struct cpuid_core_info {
16 int pkg;
17 int core;
18 int cpu;
20 /* flags */
21 unsigned int is_online:1;
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 int get_cpu_topology(struct cpupower_topology *cpu_top);
29 void cpu_topology_release(struct cpupower_topology cpu_top);
30 int cpupower_is_cpu_online(unsigned int cpu);
32 #ifdef __cplusplus
34 #endif
36 #endif