cpupower: Do not analyse offlined cpus
authorThomas Renninger <trenn@suse.com>
Tue, 1 Dec 2015 16:14:15 +0000 (17:14 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 3 Dec 2015 01:30:30 +0000 (02:30 +0100)
commitce512b84045459f4a6c119a109c950c6bc4a6f3a
tree7dc8c24c52f5b870ce1a6c1a4b09adfdaa0e7d98
parente51207f0030474958e59bbc7e002f169bdb05c50
cpupower: Do not analyse offlined cpus

Use sysfs_is_cpu_online(cpu) instead of cpufreq_cpu_exists(cpu) to detect offlined cpus.

Re-arrange printfs slightly to have a consistent output even if you have multiple CPUs
as output and even if offlined cores are in between.

Signed-off-by: Thomas Renninger <trenn@suse.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
tools/power/cpupower/utils/cpufreq-info.c
tools/power/cpupower/utils/cpuidle-info.c
tools/power/cpupower/utils/cpupower-info.c
tools/power/cpupower/utils/cpupower-set.c