OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Feb 2018 16:38:55 +0000 (17:38 +0100)
commitf1881befacbe7f91b49544b0860b65eb6af93429
tree5b648cb201c4eb74349e77f4fee9d1a80add11fb
parent1d285c0440fe784e39e9110cc75ca21719b92ead
cpupower : Fix cpupower working when cpu0 is offline

[ Upstream commit dbdc468f35ee827cab2753caa1c660bdb832243a ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c