Skip to content

Commit 2114d59

Browse files
committed
Merge branch 'pm-cpufreq'
Merge ARM cpufreq updates for 6.6: - Migrate various platforms to use remove callback returning void (Yangtao Li). - Add online/offline/exit hooks for Tegra driver (Sumit Gupta). - Explicitly include correct DT includes (Rob Herring). - Frequency domain updates for qcom-hw driver (Neil Armstrong). - Modify AMD pstate driver return the highest_perf value (Meng Li). - Generic cleanups for cppc, mediatek and powernow driver (Liao Chang, Konrad Dybcio). - Add more platforms to cpufreq-arm driver's blocklist (AngeloGioacchino Del Regno, Konrad Dybcio). - brcmstb-avs-cpufreq: Fix -Warray-bounds bug (Gustavo A. R. Silva). * pm-cpufreq: (33 commits) cpufreq: tegra194: remove opp table in exit hook cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit() cpufreq: tegra194: add online/offline hooks cpufreq: qcom-cpufreq-hw: add support for 4 freq domains dt-bindings: cpufreq: qcom-hw: add a 4th frequency domain cpufreq: cppc: Set fie_disabled to FIE_DISABLED if fails to create kworker_fie cpufreq: cppc: cppc_cpufreq_get_rate() returns zero in all error cases. cpufreq: Prefer to print cpuid in MIN/MAX QoS register error message cpufreq: amd-pstate-ut: Modify the function to get the highest_perf value cpufreq: mediatek-hw: Remove unused define cpufreq: blocklist more Qualcomm platforms in cpufreq-dt-platdev cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug cpufreq: blocklist MSM8998 in cpufreq-dt-platdev cpufreq: omap: Convert to platform remove callback returning void cpufreq: qoriq: Convert to platform remove callback returning void cpufreq: acpi: Convert to platform remove callback returning void cpufreq: tegra186: Convert to platform remove callback returning void cpufreq: qcom-nvmem: Convert to platform remove callback returning void cpufreq: kirkwood: Convert to platform remove callback returning void cpufreq: pcc-cpufreq: Convert to platform remove callback returning void ...
2 parents 885c429 + 6e2f78c commit 2114d59

32 files changed

+108
-102
lines changed

Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@ properties:
4949
- description: Frequency domain 0 register region
5050
- description: Frequency domain 1 register region
5151
- description: Frequency domain 2 register region
52+
- description: Frequency domain 3 register region
5253

5354
reg-names:
5455
minItems: 1
5556
items:
5657
- const: freq-domain0
5758
- const: freq-domain1
5859
- const: freq-domain2
60+
- const: freq-domain3
5961

6062
clocks:
6163
items:
@@ -69,14 +71,15 @@ properties:
6971

7072
interrupts:
7173
minItems: 1
72-
maxItems: 3
74+
maxItems: 4
7375

7476
interrupt-names:
7577
minItems: 1
7678
items:
7779
- const: dcvsh-irq-0
7880
- const: dcvsh-irq-1
7981
- const: dcvsh-irq-2
82+
- const: dcvsh-irq-3
8083

8184
'#freq-domain-cells':
8285
const: 1

drivers/cpufreq/acpi-cpufreq.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,22 +1011,20 @@ static int __init acpi_cpufreq_probe(struct platform_device *pdev)
10111011
return ret;
10121012
}
10131013

1014-
static int acpi_cpufreq_remove(struct platform_device *pdev)
1014+
static void acpi_cpufreq_remove(struct platform_device *pdev)
10151015
{
10161016
pr_debug("%s\n", __func__);
10171017

10181018
cpufreq_unregister_driver(&acpi_cpufreq_driver);
10191019

10201020
free_acpi_perf_data();
1021-
1022-
return 0;
10231021
}
10241022

10251023
static struct platform_driver acpi_cpufreq_platdrv = {
10261024
.driver = {
10271025
.name = "acpi-cpufreq",
10281026
},
1029-
.remove = acpi_cpufreq_remove,
1027+
.remove_new = acpi_cpufreq_remove,
10301028
};
10311029

10321030
static int __init acpi_cpufreq_init(void)

drivers/cpufreq/amd-pstate-ut.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ static void amd_pstate_ut_check_perf(u32 index)
127127
struct cpufreq_policy *policy = NULL;
128128
struct amd_cpudata *cpudata = NULL;
129129

130-
highest_perf = amd_get_highest_perf();
131-
132130
for_each_possible_cpu(cpu) {
133131
policy = cpufreq_cpu_get(cpu);
134132
if (!policy)
@@ -143,6 +141,7 @@ static void amd_pstate_ut_check_perf(u32 index)
143141
goto skip_test;
144142
}
145143

144+
highest_perf = cppc_perf.highest_perf;
146145
nominal_perf = cppc_perf.nominal_perf;
147146
lowest_nonlinear_perf = cppc_perf.lowest_nonlinear_perf;
148147
lowest_perf = cppc_perf.lowest_perf;
@@ -154,6 +153,7 @@ static void amd_pstate_ut_check_perf(u32 index)
154153
goto skip_test;
155154
}
156155

156+
highest_perf = AMD_CPPC_HIGHEST_PERF(cap1);
157157
nominal_perf = AMD_CPPC_NOMINAL_PERF(cap1);
158158
lowest_nonlinear_perf = AMD_CPPC_LOWNONLIN_PERF(cap1);
159159
lowest_perf = AMD_CPPC_LOWEST_PERF(cap1);

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@
1414
#include <linux/interrupt.h>
1515
#include <linux/io.h>
1616
#include <linux/mfd/syscon.h>
17+
#include <linux/mod_devicetable.h>
1718
#include <linux/module.h>
18-
#include <linux/of_address.h>
19-
#include <linux/of_device.h>
20-
#include <linux/of_irq.h>
2119
#include <linux/platform_device.h>
2220
#include <linux/pm_opp.h>
2321
#include <linux/regmap.h>

drivers/cpufreq/brcmstb-avs-cpufreq.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,11 @@ brcm_avs_get_freq_table(struct device *dev, struct private_data *priv)
434434
if (ret)
435435
return ERR_PTR(ret);
436436

437-
table = devm_kcalloc(dev, AVS_PSTATE_MAX + 1, sizeof(*table),
437+
/*
438+
* We allocate space for the 5 different P-STATES AVS,
439+
* plus extra space for a terminating element.
440+
*/
441+
table = devm_kcalloc(dev, AVS_PSTATE_MAX + 1 + 1, sizeof(*table),
438442
GFP_KERNEL);
439443
if (!table)
440444
return ERR_PTR(-ENOMEM);
@@ -749,13 +753,11 @@ static int brcm_avs_cpufreq_probe(struct platform_device *pdev)
749753
return ret;
750754
}
751755

752-
static int brcm_avs_cpufreq_remove(struct platform_device *pdev)
756+
static void brcm_avs_cpufreq_remove(struct platform_device *pdev)
753757
{
754758
cpufreq_unregister_driver(&brcm_avs_driver);
755759

756760
brcm_avs_prepare_uninit(pdev);
757-
758-
return 0;
759761
}
760762

761763
static const struct of_device_id brcm_avs_cpufreq_match[] = {
@@ -770,7 +772,7 @@ static struct platform_driver brcm_avs_cpufreq_platdrv = {
770772
.of_match_table = brcm_avs_cpufreq_match,
771773
},
772774
.probe = brcm_avs_cpufreq_probe,
773-
.remove = brcm_avs_cpufreq_remove,
775+
.remove_new = brcm_avs_cpufreq_remove,
774776
};
775777
module_platform_driver(brcm_avs_cpufreq_platdrv);
776778

drivers/cpufreq/cppc_cpufreq.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,15 +249,19 @@ static void __init cppc_freq_invariance_init(void)
249249
return;
250250

251251
kworker_fie = kthread_create_worker(0, "cppc_fie");
252-
if (IS_ERR(kworker_fie))
252+
if (IS_ERR(kworker_fie)) {
253+
pr_warn("%s: failed to create kworker_fie: %ld\n", __func__,
254+
PTR_ERR(kworker_fie));
255+
fie_disabled = FIE_DISABLED;
253256
return;
257+
}
254258

255259
ret = sched_setattr_nocheck(kworker_fie->task, &attr);
256260
if (ret) {
257261
pr_warn("%s: failed to set SCHED_DEADLINE: %d\n", __func__,
258262
ret);
259263
kthread_destroy_worker(kworker_fie);
260-
return;
264+
fie_disabled = FIE_DISABLED;
261265
}
262266
}
263267

@@ -267,7 +271,6 @@ static void cppc_freq_invariance_exit(void)
267271
return;
268272

269273
kthread_destroy_worker(kworker_fie);
270-
kworker_fie = NULL;
271274
}
272275

273276
#else
@@ -849,13 +852,13 @@ static unsigned int cppc_cpufreq_get_rate(unsigned int cpu)
849852

850853
ret = cppc_get_perf_ctrs(cpu, &fb_ctrs_t0);
851854
if (ret)
852-
return ret;
855+
return 0;
853856

854857
udelay(2); /* 2usec delay between sampling */
855858

856859
ret = cppc_get_perf_ctrs(cpu, &fb_ctrs_t1);
857860
if (ret)
858-
return ret;
861+
return 0;
859862

860863
delivered_perf = cppc_perf_from_fbctrs(cpu_data, &fb_ctrs_t0,
861864
&fb_ctrs_t1);

drivers/cpufreq/cpufreq-dt-platdev.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,21 +143,28 @@ static const struct of_device_id blocklist[] __initconst = {
143143

144144
{ .compatible = "qcom,apq8096", },
145145
{ .compatible = "qcom,msm8996", },
146+
{ .compatible = "qcom,msm8998", },
147+
{ .compatible = "qcom,qcm2290", },
146148
{ .compatible = "qcom,qcs404", },
149+
{ .compatible = "qcom,qdu1000", },
147150
{ .compatible = "qcom,sa8155p" },
148151
{ .compatible = "qcom,sa8540p" },
152+
{ .compatible = "qcom,sa8775p" },
149153
{ .compatible = "qcom,sc7180", },
150154
{ .compatible = "qcom,sc7280", },
151155
{ .compatible = "qcom,sc8180x", },
152156
{ .compatible = "qcom,sc8280xp", },
153157
{ .compatible = "qcom,sdm845", },
158+
{ .compatible = "qcom,sdx75", },
154159
{ .compatible = "qcom,sm6115", },
155160
{ .compatible = "qcom,sm6350", },
156161
{ .compatible = "qcom,sm6375", },
157162
{ .compatible = "qcom,sm7225", },
158163
{ .compatible = "qcom,sm8150", },
159164
{ .compatible = "qcom,sm8250", },
160165
{ .compatible = "qcom,sm8350", },
166+
{ .compatible = "qcom,sm8450", },
167+
{ .compatible = "qcom,sm8550", },
161168

162169
{ .compatible = "st,stih407", },
163170
{ .compatible = "st,stih410", },

drivers/cpufreq/cpufreq-dt.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,19 +349,18 @@ static int dt_cpufreq_probe(struct platform_device *pdev)
349349
return ret;
350350
}
351351

352-
static int dt_cpufreq_remove(struct platform_device *pdev)
352+
static void dt_cpufreq_remove(struct platform_device *pdev)
353353
{
354354
cpufreq_unregister_driver(&dt_cpufreq_driver);
355355
dt_cpufreq_release();
356-
return 0;
357356
}
358357

359358
static struct platform_driver dt_cpufreq_platdrv = {
360359
.driver = {
361360
.name = "cpufreq-dt",
362361
},
363362
.probe = dt_cpufreq_probe,
364-
.remove = dt_cpufreq_remove,
363+
.remove_new = dt_cpufreq_remove,
365364
};
366365
module_platform_driver(dt_cpufreq_platdrv);
367366

drivers/cpufreq/cpufreq.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,16 +1234,16 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
12341234
ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MIN,
12351235
&policy->nb_min);
12361236
if (ret) {
1237-
dev_err(dev, "Failed to register MIN QoS notifier: %d (%*pbl)\n",
1238-
ret, cpumask_pr_args(policy->cpus));
1237+
dev_err(dev, "Failed to register MIN QoS notifier: %d (CPU%u)\n",
1238+
ret, cpu);
12391239
goto err_kobj_remove;
12401240
}
12411241

12421242
ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MAX,
12431243
&policy->nb_max);
12441244
if (ret) {
1245-
dev_err(dev, "Failed to register MAX QoS notifier: %d (%*pbl)\n",
1246-
ret, cpumask_pr_args(policy->cpus));
1245+
dev_err(dev, "Failed to register MAX QoS notifier: %d (CPU%u)\n",
1246+
ret, cpu);
12471247
goto err_min_qos_notifier;
12481248
}
12491249

drivers/cpufreq/davinci-cpufreq.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,23 +131,21 @@ static int __init davinci_cpufreq_probe(struct platform_device *pdev)
131131
return cpufreq_register_driver(&davinci_driver);
132132
}
133133

134-
static int __exit davinci_cpufreq_remove(struct platform_device *pdev)
134+
static void __exit davinci_cpufreq_remove(struct platform_device *pdev)
135135
{
136136
cpufreq_unregister_driver(&davinci_driver);
137137

138138
clk_put(cpufreq.armclk);
139139

140140
if (cpufreq.asyncclk)
141141
clk_put(cpufreq.asyncclk);
142-
143-
return 0;
144142
}
145143

146144
static struct platform_driver davinci_cpufreq_driver = {
147145
.driver = {
148146
.name = "cpufreq-davinci",
149147
},
150-
.remove = __exit_p(davinci_cpufreq_remove),
148+
.remove_new = __exit_p(davinci_cpufreq_remove),
151149
};
152150

153151
int __init davinci_cpufreq_init(void)

0 commit comments

Comments
 (0)