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-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
"These fix two issues introduced during this cycle, one of which is a
regression and the other one affects new code.

Specifics:

- Prevent the operating performance points (OPP) code from crashing
when some entries in the table of required OPPs are set to error
pointer values (Marijn Suijten)

- Prevent the generic power domains (genpd) framework from
incorrectly overriding the performance state of a device set by its
driver while it is runtime-suspended or when runtime PM of it is
disabled (Dmitry Osipenko)"

* tag 'pm-5.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
PM: domains: Improve runtime PM performance state handling
opp: core: Check for pending links before reading required_opp pointers

+12 -6
+8 -2
drivers/base/power/domain.c
··· 435 435 int dev_pm_genpd_set_performance_state(struct device *dev, unsigned int state) 436 436 { 437 437 struct generic_pm_domain *genpd; 438 - int ret; 438 + int ret = 0; 439 439 440 440 genpd = dev_to_genpd_safe(dev); 441 441 if (!genpd) ··· 446 446 return -EINVAL; 447 447 448 448 genpd_lock(genpd); 449 - ret = genpd_set_performance_state(dev, state); 449 + if (pm_runtime_suspended(dev)) { 450 + dev_gpd_data(dev)->rpm_pstate = state; 451 + } else { 452 + ret = genpd_set_performance_state(dev, state); 453 + if (!ret) 454 + dev_gpd_data(dev)->rpm_pstate = 0; 455 + } 450 456 genpd_unlock(genpd); 451 457 452 458 return ret;
+4 -4
drivers/opp/core.c
··· 893 893 if (!required_opp_tables) 894 894 return 0; 895 895 896 + /* required-opps not fully initialized yet */ 897 + if (lazy_linking_pending(opp_table)) 898 + return -EBUSY; 899 + 896 900 /* 897 901 * We only support genpd's OPPs in the "required-opps" for now, as we 898 902 * don't know much about other use cases. Error out if the required OPP ··· 906 902 dev_err(dev, "required-opps don't belong to a genpd\n"); 907 903 return -ENOENT; 908 904 } 909 - 910 - /* required-opps not fully initialized yet */ 911 - if (lazy_linking_pending(opp_table)) 912 - return -EBUSY; 913 905 914 906 /* Single genpd case */ 915 907 if (!genpd_virt_devs)