Power management fixes for 5.8-rc6

Add missing handling of a command line switch to the intel_pstate
 driver (Rafael Wysocki) and fix the freeing of the operating
 performance point (OPP) entries for the legacy (v1) OPP table
 type (Walter Lozano).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAl8QjTMSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxd2MP+wfjmld9D8wogVet80SfNICjN2v4dEe+
 c8ajIXeIaoSU/Z3uTv07h8EVSVO3v1pvrMolHMyGmu9geDqCawg6oYrxfgRsnNPh
 N6Yt5OYQsi9h7vbS3jzRCos7uDV6StEIgn+2g30qCjtnTvNW5gCmCokxT/K51Zat
 DCRPIWQQnKsD1sid+J15GgfrONr8NzhCgIj8AUhiO2QIG6NllioJZY7XOvwvrW1x
 MxLCiyduL0ApEqo3NjjT4txi/uZJXv7+dqkkDm4RcfCzxDW4OduX6qdHr27Ogf1U
 CFd33bGsOa09YUPn5X8FnS2KQuCPMscph5L+LSCy1itxtt0qVI05Fc+J/Us+vNl/
 rIECLlTpivc4Wb1/q8AvGtaWY509nHHzXOEpmMOoPgDLPezw31zMTv4a6blSBMTQ
 wzUNRx52ld+eSs6DEWxdyD/Yxn88jARCKBsZ+Lpn9v/k5ReS2oJdf1G4fxFBZBg2
 CGIH2ePy4cE039fVFRQNasxlBLvEZZuli3mozZ+FyB8J5g/bGpK0yWwjAojTGwMw
 4h1u906mA8gL1BtsECz/5MT10NfqnJCHuKHNKveMtOdBnTCQkimUIukhg5PjJRgG
 bFMISmUZo6HI9AzBa3p/vmE1vXTpMEHaaJAHZS6UxA1D3DW42+gTpc6DMYh8/v8W
 ElL3nvrv6sID
 =v7gm
 -----END PGP SIGNATURE-----

Merge tag 'pm-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm into master

Pull power management fixes from Rafael Wysocki:
 "Add missing handling of a command line switch to the intel_pstate
  driver (Rafael Wysocki) and fix the freeing of the operating
  performance point (OPP) entries for the legacy (v1) OPP table type
  (Walter Lozano)"

* tag 'pm-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  opp: Increase parsed_static_opps in _of_add_opp_table_v1()
  cpufreq: intel_pstate: Fix active mode setting from command line
This commit is contained in:
Linus Torvalds 2020-07-16 11:57:43 -07:00
commit 07a56bb875
2 changed files with 10 additions and 2 deletions

View File

@ -2464,7 +2464,7 @@ static struct cpufreq_driver intel_cpufreq = {
.name = "intel_cpufreq",
};
static struct cpufreq_driver *default_driver = &intel_pstate;
static struct cpufreq_driver *default_driver;
static void intel_pstate_driver_cleanup(void)
{
@ -2758,6 +2758,7 @@ static int __init intel_pstate_init(void)
hwp_active++;
hwp_mode_bdw = id->driver_data;
intel_pstate.attr = hwp_cpufreq_attrs;
default_driver = &intel_pstate;
goto hwp_cpu_matched;
}
} else {
@ -2775,7 +2776,8 @@ static int __init intel_pstate_init(void)
return -ENODEV;
}
/* Without HWP start in the passive mode. */
default_driver = &intel_cpufreq;
if (!default_driver)
default_driver = &intel_cpufreq;
hwp_cpu_matched:
/*
@ -2820,6 +2822,8 @@ static int __init intel_pstate_setup(char *str)
if (!strcmp(str, "disable")) {
no_load = 1;
} else if (!strcmp(str, "active")) {
default_driver = &intel_pstate;
} else if (!strcmp(str, "passive")) {
default_driver = &intel_cpufreq;
no_hwp = 1;

View File

@ -902,6 +902,10 @@ static int _of_add_opp_table_v1(struct device *dev, struct opp_table *opp_table)
return -EINVAL;
}
mutex_lock(&opp_table->lock);
opp_table->parsed_static_opps = 1;
mutex_unlock(&opp_table->lock);
val = prop->value;
while (nr) {
unsigned long freq = be32_to_cpup(val++) * 1000;