cpupower : Fix cpupower working when cpu0 is offline
authorAbhishek Goel <huntbag@linux.vnet.ibm.com>
Wed, 15 Nov 2017 08:40:02 +0000 (14:10 +0530)
committerShuah Khan <shuahkh@osg.samsung.com>
Wed, 15 Nov 2017 15:37:42 +0000 (08:37 -0700)
commitdbdc468f35ee827cab2753caa1c660bdb832243a
tree009fbaa59b5cde86d28b3fefa9d370dc2ef5e7b4
parent53d1cd6b125fb9d69303516a1179ebc3b72f797a
cpupower : Fix cpupower working when cpu0 is offline

cpuidle_monitor used to assume that cpu0 is always online which is not
a valid assumption on POWER machines. This patch fixes this by getting
the cpu on which the current thread is running, instead of always using
cpu0 for monitoring which may not be online.

Signed-off-by: Abhishek Goel <huntbag@linux.vnet.ibm.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c