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 */
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
{
21 unsigned int is_online
:1;
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
);