Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm-6.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more power management updates from Rafael Wysocki:
"These fix cpufreq core and the pcc cpufreq driver, add per-policy
boost support to cpufreq and add Georgian translation Makefile
LANGUAGES in cpupower.

Specifics:

- Add Georgian translation to Makefile LANGUAGES in cpupower (Shuah
Khan).

- Add support for per-policy performance boost to cpufreq (Jie Zhan).

- Fix assorted issues in the cpufreq core, common governor code and
in the pcc cpufreq driver (Liao Chang)"

* tag 'pm-6.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: Support per-policy performance boost
cpufreq: pcc: Fix the potentinal scheduling delays in target_index()
cpufreq: governor: Free dbs_data directly when gov->init() fails
cpufreq: Fix the race condition while updating the transition_task of policy
cpufreq: Avoid printing kernel addresses in cpufreq_resume()
cpupower: Add Georgian translation to Makefile LANGUAGES

+57 -7
+49 -4
drivers/cpufreq/cpufreq.c
··· 86 86 static int cpufreq_set_policy(struct cpufreq_policy *policy, 87 87 struct cpufreq_governor *new_gov, 88 88 unsigned int new_pol); 89 + static bool cpufreq_boost_supported(void); 89 90 90 91 /* 91 92 * Two notifier lists: the "policy" list is involved in the ··· 456 455 policy->cur, 457 456 policy->cpuinfo.max_freq); 458 457 458 + spin_lock(&policy->transition_lock); 459 459 policy->transition_ongoing = false; 460 460 policy->transition_task = NULL; 461 + spin_unlock(&policy->transition_lock); 461 462 462 463 wake_up(&policy->transition_wait); 463 464 } ··· 623 620 return count; 624 621 } 625 622 define_one_global_rw(boost); 623 + 624 + static ssize_t show_local_boost(struct cpufreq_policy *policy, char *buf) 625 + { 626 + return sysfs_emit(buf, "%d\n", policy->boost_enabled); 627 + } 628 + 629 + static ssize_t store_local_boost(struct cpufreq_policy *policy, 630 + const char *buf, size_t count) 631 + { 632 + int ret, enable; 633 + 634 + ret = kstrtoint(buf, 10, &enable); 635 + if (ret || enable < 0 || enable > 1) 636 + return -EINVAL; 637 + 638 + if (!cpufreq_driver->boost_enabled) 639 + return -EINVAL; 640 + 641 + if (policy->boost_enabled == enable) 642 + return count; 643 + 644 + cpus_read_lock(); 645 + ret = cpufreq_driver->set_boost(policy, enable); 646 + cpus_read_unlock(); 647 + 648 + if (ret) 649 + return ret; 650 + 651 + policy->boost_enabled = enable; 652 + 653 + return count; 654 + } 655 + 656 + static struct freq_attr local_boost = __ATTR(boost, 0644, show_local_boost, store_local_boost); 626 657 627 658 static struct cpufreq_governor *find_governor(const char *str_governor) 628 659 { ··· 1088 1051 1089 1052 if (cpufreq_driver->bios_limit) { 1090 1053 ret = sysfs_create_file(&policy->kobj, &bios_limit.attr); 1054 + if (ret) 1055 + return ret; 1056 + } 1057 + 1058 + if (cpufreq_boost_supported()) { 1059 + ret = sysfs_create_file(&policy->kobj, &local_boost.attr); 1091 1060 if (ret) 1092 1061 return ret; 1093 1062 } ··· 1986 1943 1987 1944 for_each_active_policy(policy) { 1988 1945 if (cpufreq_driver->resume && cpufreq_driver->resume(policy)) { 1989 - pr_err("%s: Failed to resume driver: %p\n", __func__, 1990 - policy); 1946 + pr_err("%s: Failed to resume driver: %s\n", __func__, 1947 + cpufreq_driver->name); 1991 1948 } else if (has_target()) { 1992 1949 down_write(&policy->rwsem); 1993 1950 ret = cpufreq_start_governor(policy); 1994 1951 up_write(&policy->rwsem); 1995 1952 1996 1953 if (ret) 1997 - pr_err("%s: Failed to start governor for policy: %p\n", 1998 - __func__, policy); 1954 + pr_err("%s: Failed to start governor for CPU%u's policy\n", 1955 + __func__, policy->cpu); 1999 1956 } 2000 1957 } 2001 1958 } ··· 2759 2716 ret = cpufreq_driver->set_boost(policy, state); 2760 2717 if (ret) 2761 2718 goto err_reset_state; 2719 + 2720 + policy->boost_enabled = state; 2762 2721 } 2763 2722 cpus_read_unlock(); 2764 2723
+3 -1
drivers/cpufreq/cpufreq_governor.c
··· 439 439 440 440 ret = gov->init(dbs_data); 441 441 if (ret) 442 - goto free_policy_dbs_info; 442 + goto free_dbs_data; 443 443 444 444 /* 445 445 * The sampling interval should not be less than the transition latency ··· 474 474 if (!have_governor_per_policy()) 475 475 gov->gdbs_data = NULL; 476 476 gov->exit(dbs_data); 477 + 478 + free_dbs_data: 477 479 kfree(dbs_data); 478 480 479 481 free_policy_dbs_info:
+1 -1
drivers/cpufreq/pcc-cpufreq.c
··· 232 232 status = ioread16(&pcch_hdr->status); 233 233 iowrite16(0, &pcch_hdr->status); 234 234 235 - cpufreq_freq_transition_end(policy, &freqs, status != CMD_COMPLETE); 236 235 spin_unlock(&pcc_lock); 236 + cpufreq_freq_transition_end(policy, &freqs, status != CMD_COMPLETE); 237 237 238 238 if (status != CMD_COMPLETE) { 239 239 pr_debug("target: FAILED for cpu %d, with status: 0x%x\n",
+3
include/linux/cpufreq.h
··· 141 141 */ 142 142 bool dvfs_possible_from_any_cpu; 143 143 144 + /* Per policy boost enabled flag. */ 145 + bool boost_enabled; 146 + 144 147 /* Cached frequency lookup from cpufreq_driver_resolve_freq. */ 145 148 unsigned int cached_target_freq; 146 149 unsigned int cached_resolved_idx;
+1 -1
tools/power/cpupower/Makefile
··· 57 57 58 58 PACKAGE = cpupower 59 59 PACKAGE_BUGREPORT = linux-pm@vger.kernel.org 60 - LANGUAGES = de fr it cs pt 60 + LANGUAGES = de fr it cs pt ka 61 61 62 62 63 63 # Directory definitions. These are default and most probably