提交 2e5e8fd1 编写于 作者: S Shilpasri G Bhat 提交者: Rafael J. Wysocki

cpupower: Do not change the frequency of offline cpu

Check if the cpu is online before changing the frequency/governor of
the cpu.
Reported-by: NPavaman Subramaniyam <pavsubra@linux.vnet.ibm.com>
Signed-off-by: NShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Reviewed-by: NGautham R. Shenoy <ego@linux.vnet.ibm.com>
Acked-by: NThomas Renninger <trenn@suse.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 52721d9d
......@@ -17,6 +17,7 @@
#include "cpufreq.h"
#include "helpers/helpers.h"
#include "helpers/sysfs.h"
#define NORM_FREQ_LEN 32
......@@ -318,6 +319,9 @@ int cmd_freq_set(int argc, char **argv)
cpufreq_cpu_exists(cpu))
continue;
if (sysfs_is_cpu_online(cpu) != 1)
continue;
printf(_("Setting cpu: %d\n"), cpu);
ret = do_one_cpu(cpu, &new_pol, freq, policychange);
if (ret) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册