Skip to content

Commit cae6876

Browse files
committed
Merge tag 'pm-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki: "These fix some issues in the ARM cpufreq drivers and in the operating performance points (OPP) framework. Specifics: - Fix useless WARN() in the OPP core and prevent a noisy warning from being printed by OPP _put functions (Dmitry Osipenko). - Fix error path when allocation failed in the arm_scmi cpufreq driver (Lukasz Luba). - Blacklist Qualcomm sc8180x and Qualcomm sm8150 in cpufreq-dt-platdev (Bjorn Andersson, Thara Gopinath). - Forbid cpufreq for 1.2 GHz variant in the armada-37xx cpufreq driver (Marek Behún)" * tag 'pm-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: opp: Drop empty-table checks from _put functions cpufreq: armada-37xx: forbid cpufreq for 1.2 GHz variant cpufreq: blocklist Qualcomm sm8150 in cpufreq-dt-platdev cpufreq: arm_scmi: Fix error path when allocation failed opp: remove WARN when no valid OPPs remain cpufreq: blacklist Qualcomm sc8180x in cpufreq-dt-platdev
2 parents ed3bad2 + f2963c7 commit cae6876

File tree

5 files changed

+11
-19
lines changed

5 files changed

+11
-19
lines changed

drivers/cpufreq/armada-37xx-cpufreq.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@ struct armada_37xx_dvfs {
104104
};
105105

106106
static struct armada_37xx_dvfs armada_37xx_dvfs[] = {
107-
{.cpu_freq_max = 1200*1000*1000, .divider = {1, 2, 4, 6} },
107+
/*
108+
* The cpufreq scaling for 1.2 GHz variant of the SOC is currently
109+
* unstable because we do not know how to configure it properly.
110+
*/
111+
/* {.cpu_freq_max = 1200*1000*1000, .divider = {1, 2, 4, 6} }, */
108112
{.cpu_freq_max = 1000*1000*1000, .divider = {1, 2, 4, 5} },
109113
{.cpu_freq_max = 800*1000*1000, .divider = {1, 2, 3, 4} },
110114
{.cpu_freq_max = 600*1000*1000, .divider = {2, 4, 5, 6} },

drivers/cpufreq/cpufreq-dt-platdev.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ static const struct of_device_id blocklist[] __initconst = {
139139
{ .compatible = "qcom,qcs404", },
140140
{ .compatible = "qcom,sc7180", },
141141
{ .compatible = "qcom,sc7280", },
142+
{ .compatible = "qcom,sc8180x", },
142143
{ .compatible = "qcom,sdm845", },
144+
{ .compatible = "qcom,sm8150", },
143145

144146
{ .compatible = "st,stih407", },
145147
{ .compatible = "st,stih410", },

drivers/cpufreq/scmi-cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
134134
}
135135

136136
if (!zalloc_cpumask_var(&opp_shared_cpus, GFP_KERNEL))
137-
ret = -ENOMEM;
137+
return -ENOMEM;
138138

139139
/* Obtain CPUs that share SCMI performance controls */
140140
ret = scmi_get_sharing_cpus(cpu_dev, policy->cpus);

drivers/opp/core.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,9 +1856,6 @@ void dev_pm_opp_put_supported_hw(struct opp_table *opp_table)
18561856
if (unlikely(!opp_table))
18571857
return;
18581858

1859-
/* Make sure there are no concurrent readers while updating opp_table */
1860-
WARN_ON(!list_empty(&opp_table->opp_list));
1861-
18621859
kfree(opp_table->supported_hw);
18631860
opp_table->supported_hw = NULL;
18641861
opp_table->supported_hw_count = 0;
@@ -1944,9 +1941,6 @@ void dev_pm_opp_put_prop_name(struct opp_table *opp_table)
19441941
if (unlikely(!opp_table))
19451942
return;
19461943

1947-
/* Make sure there are no concurrent readers while updating opp_table */
1948-
WARN_ON(!list_empty(&opp_table->opp_list));
1949-
19501944
kfree(opp_table->prop_name);
19511945
opp_table->prop_name = NULL;
19521946

@@ -2056,9 +2050,6 @@ void dev_pm_opp_put_regulators(struct opp_table *opp_table)
20562050
if (!opp_table->regulators)
20572051
goto put_opp_table;
20582052

2059-
/* Make sure there are no concurrent readers while updating opp_table */
2060-
WARN_ON(!list_empty(&opp_table->opp_list));
2061-
20622053
if (opp_table->enabled) {
20632054
for (i = opp_table->regulator_count - 1; i >= 0; i--)
20642055
regulator_disable(opp_table->regulators[i]);
@@ -2178,9 +2169,6 @@ void dev_pm_opp_put_clkname(struct opp_table *opp_table)
21782169
if (unlikely(!opp_table))
21792170
return;
21802171

2181-
/* Make sure there are no concurrent readers while updating opp_table */
2182-
WARN_ON(!list_empty(&opp_table->opp_list));
2183-
21842172
clk_put(opp_table->clk);
21852173
opp_table->clk = ERR_PTR(-EINVAL);
21862174

@@ -2279,9 +2267,6 @@ void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table)
22792267
if (unlikely(!opp_table))
22802268
return;
22812269

2282-
/* Make sure there are no concurrent readers while updating opp_table */
2283-
WARN_ON(!list_empty(&opp_table->opp_list));
2284-
22852270
opp_table->set_opp = NULL;
22862271

22872272
mutex_lock(&opp_table->lock);

drivers/opp/of.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,8 +964,9 @@ static int _of_add_opp_table_v2(struct device *dev, struct opp_table *opp_table)
964964
}
965965
}
966966

967-
/* There should be one of more OPP defined */
968-
if (WARN_ON(!count)) {
967+
/* There should be one or more OPPs defined */
968+
if (!count) {
969+
dev_err(dev, "%s: no supported OPPs", __func__);
969970
ret = -ENOENT;
970971
goto remove_static_opp;
971972
}

0 commit comments

Comments
 (0)