17fe2f639SDominik Brodowski /*
27fe2f639SDominik Brodowski  *  (C) 2010,2011       Thomas Renninger <trenn@suse.de>, Novell Inc.
37fe2f639SDominik Brodowski  *
47fe2f639SDominik Brodowski  *  Licensed under the terms of the GNU GPL License version 2.
57fe2f639SDominik Brodowski  *
67fe2f639SDominik Brodowski  * ToDo: Needs to be done more properly for AMD/Intel specifics
77fe2f639SDominik Brodowski  */
87fe2f639SDominik Brodowski 
97fe2f639SDominik Brodowski /* Helper struct for qsort, must be in sync with cpupower_topology.cpu_info */
107fe2f639SDominik Brodowski /* Be careful: Need to pass unsigned to the sort, so that offlined cores are
117fe2f639SDominik Brodowski    in the end, but double check for -1 for offlined cpus at other places */
127fe2f639SDominik Brodowski 
137fe2f639SDominik Brodowski #include <stdlib.h>
147fe2f639SDominik Brodowski #include <stdio.h>
157fe2f639SDominik Brodowski #include <unistd.h>
167fe2f639SDominik Brodowski #include <errno.h>
177fe2f639SDominik Brodowski #include <fcntl.h>
187fe2f639SDominik Brodowski 
19ac5a181dSThomas Renninger #include <cpuidle.h>
207fe2f639SDominik Brodowski 
21ac5a181dSThomas Renninger /* CPU topology/hierarchy parsing ******************/
227fe2f639SDominik Brodowski 
23