提交 04507c0a 编写于 作者: A Abhishek Goel 提交者: Shuah Khan

cpupower : frequency-set -r option misses the last cpu in related cpu list

To set frequency on specific cpus using cpupower, following syntax can
be used :
cpupower -c #i frequency-set -f #f -r

While setting frequency using cpupower frequency-set command, if we use
'-r' option, it is expected to set frequency for all cpus related to
cpu #i. But it is observed to be missing the last cpu in related cpu
list. This patch fixes the problem.
Signed-off-by: NAbhishek Goel <huntbag@linux.vnet.ibm.com>
Reviewed-by: NThomas Renninger <trenn@suse.de>
Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
上级 bd59ffb2
...@@ -305,6 +305,8 @@ int cmd_freq_set(int argc, char **argv) ...@@ -305,6 +305,8 @@ int cmd_freq_set(int argc, char **argv)
bitmask_setbit(cpus_chosen, cpus->cpu); bitmask_setbit(cpus_chosen, cpus->cpu);
cpus = cpus->next; cpus = cpus->next;
} }
/* Set the last cpu in related cpus list */
bitmask_setbit(cpus_chosen, cpus->cpu);
cpufreq_put_related_cpus(cpus); cpufreq_put_related_cpus(cpus);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册