GNU Linux-libre 4.9-gnu1
[releases.git] / tools / power / cpupower / utils / helpers / topology.c
1 /*
2  *  (C) 2010,2011       Thomas Renninger <trenn@suse.de>, Novell Inc.
3  *
4  *  Licensed under the terms of the GNU GPL License version 2.
5  *
6  * ToDo: Needs to be done more properly for AMD/Intel specifics
7  */
8
9 /* Helper struct for qsort, must be in sync with cpupower_topology.cpu_info */
10 /* Be careful: Need to pass unsigned to the sort, so that offlined cores are
11    in the end, but double check for -1 for offlined cpus at other places */
12
13 #include <stdlib.h>
14 #include <stdio.h>
15 #include <unistd.h>
16 #include <errno.h>
17 #include <fcntl.h>
18
19 #include <cpuidle.h>
20
21 /* CPU topology/hierarchy parsing ******************/
22