Power management fixes for v4.15-rc2
These add missing module information to the Mediatek cpufreq driver module (Jesse Chan), fix config dependencies for the Loongson cpufreq driver (James Hogan) and fix two issues related to CPU offline in the cpupower utility (Abhishek Goel). -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJaIAeoAAoJEILEb/54YlRx4wMP/1qqVZqbdIjABZcAzyWy92Rf dj78h3JzMY89YtegfQd4dgg+p5/JGvRMhvq7Hroz3pLryRA1EmTzLOs86453eyqp VY6B9ER+IaFyaW9dbDrVMpKcvaJuFgX7n2FPfsDzFY4E710NTss9kBjJGbYv+0MD CSy0QoK8V6erFrhToxKJsHkvkJaM+zZwCFGU36pVRz5xly4GylgWQ6rsbqlKFVwd 6kHIm4xQ5e16eE8KROQPQwFk5myEhCg28JwpdHPwGLOwdBGNuoDrwxmIB/56pv/k MDUaS98YBcPLgVAjKHAqfL7FsFeli0Agxv9Q9NfkNjg7PSPizDSgJlmoQAnptrka WkDQez0Fz3VoTVteaGn9cdpZCSZ+Jr5hevKqMSBl/1EkxsFhcQOn4uLln52ufCsh 9vUIjmmVc7CGWkxrHcmlyrTpWRVHuRDFw8ybzkbcejZDCs/wXTNIOhzZSyga0Fc5 LE9+ogvzRLLjSth3PIStX0L2M8VrFoGf4kwRrpOBO/agUJjZFz2ON7mEQJkoxKjm iB9L+NdczfJW2vh89NFFlBYS9Gz7XrBTW5Bvc5962hGXgPvvq23yJ/3naGw+JTU1 nPTaHBzw8S3K+ASTk+P98EPqh3kb2ZAobmR4I6UcJDqfWRj43xIkvRsArJ50H/S2 odzEKDOggkdeinERbOq8 =ZzZK -----END PGP SIGNATURE----- Merge tag 'pm-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: - add missing module information to the Mediatek cpufreq driver module (Jesse Chan) - fix config dependencies for the Loongson cpufreq driver (James Hogan) - fix two issues related to CPU offline in the cpupower utility (Abhishek Goel). * tag 'pm-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: mediatek: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE cpufreq: Add Loongson machine dependencies cpupower : Fix cpupower working when cpu0 is offline cpupowerutils: bench - Fix cpu online check
This commit is contained in:
commit
0cf710f8c6
|
@ -275,6 +275,7 @@ config BMIPS_CPUFREQ
|
|||
|
||||
config LOONGSON2_CPUFREQ
|
||||
tristate "Loongson2 CPUFreq Driver"
|
||||
depends on LEMOTE_MACH2F
|
||||
help
|
||||
This option adds a CPUFreq driver for loongson processors which
|
||||
support software configurable cpu frequency.
|
||||
|
@ -287,6 +288,7 @@ config LOONGSON2_CPUFREQ
|
|||
|
||||
config LOONGSON1_CPUFREQ
|
||||
tristate "Loongson1 CPUFreq Driver"
|
||||
depends on LOONGSON1_LS1B
|
||||
help
|
||||
This option adds a CPUFreq driver for loongson1 processors which
|
||||
support software configurable cpu frequency.
|
||||
|
|
|
@ -620,3 +620,7 @@ static int __init mtk_cpufreq_driver_init(void)
|
|||
return 0;
|
||||
}
|
||||
device_initcall(mtk_cpufreq_driver_init);
|
||||
|
||||
MODULE_DESCRIPTION("MediaTek CPUFreq driver");
|
||||
MODULE_AUTHOR("Pi-Cheng Chen <pi-cheng.chen@linaro.org>");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
|
|
@ -61,7 +61,7 @@ int set_cpufreq_governor(char *governor, unsigned int cpu)
|
|||
|
||||
dprintf("set %s as cpufreq governor\n", governor);
|
||||
|
||||
if (cpupower_is_cpu_online(cpu) != 0) {
|
||||
if (cpupower_is_cpu_online(cpu) != 1) {
|
||||
perror("cpufreq_cpu_exists");
|
||||
fprintf(stderr, "error: cpu %u does not exist\n", cpu);
|
||||
return -1;
|
||||
|
|
|
@ -130,15 +130,18 @@ static struct cpuidle_monitor *cpuidle_register(void)
|
|||
{
|
||||
int num;
|
||||
char *tmp;
|
||||
int this_cpu;
|
||||
|
||||
this_cpu = sched_getcpu();
|
||||
|
||||
/* Assume idle state count is the same for all CPUs */
|
||||
cpuidle_sysfs_monitor.hw_states_num = cpuidle_state_count(0);
|
||||
cpuidle_sysfs_monitor.hw_states_num = cpuidle_state_count(this_cpu);
|
||||
|
||||
if (cpuidle_sysfs_monitor.hw_states_num <= 0)
|
||||
return NULL;
|
||||
|
||||
for (num = 0; num < cpuidle_sysfs_monitor.hw_states_num; num++) {
|
||||
tmp = cpuidle_state_name(0, num);
|
||||
tmp = cpuidle_state_name(this_cpu, num);
|
||||
if (tmp == NULL)
|
||||
continue;
|
||||
|
||||
|
@ -146,7 +149,7 @@ static struct cpuidle_monitor *cpuidle_register(void)
|
|||
strncpy(cpuidle_cstates[num].name, tmp, CSTATE_NAME_LEN - 1);
|
||||
free(tmp);
|
||||
|
||||
tmp = cpuidle_state_desc(0, num);
|
||||
tmp = cpuidle_state_desc(this_cpu, num);
|
||||
if (tmp == NULL)
|
||||
continue;
|
||||
strncpy(cpuidle_cstates[num].desc, tmp, CSTATE_DESC_LEN - 1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user