Skip to content

Commit 19ea8a0

Browse files
committed
Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm
Pull ARM cpufreq updates for 5.16-rc1 from Viresh Kumar: "- Fix tegra driver to handle BPMP errors properly (Mikko Perttunen). - Fix the parameter usage of the newly added perf-domain API (Hector Yuan). - Minor cleanups to cppc, vexpress and s3c244x drivers (Han Wang, Guenter Roeck, and Arnd Bergmann)." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: Fix parameter in parse_perf_domain() cpufreq: tegra186/tegra194: Handle errors in BPMP response cpufreq: remove useless INIT_LIST_HEAD() cpufreq: s3c244x: add fallthrough comments for switch cpufreq: vexpress: Drop unused variable
2 parents c72bcf0 + 4a08e32 commit 19ea8a0

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

drivers/cpufreq/cppc_cpufreq.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,6 @@ static int __init cppc_cpufreq_init(void)
741741
if ((acpi_disabled) || !acpi_cpc_valid())
742742
return -ENODEV;
743743

744-
INIT_LIST_HEAD(&cpu_data_list);
745-
746744
cppc_check_hisi_workaround();
747745
cppc_freq_invariance_init();
748746

drivers/cpufreq/s3c2440-cpufreq.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,14 @@ static void s3c2440_cpufreq_setdivs(struct s3c_cpufreq_config *cfg)
173173

174174
case 6:
175175
camdiv |= S3C2440_CAMDIVN_HCLK3_HALF;
176+
fallthrough;
176177
case 3:
177178
clkdiv |= S3C2440_CLKDIVN_HDIVN_3_6;
178179
break;
179180

180181
case 8:
181182
camdiv |= S3C2440_CAMDIVN_HCLK4_HALF;
183+
fallthrough;
182184
case 4:
183185
clkdiv |= S3C2440_CLKDIVN_HDIVN_4_8;
184186
break;

drivers/cpufreq/tegra186-cpufreq.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ static struct cpufreq_frequency_table *init_vhint_table(
159159
table = ERR_PTR(err);
160160
goto free;
161161
}
162+
if (msg.rx.ret) {
163+
table = ERR_PTR(-EINVAL);
164+
goto free;
165+
}
162166

163167
for (i = data->vfloor; i <= data->vceil; i++) {
164168
u16 ndiv = data->ndiv[i];

drivers/cpufreq/tegra194-cpufreq.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ static int tegra194_cpufreq_init(struct cpufreq_policy *policy)
242242

243243
smp_call_function_single(policy->cpu, get_cpu_cluster, &cl, true);
244244

245-
if (cl >= data->num_clusters)
245+
if (cl >= data->num_clusters || !data->tables[cl])
246246
return -EINVAL;
247247

248248
/* set same policy for all cpus in a cluster */
@@ -310,6 +310,12 @@ init_freq_table(struct platform_device *pdev, struct tegra_bpmp *bpmp,
310310
err = tegra_bpmp_transfer(bpmp, &msg);
311311
if (err)
312312
return ERR_PTR(err);
313+
if (msg.rx.ret == -BPMP_EINVAL) {
314+
/* Cluster not available */
315+
return NULL;
316+
}
317+
if (msg.rx.ret)
318+
return ERR_PTR(-EINVAL);
313319

314320
/*
315321
* Make sure frequency table step is a multiple of mdiv to match

include/linux/cpufreq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ static inline int of_perf_domain_get_sharing_cpumask(int pcpu, const char *list_
10411041
if (cpu == pcpu)
10421042
continue;
10431043

1044-
ret = parse_perf_domain(pcpu, list_name, cell_name);
1044+
ret = parse_perf_domain(cpu, list_name, cell_name);
10451045
if (ret < 0)
10461046
continue;
10471047

0 commit comments

Comments
 (0)