linux/tools/power/cpupower/utils/helpers
Palmer Cox ea1021ffa6 cpupower tools: Fix warning and a bug with the cpu package count
The pkgs member of cpupower_topology is being used as the number of
cpu packages. As the comment in get_cpu_topology notes, the package ids
are not guaranteed to be contiguous. So, simply setting pkgs to the value
of the highest physical_package_id doesn't actually provide a count of
the number of cpu packages. Instead, calculate pkgs by setting it to
the number of distinct physical_packge_id values which is pretty easy
to do after the core_info structs are sorted. Calculating pkgs this
way also has the nice benefit of getting rid of a sign comparison warning
that GCC 4.6 was reporting.

Signed-off-by: Palmer Cox <p@lmercox.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-27 23:07:19 +01:00
..
amd.c cpupower: Better interface for accessing AMD pci registers 2012-03-03 14:40:08 +01:00
bitmask.c cpupowerutils: helpers - ConfigStyle bugfixes 2011-07-29 18:35:39 +02:00
bitmask.h
cpuid.c cpupower: Do detect IDA (opportunistic processor performance) via cpuid 2011-07-29 19:37:27 +02:00
helpers.h cpupower tools: Fix malloc of cpu_info structure 2012-11-27 23:07:19 +01:00
misc.c cpupower: Do detect IDA (opportunistic processor performance) via cpuid 2011-07-29 19:37:27 +02:00
msr.c cpupower: Do detect IDA (opportunistic processor performance) via cpuid 2011-07-29 19:37:27 +02:00
pci.c cpupower: Better interface for accessing AMD pci registers 2012-03-03 14:40:08 +01:00
sysfs.c cpupower tools: Fix minor warnings 2012-11-27 23:07:18 +01:00
sysfs.h cpupower: Better detect offlined CPUs 2011-08-15 20:03:10 +02:00
topology.c cpupower tools: Fix warning and a bug with the cpu package count 2012-11-27 23:07:19 +01:00